BSp2 and LK202-25-GW LCD on I2C
Archiver
Posts: 46,084
I'm driving an Orbital Matrix LK202-25-GW LCD using the I2C buss.
The following command yields two characters, a double vertical bar followed
by the desired character.
I2COUT 8,$50,0,[noparse][[/noparse]VariableName]
It appears that every command generates an extraneous blotto character at
the current cursor position. You can get a single character result by adding
a Character Left to the command.
I2COUT 8,$50,0,[noparse][[/noparse]254,76,VariableName]
This works, but I seriously doubt that it's the "right" solution. Any
suggestions?
The following command yields two characters, a double vertical bar followed
by the desired character.
I2COUT 8,$50,0,[noparse][[/noparse]VariableName]
It appears that every command generates an extraneous blotto character at
the current cursor position. You can get a single character result by adding
a Character Left to the command.
I2COUT 8,$50,0,[noparse][[/noparse]254,76,VariableName]
This works, but I seriously doubt that it's the "right" solution. Any
suggestions?
Comments
I have a LK204-25. The manual is a bit unclear for the I2C stuff.
The BS2p I2C command is:
I2COUT I2Cpin, slaveID, memoryaddress, [noparse][[/noparse]data]
but the LCD I2C operates a little differently. There is no "memoryaddress"
for this type of serial LCD. You can either send an LCD command or start
your data. Your code is sending $00 for the "memoryaddress" which the LCD
is interpreting as data and is showing as that double line.
LCD_ID CON $5C ' LCD I2C address
LCD_CMD CON $FE ' starts an LCD command
LCD_BLOFF CON $46 ' turn backlight off
LCD_SETCRSR CON $47 ' set cursor position "$47 col row" cols
and rows start at 1
I2COUT I2Cpin, LCD_ID, LCD_CMD, [noparse][[/noparse]LCD_BLOFF] 'turn off the LCD
back light
I2COUT I2Cpin, LCD_ID, LCD_CMD, [noparse][[/noparse]LCD_SETCRSR,1, 2] 'move the cursor to col
1, row 2
I2COUT I2Cpin, LCD_ID, [noparse][[/noparse]"Hello there!"] 'print some
text to the LCD
Notice that the last line skips the "memoryaddress" and just goes straight
to the data!
Chuck Chargin Jr.
At 07:59 AM 8/24/2003 -0700, you wrote:
>I'm driving an Orbital Matrix LK202-25-GW LCD using the I2C buss.
>The following command yields two characters, a double vertical bar followed
>by the desired character.
>I2COUT 8,$50,0,[noparse][[/noparse]VariableName]
>
>It appears that every command generates an extraneous blotto character at
>the current cursor position. You can get a single character result by adding
>a Character Left to the command.
>I2COUT 8,$50,0,[noparse][[/noparse]254,76,VariableName]
>This works, but I seriously doubt that it's the "right" solution. Any
>suggestions?
>
>
>
>
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and
>Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/