With i2c, a bi-directional logic level voltage is typically used to convert the voltages to what is needed. There are ways to connect 3v and 5v parts but when the 3v part is not 5v tolerant you must take special precautions as you can't just hook them together. There are several issues that this voltage difference can create including potentially damaging the DUE chip when the DUE is connected to 5v outputs since the DUE is not 5v tolerant - which is one of the reasons I don't like that board. The AVR used on the Uno is 5v and the ARM used on DUE is 3v and NOT 5v tolerant. If the library is the same i2c lcd library on the Uno and the DUE, and it is working on the Uno, and it compiles for DUE, then the library is likely not the reason. Wait, you never said you were having issues on a DUE.Ĭan you take a moment to fully describe your h/w setup? Thanks with +1 for accommodating valuable information in your post. Certainly, I have added Library File which is not compatible with the LCD. Now, I realize why the I2C LCD that works with UNO is not working with DUE. You can read more about it on the github repo: Then you can look at the other hd44780_I2Cexp i/o class examples like HelloWorld, to see what files need to be included and how to declare your lcd object. Once you install hd44780, run the included diagnostic sketch I2CexpDiag to verify that the library and LCD are working. Let the IDE manager do the install rather than using a zip file. Install the hd44780 library package using the IDE library manager. The included hd44780_I2Cexp i/o class can auto locate the i2c address and auto configure the pin mapping so it should "just work" with your backpack. The information in the other forum post by GolamMostafa from the link above makes reference to a library that uses a configurable pin mapping.įor ease of use, I'd recommend using my hd44780 library package. If the pin mapping information is incorrect, then it will not work. However, the user must correctly enter the pin mapping information. This is nice because it allows the library work with any backpack. It uses a different constructor, which contains the pin mapping information. The newLiquidCrystal library by fm, has the ability to configure the pin wiring. If the wiring used on the backpack is different than what the library assumes, it will not work even if the correct i2c address is used. If the backpack uses the specific wiring that the library assumes, then all that is necessary is to get the I2C address correct. It appears to be using/expecting the LiquidCrystal_I2C library available through the IDE library manager. The sample code shown in the original post is using a LiquidCrystal_I2C library that assumes a particular pin wiring between the PCF8574 and the LCD. They don't all work the same and they have different capabilities. This means that even if the Arduino library is given the correct i2c address it still may not work if the library also does not know how the PCF8574 output port pins are wired up to the hd44780 LCD interface pins.Īdding to the confusion is there are multiple LiquidCrystal_I2C libraries. As a result different backpack manufacturers wire them up in different ways and use different backlight control circuits. This is because there is no standard for how the PCF8574 is wired up to the LCD or how to control the backlight. Just getting the i2c address may not be enough.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |