I've been reading the code in the $50 robot tutorial, and I am trying to figure out how to use some of the registers for the AtMega8. Starting with the configure_ports() function:
DDRC = 0x00; //configure all C ports for input
PORTC = 0x00; //make sure pull-up resistors are turned off
DDRD = 0xFF; //configure all D ports for output
DDRB = 0xC7; //configure B ports 0, 1, 2, 6, 7 for output (google search '0b11000111 to hex')
I found a manual for the AtMega8 here: http://www.atmel.com/dyn/resources/prod_documents/2486s.pdf
. In this document is a "Register Summary" that seems to have some of the information that I'm looking for. In this summary, for example, I can find a line for the register DDRC. It tells me there is more information on page 65. But this document doesn't have 65 pages, so it must be page 65 of some other document. I can't find any other references to another document in this manual.
I found this the AVR Instruction Set Manual here: http://www.atmel.com/dyn/resources/prod_documents/doc0856.pdf
. This document is long enough to be the document referenced in the AtMega8 manual, but the information on page 65 suggests that this is not the document, either.
I did find this: http://ccrma.stanford.edu/workshops/pid2004/lectures/programming/programming/AVR_Registers.html
, which I think contains the information that I'm looking for, but I would love to have some document where I can go to the page referenced in the AtMega8 manual to find the information.
Also, if the AVR Instruction Set Manual is not what I'm looking for, then what is it? Is this something that is only useful when programming in assembly?