Arduino UNO R3 + PCF8574P + HD44780

I discovered there are two different libraries available for the I2C LCD with a PCF8574.

The first is the one Mario H. uses as well and looks like this:

The second is used by DFRobot and other suppliers:

The lower and higher nibble are swapped on the display pins...

The lower and higher nibble are swapped on the display pins...

That's why a statement such as this is used. You have to use your pin numbers, in the proper order, inside the parentheses.

myLCD LiquidCrystal_I2C ( 0x20, 4, 5, 6, 0, 1, 2, 3, 7, POSITIVE );

This would be easier to do if there were appropriate comments preceding and following the statement.

//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here

Don

Edit: I hope they both have fixed their backlight circuits by now.

I hope they both have fixed their backlight circuits by now.

It actually will work for switching purposes. It just isn't optimal.

Won't it work even better with the transistor wired in correctly?

Don

Won't it work even better with the transistor wired in correctly?

It would have worked considerably better for linear applications.

It also works better for switching applications but not terribly much.

Wonderzoek:
I discovered there are two different libraries available for the I2C LCD with a PCF8574.

The second is used by DFRobot and other suppliers:

The lower and higher nibble are swapped on the display pins...

I use this and it works!

I still have problems with that transistor.

Don

floresta:
I still have problems with that transistor.

Don

+1

floresta:
I still have problems with that transistor.

Don

I use PNP Transistor BC557. 10 Ohm between Emitter (BC557) and LED+. 1K between P3 (PCF8574P) and Base (BC557).

For Arduino and LCD (without PCF8574P), i use NPN Transistor BC547.

Which lead is the emitter and what is it connected to?

Don

floresta:
That's why a statement such as this is used. You have to use your pin numbers, in the proper order, inside the parentheses.

myLCD LiquidCrystal_I2C ( 0x20, 4, 5, 6, 0, 1, 2, 3, 7, POSITIVE );

[/quote]
Which library do you use? The libraries of Mario H. and DFRobot don't provide the ablitiy to provide specific IO pins for the outputs.

This is the declaration of the .begin statement.

void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS );

@floresta: Google is your best friend

@Wonderzoek

@floresta: Google is your best friend

Are you serious?

Don

Google??? Doesn't everyone use 'Archie'?

Don

floresta:
@Wonderzoek

@floresta: Google is your best friend

Are you serious?

Don

I think he meant well! :smiley:

I forgot to answer this part.

Which library do you use?

I don't use any library, I write all of my own code from scratch, usually in assembly language.

The libraries of Mario H. and DFRobot don't provide the ablitiy to provide specific IO pins for the outputs.

I don't know anything about those libraries and since you didn't include a link, and since I have obviously never heard of Google, I gave you an example based upon a library that I am familiar with.

This is the declaration of the .begin statement.

The .begin statement gives the library information about the characteristics of the display but does not give it information about the interconnections between the display and the Arduino.

Don

The library by Mario H. is the one that's published in the Arduino Playground. On several sites where I2C LCD's are sold, you can also download a library but 9 out of 10 they are the DFRobot library.

Concerning my response about Google: You asked about which lead is the emitter on the transistor. I just tried to be smart. XD

The library by Mario H. is the one that's published in the Arduino Playground. On several sites where I2C LCD's are sold, you can also download a library but 9 out of 10 they are the DFRobot library.

You still haven't bothered to post a link (HTML Links Hyperlinks).

You asked about which lead is the emitter on the transistor.

There were several references to the wiring of the transistor posted before I asked this rhetorical question (Rhetorical question - Wikipedia). If you really comprehended what was going on you would have pointed your response toward a more appropriate party.

Don

The DF circuit is fine If the transistor was an NPN as the LCD backlight doesn't need more than 4 volts to work properly, The emitter follower actually is a blessing there as full 5V isn't required. a PNP connected properly (Emitter more positive than collector and emitter and the base -.6 V with respect to the emitter you have a full on high current switch. I do agree though it is more likely the mistake of the draftsman or engineer who did the drawing because it either is the wrong symbol or miswired.

Bob

The DF circuit is fine If the transistor was an NPN ...

But the transistor is labeled as a PNP and it is drawn as a PNP so why keep giving excuses that this incorrect circuit has no problems. I have been ignoring the fact that there is no current limiting resistor because there is an outside possibility that there is one on the display PC board.

Don