主题中讨论的其他器件:CC2652RSIP、 PCF8574、 CC2652PSIP、 ENERGIA
工具与软件:
如何连接 I2C 扩展器模块?
如何将 cc2652rsip 与 Newhaven 显示器的 OLED 4x20行连接:
在串行接口中:
如何连接 SDO 和 SDI (单独传入和传出串行数据)
和 MSI 的符号
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具与软件:
如何连接 I2C 扩展器模块?
如何将 cc2652rsip 与 Newhaven 显示器的 OLED 4x20行连接:
在串行接口中:
如何连接 SDO 和 SDI (单独传入和传出串行数据)
和 MSI 的符号
你好、Kumaravel
如何将 cc2652rsip 与 Newhaven 显示器连接 OLED 4x20行
您是否在使用类似这样的东西? https://newhavendisplay.com/4x20-character-green-oled-module
如何连接 SDO 和 SDI (串行数据输入和输出是单独的)
您应该使用 SPI TI 驱动程序。 SimpleLink 器件充当 Newhaven 从/外设的主/控制器、因此 CC2652RSIP MOSI <--> Newhaven SDI 和 CC2652RSIP MISO <--> Newhaven SDO。 您可以从 TI 驱动程序示例开始 作为开发基准。 请注意、我不建议使用 Display 驱动程序、因为它并非有意基于这种类型的显示屏进行开发。
此致、
Ryan
在 SPI TI 驱动程序中、存在 适用于 cc2652器件的 SPICC26XXDMA.h 文件。 我们可以使用它吗?
#include <SPI.h> // Pin Definitions #define RS_PIN 4 // Data/Command select #define SCLK_PIN 13 // SPI Clock #define SID_PIN 12 // SPI Data (MOSI) void sendCommand(uint8_t command) { digitalWrite(RS_PIN, LOW); // RS = 0 for command SPI.transfer(command); } void sendData(uint8_t data) { digitalWrite(RS_PIN, HIGH); // RS = 1 for data SPI.transfer(data); } void initDisplay() { // Initialize SPI SPI.begin(); pinMode(RS_PIN, OUTPUT); // Display initialization sequence sendCommand(0x28); // Function set: 4-bit mode, 2 lines, 5x8 dots sendCommand(0x08); // Display off sendCommand(0x01); // Clear display sendCommand(0x06); // Entry mode set: Increment cursor sendCommand(0x0C); // Display on, cursor off, blink off } void displayText(const char* text) { while (*text) { sendData(*text++); } } void setup() { initDisplay(); displayText("Hello, World!"); } void loop() { // You can add code to update the display here }
此代码是否会运行并通过 Code Composer 进行刷写?请说明连接显示命令代码的步骤。
我已经提到了 I2C TI 驱动程序、您应该参考该驱动程序以便与 PCF8574 I/O 扩展器进行通信。 您应仔细查看该器件的数据表、并进行相应的硬件连接。 如欲咨询 PCF8574、您可以联系接口论坛、或咨询基于 CC2652RSIP 的编码问题、请访问无线论坛(例如此论坛)。
SPI TI 驱动程序将自动为 CC2652RSIP 项目使用 SPICC26X2DMA.c/h 文件。 您引用的代码来源于 Energia 或 Arduino、因此不适用于 SimpleLink F2 SDK 或 CCS。
此致、
Ryan