简体   繁体   中英

STM32 with LCD 2004 + I2C, can't communicate

I am using a STM32F030F4P6 MCU and a LCD 2004 with PCF8574T I2C display driver. I have tried the library from this tutorial: https://controllerstech.com/interface-lcd-16x2-with-stm32-without-i2c/ . I have found a datasheet for the PCF8574T device, but there are no commands specified in there. I am quite new in the field, but I already communicated with other devices over I2C and SPI and got them to work. Can somebody tell me what I am doing wrong, or at least show me where to get a datasheet with commands for the device? I am sorry in advance if this is a noob question.

  1. As already mentioned, PCF8574T - is an i2c expander. So you need to write a driver which manipulates data pins on PCF8574T in way described in tutorial you found.
  2. Check the arduino code for this type of LCD. It may save your time/ https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library
  3. If you have an Arduino board, you can test your LCD according this tutorial https://create.arduino.cc/projecthub/Arnov_Sharma_makes/lcd-i2c-tutorial-664e5a Nice to know that your device still alive before debug the code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM