Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
C Programming for microcontrollers (Joe Pardue, 2005).pdf
Скачиваний:
277
Добавлен:
12.08.2013
Размер:
4.55 Mб
Скачать

Chapter 11 The Butterfly LCD

LCD PUT F TEST

Notice that the message in flash was ‘LCD put_f test’ but the underline isn’t shown on the LCD because there isn’t one in the LCD character set. However, there is no good reason not to have this character sense all you have to do us use the bottom most little black bug, an exercise that, as they say, will be left to the student. (Teachers make this statement not because they want to educate the student, but because they are too lazy to do it themselves. Or maybe that’s just me.)

Conclusion

You will find that much of C programming for microcontrollers uses various ‘tricks’ to modify C to be more efficient for a specific microcontroller and a specific compiler. These tricks are often found by reading programs written by experienced programmers. You have access to the Butterfly software as modified by the folks using WinAVR, bf_gcc_20031205.zip, and I suggest you read it since these guys are the real experts. But do be careful. One of the main reasons to use C is to write portable code, so be sure you make you tricks easily retrickable for other systems.

Now that you’re familiar with C and the Butterfly software, go to the WinAVR directory and find the avr_libc user manual. At 185 pages, it provides excellent documentation for the avr_libc subset of the Standard C Library for the ATMEL’s AVR. It also provides some other goodies, such as start up examples and good solid example code to learn from. Since, they did such a good job documenting this resource, I’ll go no further, other than to say that this library will likely become an indispensable tool for your programming future.

Well, I hope you met your goals for using this book.

You should have gained a basic understanding microcontroller architecture. You should have an intermediate understanding of the C programming language. You should be able to use the WinAVR and AVRStudio tools to build programs. You should be able to use C to develop microcontroller functions such as: Port Inputs and Outputs, read a joystick, use timers, program Real Time Clocks, communicate

270

Chapter 11 The Butterfly LCD

with PC, conduct analog to digital and digital to analog conversions, measure temperature, light, and voltage, control motors, control an LCD.

If I was successful in helping you achieve these goals, after you tell all your friends, you might want to keep tabs of my website: www.smileymicros.com to see what other good stuff is available.

Happy programming!

271