Arduino IIC/I2C/TWI 1602 Serial LCD Module
arnold113
Posts: 43
I'm new to the Basic Stamp 2, so I've got a lot to learn. I bought the Arduino serial lcd display before I knew what I was doing. I hope you can help me. Can this I2C module be used with the BS2? Money is tight around here so I need to be able to use it if possible. If it can be used, then please help me understand how to write the program to com with it.
Thanks for your help Arnold
Thanks for your help Arnold
Comments
If it's I2C, it's "serial", just not asynchronous serial.
It's possible that you could use it with a BS2, but that will require bit-banging.
That could be kind of slow.
So, more details, please (provide that link.)
and if it's the HD44780-type display driver on it
I'd be tempted to remove that red piggyback board and use it in 4-bit parallel mode, examples of which are many.
http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol5/col/nv115.pdf
Thanks again.
Arnold
It is your decision , but I do not see how using I2C protocol would "slow down" the LCD display to be of concern in your application.
Actually - I2C would be faster than "recomeneded" maximum RS232 serial speed of 9600 bauds for BS. This recomended max speed limitation should not apply to transmit speed. There is a I2C speed parameter somewhere in Parallax decumentation.
Both protocols should be OK for LCD updates.
Also keeep in mind that the 1602 "driver" firmware is the one actually updating the display.
Thanks again
Arnold
PS I'm using the I[EMAIL="I@C"]2C[/EMAIL] serial bd.
There's not a generic, quick and easy way to just transpose all that into I2C LCD subroutines.
If you have a link to your specific LCD's example code and/or its datasheet then please post links to all of that.
LCD Display Blue/Yellow: I2C/TWI Interface
terry@yourduino.com */
/*
( Import needed libraries )
*/
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
/*
( Declare Constants )
*/
/*
( Declare objects )
*/
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27
/*
( Declare Variables )
*/
void setup() /*----( SETUP: RUNS ONCE )----*/
{
Serial.begin(9600);
lcd.init(); // initialize the lcd
lcd.backlight();
// Print a message to the LCD.
lcd.setCursor(0, 0);
lcd.print("2-Line DISPLAY");
delay(1500);
lcd.setCursor(0, 1);
lcd.print("YourDuino: HI!");
}/*--(end setup )---*/
void loop() /*----( LOOP: RUNS CONSTANTLY )----*/
{
{
// when characters arrive over the serial port...
if (Serial.available()) {
// wait a bit for the entire message to arrive
delay(100);
// clear the screen
lcd.clear();
// read all the available characters
while (Serial.available() > 0) {
// display each character to the LCD
lcd.write(Serial.read());
}
}
}
}/* --(end main loop )-- */
/*
( Declare User-written Functions )
*/
/* ( THE END ) */
Any help, Any one???
Thanks
http://arduino-info.wikispaces.com/LCD-Blue-I2C
it looks like that YwRobot board could be removed and the display then used in a/its ("native") 4-bit parallel fashion, as I surmised last year.
[The desoldering operation requires some skill.]
Then you could use it, basically, as described in the following link
http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/lcd2x16par.pdf
That's a 2x16 and you have a 4x20, the only difference being in accessing the rows. If you get that far, post your questions about that then.
Barring that, an Arduino clone can be had for around $20.