In this example, I use PCF8574T module that designed for character LCD interfacing. We can solder this module directly with the LCD. However I put either PCF8574T module and the LCD on a single breadboard.
- GND
- +5V (VDD)
- SCL connects to Arduino pin A5
- SDA connects to Arduino pin A4
It need the LiquidCrystal_I2C.h file that we need to install it. The program will show a simple text display with a little delay between each characters.
//Two-Wire Library #include <Wire.h> #include <LiquidCrystal_I2C.h> //LCD Setting LiquidCrystal_I2C lcd(0x27,16,2); void setup(){ //Initialize the LCD lcd.init(); //Turn on the back light lcd.backlight(); //Blink the cursor lcd.blink(); lcdShow("AKI Technical"); lcd.setCursor(0,1); lcdShow("YouTube Channel"); } void lcdShow(char *txt){ while(*txt){ lcd.print(*txt++); delay(500); } } void loop(){ }
Click here to download its source file.
We can use the ATMega32 to control a 3-Wire SPI LCD module (SN74HC595N chip).
No comments:
Post a Comment