Circuit Documentation
Summary
This circuit integrates an Arduino Leonardo with two LCD modules: a generic LCD 16x2 (Wokwi Compatible) and an LCM1602 IIC module. The Arduino Leonardo serves as the microcontroller, controlling the LCD displays via I2C communication. The LCM1602 IIC module is used as an interface between the Arduino and the generic LCD, facilitating easier communication through the I2C protocol. The circuit is designed to display text on the LCD screen.
Component List
Arduino Leonardo (Rev3b)
- Microcontroller board based on the ATmega32u4
- Offers 20 digital input/output pins (of which 7 can be used as PWM outputs and 12 as analog inputs)
- Features I2C (TWI) and SPI communication
- Operates at 5V
LCD 16x2 (Wokwi Compatible)
- A 16x2 character LCD display
- Operates at 5V
- Includes backlight and contrast adjustment pin
LCM1602 IIC
- An LCD interface module with I2C communication
- Simplifies the connection between the LCD and microcontroller
- Includes pins for backlight control
Wiring Details
Arduino Leonardo (Rev3b)
GNDconnected to LCM1602 IICGND5Vconnected to LCM1602 IICVCCSDAconnected to LCM1602 IICSDASCLconnected to LCM1602 IICSCL
LCD 16x2 (Wokwi Compatible)
VSSconnected to LCM1602 IICKVDDconnected to LCM1602 IICAV0connected to LCM1602 IICD7RSconnected to LCM1602 IICD6RWconnected to LCM1602 IICD5Econnected to LCM1602 IICD4D0connected to LCM1602 IICD3D1connected to LCM1602 IICD2D2connected to LCM1602 IICD1D3connected to LCM1602 IICD0D4connected to LCM1602 IICED5connected to LCM1602 IICRWD6connected to LCM1602 IICRSD7connected to LCM1602 IICV0Aconnected to LCM1602 IICVDDKconnected to LCM1602 IICVSS
LCM1602 IIC
LED_Aconnected toLED_B(Backlight control)
Documented Code
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
lcd.begin();
}
void loop() {
lcd.setCursor(0, 0);
lcd.print("TEST LCD i2C");
lcd.setCursor(0, 1);
lcd.print("KelasRobot.com");
}
Code Description
- The code is written for the Arduino Leonardo using the
LiquidCrystal_I2Clibrary. - It initializes an
lcdobject with the I2C address0x27for a 16x2 LCD. - In the
setup()function, it begins communication with the LCD. - The
loop()function sets the cursor to the beginning of the first line and prints "TEST LCD i2C". - It then sets the cursor to the beginning of the second line and prints "KelasRobot.com".
- This loop runs indefinitely, updating the display with the static text.
