I2C - Display Data on LCD Screen

by daphwl in Circuits > Arduino

8 Views, 0 Favorites, 0 Comments

I2C - Display Data on LCD Screen

FZMR8UIKTUCONH2.jpeg

There are two roles in the operation of I2C, one is “master”, the other is “slave”. Only one master is allowed and can be connected to many slaves. Each slave has its unique address, which is used in the communication between master and the slave. I2C uses two pins, one is for data transmission (SDA), the other is for the clock (SCL). Master uses the SCL to inform slave of the upcoming data transmission, and the data is transmitted through SDA. The I2C example was named “Wire” in the Arduino example.

Ameba RTL8722DM_MINI

Ameba RTL8722DM is a low-power dual-band WLAN and BLE (Bluetooth Low Energy) SoC by Realtek. It also includes memory for Wi-Fi protocol functions and application making it simple for anyone to develop various kind of IoT applications. At the same time, it has a wide range of peripheral interfaces. With all these interfaces, it can connect to most of the electronics components like LEDs, temperature and humidity sensors, and so on

In this project, we will use Adafruit Ultimate GPS Breakout. Its data format is pure text, so we can connect it to USB to TTL Adapter and observe the output.


Supplies

RTL8722DM_MINI x1

I2C 2x16 LCD Screen x1

Setup

I2C - Display Data on LCD Screen.png

Normally there are many pins on an LCD Display, as shown in the LCD picture.

An LCD display can be equipped with an additional processing chip to process the data. The processing chip can connect to a microcontroller using the I2C interface.

Connection

I2C - Display Data on LCD Screen2.png

Connect up the LCD Screen to the Ameba board.

Programming

Open the example in "File" → "Examples" → "AmebaWire" → "LCD_HelloWorld". Compile and upload to Ameba, then press the reset button.

Display Data on LCD Screen6.jpg
Display Data on LCD Screen5.jpg
Display Data on LCD Screen4.jpg

Then you can see "Hello World" in the first line, and Ameba in the second line displayed on the LCD screen.

After 8 seconds, you can input to the Serial Monitor the string you would like to display on the LCD.

For example we enter "123456789" and press "send".

For More Resources

If you need additional technical documents or the source code for this project. Please visit the official websites and join the Facebook group and forum.

Ameba Official Website: https://www.amebaiot.com/en/

Ameba Facebook Group: https://www.facebook.com/groups/amebaioten

Ameba Forum: https://forum.amebaiot.com/