I2C LCD display help needed

in BASIC Stamp
I'm trying to interface a BS2px to a 32054 LCD 4x20 display I got from MPJA Electronics. They sell surplus gizmos - with little or no documentation. It has a piggy-back board for I2C interface. I see all kinds of Arduino code online, but nothing for Parallax. Has anyone done this and if so can you supply me with a little code to send ASCII characters to the display?
Any help is appreciated.
Any help is appreciated.
Comments
The bad news is you are gonna have to study the Ardu*no code to figure what the start-up protocol is, and how to position the cursor. Once you get that squared away, you ought to be able to just bang away with ASCII characters.
If so that is an 4x20 HD44780 with an I2c adapter. There is plenty of 4/8
bit BS2 code 4x20 HD44780 without the I2c adapter. Perhaps after reading
a few app notes or watching a few youtube videos, you can convert an 4 bit
parallel program to I2c.
Here is a Nuts Volts Basic Stamp article on I2C. and a forum post on your
problem.
Bill M.
I like Ken Gracy's mill speedo.bs2 (lcd code) as a starting point, or find
Stamp Works.pdf
converter
commands in 4-bit parallel is an simple starting point
for a project.
'========================================================================= ' File...... Parallel_LCD_2X16.bsp ' Purpose... Parallel LCD Display Demo ' Author.... Parallax, Inc. ' E-mail.... support@parallax.com ' {$STAMP BS2p} ' {$PBASIC 2.5} ' -----[ Program Description ]--------------------------------------------- ' This program demonstrates using a Hitachi-compatible Parallel LCD Display ' This code works with the BS2p24, BS2p40, BS2pe and BS2px24 ' -----[ I/O Definitions ]------------------------------------------------- Lcd PIN 0 ' LCD Enable Pin ' -----[ Variables ]------------------------------------------------------- temp VAR Byte char VAR Byte ' -----[ Initialization ]-------------------------------------------------- Init_Lcd: PAUSE 1000 FOR temp = 0 TO 2 LCDCMD Lcd, 48 ' Reset LCD (Send 3 times) PAUSE 5 ' Delay Require By LCD Specs NEXT LCDCMD Lcd, 32 ' Set 4-bit Mode LCDCMD Lcd, 40 ' Set 2-line Mode LCDCMD Lcd, 12 ' Turn On Display With No Cursor LCDCMD Lcd, 6 ' Set To Auto-Increment Cursor LCDCMD Lcd, 1 ' Clear Display ' -----[ Main Routine ]---------------------------------------------------- Main: DO LCDOUT Lcd, 1, ["Hello, this is"] ' Clear LCD & Print Line 1 Text LCDOUT Lcd, 192, ["the LCD demo."] ' Move To Line 2 & Print Text PAUSE 3000 ' Wait A Few Seconds LCDCMD Lcd, 1 ' Clear LCD PAUSE 500 ' Wait 1/2 Second LOOP ' Do It Again END
And to all the other responders... Thanks too!