SMILEY’S WORKSHOP ☺
lcd_home()
lcd_set_cursor()
lcd_putc()
lcd_puts()
lcd_puts_p()
lcd_cursor_on()
lcd_cursor_off()
lcd_blink_on()
lcd_blink_off()
lcd_display_on()
lcd_display_off()
As shown in Figure 8, you can access the
avrtoolbox documentation at
www.smileymicros.
com\avrtoolbox_html.
Yes, but can you use it with the Arduino?
I’m really not trying to make folks lives more
complex than necessary, but you can use the LCD
with the Arduino LiquidCrystal library. It is wired up
for it, anyway. The only caveat is that their code is for
a 16x2 ( 16 characters, two lines) LCD while our LCDNAV
board uses a 8x2 LCD (it is a lot cheaper). You need to
change one line in each example: from lcd.begin( 16, 2); to
lcd.begin( 8, 2);. Note that this doesn’t make a difference
in some of the examples since they are hardwired to 16
characters. I suggest sticking with the
avrtoolbox code for now.
Well, as usual, we stop in the
middle of things. For now, you can
wire this up as shown and use it with
several applications at http://code.
google.com/p/avrtoolbox/. These
include tester programs for the LCD
and Nav button libraries and an
LCDNAV_demo program in the
avr_application directory. Have fun
playing with it and we’ll get more of
the details in later Workshops. Next
month, we’ll look at the Navigator
buttons and a menu application for
the LCD Navigator project.
Questions? Nuts & Volts is hosting
forums for its writers and you can find
mine at
http://forum.servomagazine.
com. If you want a really quick
response — especially to a question not
directly related to an article — you
can put on your biohazard suit and
start a thread at
www.avrfreaks.net.
(First, read my blog entry that will tell
you why you need the biohazard suit at
http://smileymicros.com/blog/2011/
01/24/using-an-internet-forum.)
If you just can’t wait and want to
get a leg up on all this serial stuff and
real C programming for the AVR
■ FIGURE 8. LCD
documentation in
avrtoolbox.
(while helping support your favorite magazine and
technical writer), then buy my C Programming book and
Butterfly projects kit and the Virtual Serial Port Cookbook
at the Nuts & Volts webshop. NV
;;; ;;;;
www.canakit.com
Cana Kit
;;; ;;;
USB-LOGIC
;;;; ;;;;;; ;;;;;;;;
;;;;;;;;;;;;; ;;;;;;;; ;;;;;;;;;;;;
DSO-NANO-V2
ASSEMBLED
;;; ;;;
;;; ;;;
;;;;;;;; ;;;; ;;;;;;;; ;;;
;;; ;;;;;;;;;;;;; ; ;;;;;;; ; ;;;;;; ;;;;;;;;;; ; ;;;;;; ;;;;;;;;;;;; ; ; ; ; ;; ;;;;;;; ;;;;;;;
ARDUINO-STK
;;;;;;; ;;;; ;;;;;; ;;;;;;;;;;; ;;;;;
;;;;;;;;;; ;;;;;;;;;;;;;;; ;;;;;;;;;
UK1104
January 2012 57