Hi

> -- About cursor positions: the LCDs are internally 2x40 char devices.
> -- The first line starts at offset 0, the second line at offset 64  
> (0x40).
> -- With a 4x16 or 4x20 LCD the third line starts at offset 20 and the
> -- fourth line at offset 84 (0x40 + 20).
> -- Note: Some 1x16 LCDs are implemented as 2x8 line LCDs, which  
> means that
> --       the second half of the line has to be handled as the  
> second line.

How about:

const LCD_ROWS  = 4
const LCD_CHARS = 16

and procedures like:

lcd_row(n)

lcd_set_cursor_row_char(n,m)

In my experience something like half(!) of JAL code is used for the  
LCD human interface. Precise, easy-read cursor control saves lots of  
time.

Just nod if you agree, I'll put it in. And yes, above constants  
should be in the main program.

> -- With a 4x16 or 4x20 LCD the third line starts at offset 20 and the
> -- fourth line at offset 84 (0x40 + 20).

Actually, it starts at offset 16 and 0x40+0x0A with a 4x16 LCD :-(

---
ir EE van Andel [EMAIL PROTECTED]  http://www.fiwihex.nl
Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands
tel+31-546-491106 fax+31-546-491107



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to