STM32与LCD 2004+ i2c,可以交流

发布于 2025-01-18 20:31:15 字数 393 浏览 5 评论 0 原文

我使用的是 STM32F030F4P6 MCU 和带有 PCF8574T I2C 显示驱动程序的 LCD 2004。我已经尝试过本教程中的库:https://controllerstech。 com/interface-lcd-16x2-with-stm32-without-i2c/。我找到了 PCF8574T 设备的数据表,但其中没有指定命令。我是该领域的新手,但我已经通过 I2C 和 SPI 与其他设备进行通信并让它们工作。有人可以告诉我我做错了什么,或者至少告诉我在哪里可以获取包含设备命令的数据表吗?如果这是一个菜鸟问题,我提前表示抱歉。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

漆黑的白昼 2025-01-25 20:31:15
  1. 如前所述,PCF8574T-是I2C扩展器。因此,您需要编写一个驱动程序,该驱动程序以您发现的教程中描述的方式操纵PCF8574T上的数据引脚。
  2. 检查此类LCD的Arduino代码。它可以节省您的时间/ https://github.com/fithub.com/fdebrabander/fdebrabander/arduino-liquidcriqrystal--- i2c-library
  3. 如果您有Arduino板,则可以根据此教程 https://create.arduino.cc/projecthub/arnov_sharma_makes/lcd-i2c-tutorial-664e5a
    很高兴知道您的设备在调试代码之前还活着。
  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.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文