ActivityBot HD44780 PCF8574 i2c lcd text not displaying
LosDavidos
Posts: 7
Hi
I connected HD44780 lcd via PCF8574T and I'm trying to send some text to display but it's not workig.
I can manage display (trun on/off backlight, set cursor), but when I'm sending text nothing happens.
I found libraries with description that it should work but it's not.
My code
I tried this display on arduino and it's working fine.
I connected HD44780 lcd via PCF8574T and I'm trying to send some text to display but it's not workig.
I can manage display (trun on/off backlight, set cursor), but when I'm sending text nothing happens.
I found libraries with description that it should work but it's not.
My code
#include "i2ceasy.h"
#include "simpletools.h"
#include "i2clcd.h"
i2ceasy *i2cbus;
i2clcd *lcd2004;
int main()
{
i2cbus = i2c__init(4, 5); // SCL pin, SDA pin
lcd2004 = lcd_init(0x27, 2, 16);
lcd_backlightOn();
lcd_setCursor(0, 0);
lcd_print("Text line 1");
lcd_setCursor(1, 0);
lcd_print("Text line 2");
pause(5000);
lcd_backlightOff();
}
I tried this display on arduino and it's working fine.
Comments
http://obex.parallax.com/object/775
http://obex.parallax.com/object/776
That's everything I made. I expect it's not working, because I don't have pull up resistor like Hal said.
Can you tell me how should I calculate resistance, or where I should look for?
but still not working
With the project open in SimpleIde click on the Projects Icon and from the drop down click on Zip. Provide a descriptive name and press save. Then attach the zip file to your post here. This way we can see how your project is set up, which modules are included and how they interact. It will also allow us to see any errors and warnings at compile time.
Chris' post has me wondering if the I2C backpack connections are standard or up to the whims of the designer. I have a 20 x 4 lcd module with a 12c backpack and the connections from the PCF8574T are as follows:
1 +5 (A0)
2 +5 (A1)
3 +5 (A2)
4 RS
5 RW
6 EN
7 BL
8 Gnd
9 DB4
10 DB5
11 DB6
12 DB7
13 n/c (/INT)
14 SCL
15 SDA
16 +5
As best as I can tell the i2clcd.h file does define the control lines RS, RW, EN, and BL accordingly.
I'm now wondering if the your backpack may be wired differently.
Also, the address used in the program, 0x39 would indicate addressing a PCF8574AT device with A0 hi and A1 & A2 low. Your device may or may not be the 'A' device. You should check the connections from the backpack to the lcd module and positively determine what the connections are and which device is on the backpack, PCF8574T or PCF8574AT, the addresses are different.
I made zip. It's in attachement.
My backpack is PCF8574T. I made tests on arduino and it's working, so I tought it could works same on activitybot. Address used in program is 0x27, I checked it. My lcd module is 16x2 and it's described like this (1-16):
VSS
VDD
V0
RS
RW
E
D0
D1
D2
D3
D4
D5
D6
D7
A
K
This code is in Spin, but easy to understand.
These are the program constants: