History of OnlineCourse/LCDLowLevel
Older Newer
2005-06-09 03:38:53 . . . . MembersPage/MarcellGal [linked HD44780 stuff]
2005-01-02 00:49:09 . . . . MembersPage/MarcellGal [serial-LCD standard protocol in linux kernel]


Changes by last author:

Added:
# initialization happens when lcd.init != 0. In this case lcd_init_seq() is called about every 10 msec from mainloop (we hate busywait!!), and lcd.init is a state of the state-machine. lcd.init is also used for printing an address test sequence, which is not via the usual lcd.cache

# lcd.cache is used for storing a copy of what's on the lcd. lcd.dirty[] is a bitfield that marks dirty places (dirty ~ yet to be written). The ...dirty...() functions are used to set, clear, test positions in the bitfield, find_dirty() finds the first dirty position.

# low level routines send data and commands to lcd: toggle_E(), lcd_data(), lcd_cmd() and lcd_cmd8() and lcd_go2index(). You need to hd44780 datasheet to understand the commands. Not hard, but it's impossible to find out from the air :-)

# lcd_refresh() does the job of writing dirty positions from lcd.cache to the LCD using the low-level routines: querying lcd_busy(), finding a dirty position with find_dirty() and calling lcd_goto() or and lcd_cmd() as needed. Note that without busypoll configured, the worstcase LCD timings are not strictly enforced, especially in cold ( the LCD is slower in cold due to an internal RC oscillator, but the firmware is same speed since the microcontroller has a precise crystal ).

# formatting output like bin2BCDn() if you want to write decimal values into the lcd.cache. Very efficient routines.

lcd_display.c intensively uses the services of lcd.c

-----

Serial connection of LCD - currently not supported in firmware

The linux kernel (I saw in 2.6.10) has USBLCD support.

* Our smaller boards (with the USB-FBUS and RS232-FBUS cables) provide a compatible HW solution. (we could sell for this purpose)

* The more interesting thing is that there exists a "standard" (used in linux kernel) serial protocol for the LCD (maybe stream is the same as the HD44780 parallel stream, or it has error detection, or completely different ?)

More info in linux kernel sources and http://www.usblcd.de/

-----

See also

* OnlineCourse

* http://home.iae.nl/users/pouweha/lcd/lcd0.shtml#instruction_set [HD44780 basics ]

* http://home.iae.nl/users/pouweha/lcd/lcd.shtml [HD44780 timing]