Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: greywanderer012345 on September 25, 2010, 05:17:12 PM

Title: How do I read (and understand) Microcontroller Datasheets?
Post by: greywanderer012345 on September 25, 2010, 05:17:12 PM
I'm just starting the $50 robot, but I'm using the atmega168 instead of the atmega8. The tutorial mentions the pins being different on this, and to look at the datasheet to figure out how to wire it. I did look at the datasheet, and the pins are labeled exactly the same as the pins in the tutorial. I guess I can wire it just like the tutorial...? Also, I tried to read and understand what each pin does by reading the datasheet description. Much of it I was able to understand, but I couldn't make sense of which I/O pins could be used as analog or digital. I would have no idea at all what needs to be connected to the programmer just from reading the datasheet. I know that if I just forget about the details and follow the tutorial step by step then the end result should work, but the main reason I'm building my own board is to learn, so I really want to understand what I'm doing rather than just blindly follw the instructions. Also, if I decided to use some other microcontroller down the road that didn't have a nice tutorial about wiring it, knowing what a datasheet is saying would be not only useful, but probably necessary. Thanks everyone. SoR is awesome.
Title: Re: How do I read (and understand) Microcontroller Datasheets?
Post by: Webbot on September 25, 2010, 05:25:35 PM
The quick answer is 'dont worry about it'.

The ATMega168 (16kb of program) and the ATMega328P(32kb of program) are backwards compatible with the ATMega8 (8kb of program).

That is to say: you can use any of them instead of the ATMega8. Its just that they also provide some 'extra stuff' in hardware (not pins but functionality). If you don't need this extra functionality ( I would suggest that you don't) then just plug in whichever chip you've got.
Title: Re: How do I read (and understand) Microcontroller Datasheets?
Post by: knossos on September 26, 2010, 10:38:31 AM
Without knowing what specific troubles you are having with the datasheet, my general recommendations is to try to break it down into sections.  Read one section, identify what in that section doesn't make sense or you think you need to learn more about (e.g. terminology, application, block diagrams, or what have you) and start reading more about that.  If its datasheets in general that are giving you the problem, I would try starting with a simple integrated circuit (IC).  For example the 555 timer is a fairly simple circuit with many applications that is well documented and is popular among electronics hobbyists.