HD44780 Character LCD: problem with I2C and ST NUCLEO-F401RE #7185
Replies: 1 comment
-
Posted at 2017-08-03 by @gfwilliams Do you have pullup resistors on the I2C pins? That error occurs when there's a problem writing to I2C, so at least at that point, there's no software issue - it'll be some kind of electrical problem. Posted at 2017-08-03 by Blizzard Hi Gordon, Generally I have never used additional pull up resistors with this kind of display and the NUCLEO-F401RE board. Is it possible that the FW\ interpreter has configured the internal device peripheral registers differently (e.g. with internal weak pull-up and pull-down resistors disabled)? Thanks in advance Posted at 2017-08-03 by @gfwilliams You could try using software I2C, which will use the internal pullups I believe. I'm not 100% sure you can enable the pullups on the hardware I2C in Espruino at the moment - although you can always use Posted at 2017-08-03 by Blizzard Hello, Interrogating the getPinMode() function, the B7 and B6 pins are configured as Analog input, Do you have another value of pull up resistor to suggest? | |_ ___ ___ _ ||___ ___
Posted at 2017-08-03 by @MaBecker Hmm 4.7k pull ups woks fine for all i2c devices I have been using so far. Make sure you solder them like this:
to work as pull ups Posted at 2017-08-04 by @gfwilliams Are you sure they're wired up to the correct pins, and that you've called I2C.setup? I notice you haven't posted your code - maybe if you did that we could get some ideas? Posted at 2017-08-04 by Blizzard Hi, Posted at 2017-08-04 by Blizzard Hi Gordon, I2C1.setup({scl:B6, sda:B7}); The HD44780 module is downloaded locally. Regards Posted at 2017-08-04 by @MaBecker Ok, can you use a led and a resistor to check that you use the correct pin Or use a multimeter and check the voltage for that pin. Posted at 2017-08-04 by @gfwilliams Ok, it looks like the PCF8574 has different I2C addresses that are configurable on the LCD. That could be your problem? In the code that you found worked, what I2C address was being used? Posted at 2017-08-04 by Blizzard Hi Gordon, #define SLAVEADDRESS 0x7E I have read that the address of the PCF8574 adapter can also be 0x4E or 0x7E. Thanks in advance Posted at 2017-08-04 by @MaBecker you can try i2cdetect to scan the bus for devices. Posted at 2017-08-04 by Blizzard Hi, Regards Posted at 2017-08-04 by Frida Have you tried:
it seems you have a PCF8574A which have Posted at 2017-08-05 by Blizzard Hi Frida, Regards Posted at 2017-08-06 by Blizzard Hi MaBe, Posted at 2017-08-07 by @gfwilliams Great! Yes, I2C addresses are a bit strange. They're only 7 bits. On Arduino they seem to choose addresses to be 8 bits where the lower bit always has to be zero. On Espruino they're real 7 bit addresses (so they're shifter right by one bit) Posted at 2017-08-07 by Blizzard Hi Gordon, all, By the way, I find JavaScript an interesting and powerful language (although I am not much "in the matter" for the time being). Posted at 2017-08-08 by @gfwilliams I can't recommend anything specific, apart from to say that everyone seems to recommend "JavaScript: The Good Parts". Other people on here may be able to recommend something better though? Posted at 2017-08-08 by Blizzard Thanks a lot! Posted at 2017-08-25 by @allObjects "JavaScript: The Good Parts" is for sure a good reference. The 'pinch of salt' comes by the application to the limited resources of a micro controller environment and the focus / band-with of the application. The language principles do not change... but some of the aspects are not to be applied in a micro controller environment because of different concerns. Posted at 2017-08-27 by Blizzard The
that is also the beauty of using a device with limited resources ... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-08-02 by Blizzard
Hello,
I'm trying to use the LCD Display Module HD44780 (with I2C adapter PCF8574T) with
an ST NUCLEO-F401RE and the Espruino Web IDE.
Running the sample code on the "HD44780 Character LCD" web page I get the following behavior \ error:
I have verified that the I2C interface is working on the same Nucleo board, the same LCD display, and the same SDA, SCL pin
used in your example.
The problem also arises with the previous Espruino version (1v92) in the same way
Could you please help me to solve the issue?
Thanks in advance for your support.
Regards
Beta Was this translation helpful? Give feedback.
All reactions