For the uLCD-32PTU, note that there are already on-board pull-up resistors for the SDA and SCL pins. For the user-mappable I2C ports of the uLCD-35DT, the user has to provide the pull-up resistors externally. Again, consult the datasheet for your target display module for more specific information.
There are several files included in this codebase example. The files are as follows:
Picaso Designer Project | Diablo16 Designer Project | Corresponding Arduino Sketch |
I2CmasterWriter_R_1_0.4dg | I2CmasterWriter_R_1_0b.4dg | slave_receiver_R_1_0.ino |
I2CmasterReader_R_1_0.4dg | I2CmasterReader_R_1_0b.4dg | slave_sender_R_1_0.ino |
1. Compile the Designer project and upload the program to the target display module. Refer to the table above to determine the project for your target display module.
2. Compile the Arduino sketch and upload the program to the target Arduino board. Refer to the table above to determine the correct sketch for the chosen Designer project.
3. Connect the display module to the Arduino board properly. See the attached schematic diagrams.
4. Power on both the display module and the Arduino board.
For the I2C-master-writer-and-slave-receiver setup, the Arduino board should be able to print to the serial monitor the values of the variable x.2. Compile the Arduino sketch and upload the program to the target Arduino board. Refer to the table above to determine the correct sketch for the chosen Designer project.
3. Connect the display module to the Arduino board properly. See the attached schematic diagrams.
4. Power on both the display module and the Arduino board.
For the I2C-master-reader-and-slave-sender setup, the display module should be able to print the correct string on the screen.
See the videos for the expected output. Ideally, the I2C slave device (the Arduino board) should be up and running before the I2C master device (the display module) starts sending messages.
I2C-master-writer-and-slave-receiver setup: the display module (I2C master) writes to the Arduino board (I2C slave). The Arduino board receives the data and sends them to the serial monitor on the PC.
I2C-master-reader-and-slave-sender setup: the display module (I2C master) reads from the Arduino board (I2C slave). The display module then prints the received data on the screen.