[Lcdproc] hd44780 display update timing
Markus Dolze
bsdfan at nurfuerspam.de
Tue Dec 23 14:49:38 UTC 2008
Hello,
I tought I had submitted this mail on Sunday evening - but as it has not yet arrived here it comes again:
a few weeks ago I got an old Matrix Orbital device and was impressed by the screen update speed. So I took a look at the hd44780 driver I use with parallel port and lcd2usb devices.
I first added some time measurement code around the 'flush()' call (attached as patch-hd44780-timing.c). After applying the patch run LCDd with '-s false -r 4 -f' All tests are done using a 16x2 display. OS is FreeBSD 7.0, timing is default DELAY_NANOSLEEP. Here are some results:
1. A unmodified hd44780-winamp connected display with no extra delays:
====
HD44780: flushed 32 chars (4 moves) in 0.719918 sec
HD44780: flushed 28 chars (6 moves) in 0.673611 sec
HD44780: flushed 10 chars (2 moves) in 0.239884 sec
2. The same hd44780-winamp with 'delaybus=true'
====
HD44780: flushed 32 chars (4 moves) in 2.159951 sec
HD44780: flushed 28 chars (6 moves) in 2.034169 sec
HD44780: flushed 32 chars (4 moves) in 2.159911 sec
The first thing to note is that it takes about 3/4 second to update a complete 16x2 screen. The second is that adding 'delaybus=true' slows down things far more than I expected.
I had a look how other implementations do this and found that ethlcd and uss720 overwrite the uPause locally. I did this for the lcd2usb device as well and the results are really nice (the patch will be submitted
sperately).
3. Results with modified hd44780-lcd2usb
====
HD44780: flushed 32 chars (4 moves) in 0.107890 sec
HD44780: flushed 26 chars (7 moves) in 0.098938 sec
HD44780: flushed 10 chars (2 moves) in 0.035978 sec
It would be nice if someone with an hd44780-winamp connected display could do the same test on a different OS to see if the slow timing is specific to FreeBSD.
Regards
Markus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-hd44780-timing.c
Type: application/octet-stream
Size: 1399 bytes
Desc: not available
URL: <http://lists.omnipotent.net/pipermail/lcdproc/attachments/20081223/9662e9e2/attachment-0001.obj>
-------------- next part --------------
1. A plain unmodified hd44780-winamp connected display with no extra delays:
====
Server running in foreground
Listening for queries on 127.0.0.1:13666
HD44780: using ConnectionType: winamp
hd44780: Using hd44780_default charmap
HD44780: flushed 32 chars (4 moves) in 0.719918 sec
Driver [hd44780] loaded
Key "Escape" is now reserved exclusively by client [-1]
Key "Enter" is now reserved shared by client [-1]
Key "Down" is now reserved shared by client [-1]
screenlist_switch: switched to screen [_server_screen]
HD44780: flushed 28 chars (6 moves) in 0.673611 sec
HD44780: flushed 10 chars (2 moves) in 0.239884 sec
HD44780: flushed 10 chars (2 moves) in 0.239873 sec
HD44780: flushed 10 chars (2 moves) in 0.239634 sec
^CServer shutting down on SIGINT
HD44780: flushed 27 chars (7 moves) in 0.677905 sec
Closing driver [hd44780]
Key "Escape" reserved exclusively by client [-1] and is now released
Key "Enter" reserved shared by client [-1] and is now released
Key "Down" reserved shared by client [-1] and is now released
Exiting.
2. The same unmodified hd44780-winamp with 'delaybus=true'
====
Server running in foreground
Listening for queries on 127.0.0.1:13666
HD44780: using ConnectionType: winamp
hd44780: Using hd44780_default charmap
HD44780: flushed 32 chars (4 moves) in 2.159951 sec
Driver [hd44780] loaded
Key "Escape" is now reserved exclusively by client [-1]
Key "Enter" is now reserved shared by client [-1]
Key "Down" is now reserved shared by client [-1]
screenlist_switch: switched to screen [_server_screen]
HD44780: flushed 28 chars (6 moves) in 2.034169 sec
HD44780: flushed 32 chars (4 moves) in 2.159911 sec
HD44780: flushed 10 chars (2 moves) in 0.719928 sec
HD44780: flushed 10 chars (2 moves) in 0.719818 sec
HD44780: flushed 10 chars (2 moves) in 0.719723 sec
^CServer shutting down on SIGINT
HD44780: flushed 29 chars (5 moves) in 2.039060 sec
Closing driver [hd44780]
Key "Escape" reserved exclusively by client [-1] and is now released
Key "Enter" reserved shared by client [-1] and is now released
Key "Down" reserved shared by client [-1] and is now released
Exiting.
3. Results with modified hd44780-lcd2usb
====
Server running in foreground
Listening for queries on 127.0.0.1:13666
HD44780: using ConnectionType: lcd2usb
HD44780: Direct key 0: "Enter"
HD44780: Direct key 1: "Down"
HD44780: Direct key 2: "Escape"
hd44780: Using hd44780_default charmap
hd_init_lcd2usb: device with firmware version 1.08 found
HD44780: flushed 32 chars (4 moves) in 0.107890 sec
Driver [hd44780] loaded
Key "Escape" is now reserved exclusively by client [-1]
Key "Enter" is now reserved shared by client [-1]
Key "Down" is now reserved shared by client [-1]
screenlist_switch: switched to screen [_server_screen]
HD44780: flushed 26 chars (7 moves) in 0.098938 sec
HD44780: flushed 10 chars (2 moves) in 0.035978 sec
^CServer shutting down on SIGINT
HD44780: flushed 27 chars (7 moves) in 0.101212 sec
Closing driver [hd44780]
Key "Escape" reserved exclusively by client [-1] and is now released
Key "Enter" reserved shared by client [-1] and is now released
Key "Down" reserved shared by client [-1] and is now released
Exiting.
More information about the LCDproc
mailing list