Forgot your password?
No account? Register one!
May 6, 2009
Product LCD-09396 |
about a year ago
I am using the serLCD v2.5 with a PicAxe18X, and I found a little hint to help rid of the first character or command jibberish in the PicAxe docs under SerOut command:
A ‘T’ baud rate idles high, with data pulses going low. When using a T baud rate
the very first byte may become corrupt if the output pin was low before the serout
command (the pin will be automatically left high after the serout command). To
avoid this issue place the line high (via a’high’ command’) a few milliseconds
before the very first serout command.
Also I felt a bit dumb after I realized that the 0xFE command prefix is used for the Extended Commands, not the 0x7C used for the hardware set-up. Doh!
This is a test snip that seems to work: (Thanks to JPLofLIL for the jump-start.)
pause 200 ;pauses are overly generous, could be shorter
setfreq m8 ;needs to be fast enough for higher baud rates
pin0 = 1 ; Pin needs to idle high
serout 0,T9600_8,(0x7c,137) 'backlight values 128-157
pause 2000 '128=off 140=40% 150=73% 157=full on
serout 0,T9600_8,(0xFE,0x01,"hello bob ")
serout 0,T9600_8,(" hello dude" )
No public wish lists :(