Updates:
        Status: Started

Comment #2 on issue 138 by robhamerling: request for custom char on lcd display
http://code.google.com/p/jallib/issues/detail?id=138

I've re-opened the issue for the following reasons:
The code in this new procedure in lcd_hd44780_common is a little too permissive.
1. Suppose the user specifies lcd_define(16, <str>)
This would modify the command LCD_SET_CGRAM_ADDRESS into LCD_SET_DDRAM_ADDRESS
   The procedure should prevent this.
2. The LCD_HD447800 libraries initialize the display to a 5x7 pixel character (5x8 if the cursor line is counted). A character pattern consists of 8 lines,
   and the loop to write <str> should be limited to 8 bytes.
Therefore I suggest to replace the current code with the following:

procedure lcd_define(byte in pos, byte in str[]) is

   _lcd_write_command(LCD_SET_CGRAM_ADDRESS | ((pos & 0x07) << 3 ))
   var byte len = byte(count(str)) & 0x07
   var byte
   for len using i loop
      _lcd_write_data(str[i])
   end loop

end procedure


--
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