Chapter 4
By the time i came to this spot it was Janurary 2006. Just the month before I had prepared a the circuit for LCD and AVR. This till date was the most complicated component. I did not know any basics about using LCD which hurt the most. The initial circuit was just made as shown. I had connected the data pins to PortD, and R/W,RS,E pins to first PortC. After the circuit it took one week to find a library that i knew what it did. I tweaked the headers for setting correct Pins. Then, nothing happened. The next two weeks i never knew what was wrong. I always kept finding problems like the power pin was not fit or the Data pins were loose etc. I never knew how to, first debug the circuit. That turned out to be the most critical hurdle.
The LCD after putting it on power will certainly do nothing but you can still see the character boxes. These character boxes will begin to display if the Variable Resistance is modified. Only when you see the bloxes come up can you fine tune the contrast for making a letter display. I made it less enough dark but never let the display go all together. Then powering even the AVR, my cursor came to life!!! A hello world was only round the corner. The timings also bothered me a lot since they are critical in initializing the LCD. The default delay that came with the library was enough for a internal 1mhz crystal clock on the AVR.
Later I spend a few days in playing with my first monitor. I learned a lot about the cost using sprintf. Just using this function takes 2K of the binary! Though multiple uses of this function don’t add up the same but, just 2K is quiete bothering in a environment like AVR. Couters and what not, i left nothing to try on my monitor like a new kid who learned to write his first program.
Chapter 5
ADC was the next in queue. Analog to Digital converter that comes with inside ATmega8535 supports independent 8 channels and supports maximum of 10 bit precision which is between 0~1024. Runs on voltate reading between 0 to 5 volts. I wanted the first thermometer.
I dug up the Atmel Butterfly. This is probably the most famous of AVR circuits


