Problem 3—An embedded 16-bit microcontroller is connected to an 8-bit DAC, where the DAC is connected to
the high-order half of the data bus.
What is the purpose of y in the following driver?
the high-order half of the data bus.
What is the purpose of y in the following driver?
Code:
#define DAC (*(unsigned *) 0x8000)
void DAC_out (unsigned x)
{
static unsigned y;
x += y;
y = x & 0x00FF;
DAC = x;
}
I haven't a clue.
It's part of an EQ test out of circuit cellar issue 119.


Comment