Status: Assigned
Owner: robhamerling
Labels: Type-Defect Priority-Medium Component-External

New issue 137 by robhamerling: Error in
http://code.google.com/p/jallib/issues/detail?id=137


{ Reported by István Cserny }

There is an error in the file lib/lcd_hd44780_8.jal (this is in jallib-pack-2.4n-0.6.0.zip) In the procedure lcd_init() the underlined line (see the list below) is unnecessary and wrong, therefore the LCDs can not work properly in 8-bit mode. Please, remove this line! The correct parameter would be 0b0011_1000 but is is already sent in the previous command so it is unnecessary to sen it again...

The same command is present also in the file lcd_hd44780_common.jal (the first command in procedure _hd44780_init()). Wouldn't be better to move that line into file lcd_hd44780_4.jal? It can be used for 4-bit mode only, so there is no reason to use it in a "common" library.


8< ---- code snippet from lcd_hd44780_8.jal ----- >8

procedure lcd_init() is

-- first, init the interface
   lcd_rs = LOW                         -- set to control char mode
   delay_1ms(25)                        -- power-up delay (> 15 ms)
   _lcd_write_command(0b0011_0000)      -- function set
   delay_1ms(5)                         -- > 4.1 milliseconds
   _lcd_write_command(0b0011_0000)      -- function set
   delay_10us(10)                       -- > 100 us
   _lcd_write_command(0b0011_0000)      -- function set
   delay_10us(4)                        -- > 37 us
   _lcd_write_command(0b0011_1000)      -- to 8-bit mode
   delay_10us(4)                        -- > 37 us
   _lcd_write_command(0b_0010_1000)     -- 2 lines, 5x7 pattern
*******************************************************************
   _lcd_write_command(0b_0001_1100)     -- cursor move right
   _lcd_write_command(0b_0000_1100)    -- display on, cursor,blink off
   _lcd_write_command(0b_0000_0110)     -- cursor->right, no shift
   lcd_clear_screen()                   -- clear screen
                                    -- (incl switch to data char mode)

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