Friday, September 25, 2009

Microprocessors 9-24-2009

I've got the in class posted here:

Things to remember:
a 1 written to the offset of 4 to the memory location of the LED's tells the DDR it's in "input mode" a 0 written tells it its in output mode.

Writing to the DREG will turn the LED's On or Off once you put the register in output mode.

Note: the above program wasn't working in class, I'll be posting an updated version tonight that works (somewhat different then the version we did in class)

Here is the updated file that works, here:

One thing to note is that you'll want to copy and paste the contents of these files into a new file, I had issues getting it to compile until I just copied over.

DDR means Data Direction Register.
DREG means Data Register.