Monday, March 24, 2008

Learning C Programming


I've decided to take up learning C for the AVR 8-bit microcontroller. Although I enjoy programming in ASM, larger scale projects require C programming. I suppose the LCD program was a wake up call as to how useful C programming is. I wanted to create a function in C that would output a string to the LCD display. Essentially I wanted to be able to type LCDPrint("Testing!"); and have "Testing!" appear on the display. After a few days working with C, I came up with a simple program that does just that. Arrays are fabulous for just this type of thing, and this was a great chance to learn the language.

Mr. Harrill, my electronics professor, has requested a project on outputting a keyboard to a LED display. I plan on interfacing the keyboard to an LCD display and then having that output go to the larger LED displays. This LCD program I made is the first step in that process. Since I don't want to have a large bundle of wires going to every LED controller or setting up extra hardware such as shift registers on the LED end, I need to work on doing USART communication between microcontrollers, and also interfacing with a keyboard. The keyboard seems to be quite easy, since I could probably setup an interrupt based system where it reads the bit value after each clock pulse. USART will be used simply because it's easy to use and is supported by nearly all AVR microcontrollers. I wish I had more time to work on all this, I barely had time to setup the LCD program. As stated earlier, classes, in this case macroeconomics, are crowding up my free time. Anyways, attached in this post is the program to interface with the 2x16 character LCD.

EDIT: Oh and did I mention I got a new job at the college?

LCD Interfacing Program: http://salgat.googlepages.com/LCDInterface.zip

1 comment:

Anonymous said...

Good fill someone in on and this fill someone in on helped me alot in my college assignement. Gratefulness you for your information.