Menu

Adskeeper - header widge

728x90

Search This Blog

468x60

Navbar

AdsKeeper - IAB Display Standard Ad Unit

Tuesday, July 5, 2022

A Simple Two-Wire LCD Programming With Arduino Uno

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.

A Simple Two-Wire LCD Programming With Arduino Uno

Running program

 The connection between the Arduino Uno and the two-wire display module uses only two communication wires, and two power supply pins.

  1. GND
  2. +5V (VDD)
  3. SCL connects to Arduino pin A5
  4. 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.

  1. //Two-Wire Library
  2. #include <Wire.h>
  3. #include <LiquidCrystal_I2C.h>
  4.  
  5. //LCD Setting
  6. LiquidCrystal_I2C lcd(0x27,16,2);
  7.  
  8. void setup(){
  9. //Initialize the LCD
  10. lcd.init();
  11. //Turn on the back light
  12. lcd.backlight();
  13. //Blink the cursor
  14. lcd.blink();
  15.  
  16. lcdShow("AKI Technical");
  17. lcd.setCursor(0,1);
  18. lcdShow("YouTube Channel");
  19. }
  20.  
  21. void lcdShow(char *txt){
  22. while(*txt){
  23. lcd.print(*txt++);
  24. delay(500);
  25. }
  26. }
  27.  
  28. void loop(){
  29.  
  30. }
  31.  

 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

Adskeep- Standard Ads

336x280

DIY Electronic Projects And Instruments

AdsKeeper - 2091654

Labels

23K256 (1) 24C16B (2) 25AA010A (2) 8051 (7) 93AA46B (1) ADC (36) Analog Comparator (1) Arduino (16) ARM (32) AT89C52 (7) ATMega32 (59) ATMega644P (27) AVR (88) AVR PCB (2) Bootloader (1) CCS PICC (31) Change Notify Interrupt (CNI) (2) DAC (2) DHT11 (5) Display (151) Distance Sensor (3) dot matrix (1) ds1307 (10) DS18B20 (6) ds3231 (1) ds3232 (2) dsPIC (7) dsPIC30F1010 (3) dsPIC30F2010 (8) EEPROM (5) Environment Sensor (6) ESP32 (1) esp8266 (1) Graphical LCD (3) HD44780 (7) I2C (38) ILI9341 (1) Input/Output (82) Interrupt (22) IoT PCB (1) Keil (5) Keypad (16) KS0108 (3) LCD (81) LM35 (4) Master/Slave (2) MAX7221 (1) MCP23017 (8) MCP23S17 (7) MCP4921 (1) MCP4922 (2) Meter (3) MikroC (2) MikroC ARM (1) MikroC dsPIC (3) Module PCB (2) Motor (15) MPLABX (73) Nokia 5110 LCD (4) OLED (2) One-Wire (7) Oscillator (8) PCB (13) PCD8544 (3) PCF8574 (10) PIC (111) PIC12F (3) PIC16 (105) PIC16F628A (3) PIC16F630 (2) PIC16F716 (4) PIC16F818 (11) PIC16F818/819 (3) PIC16F84A (16) PIC16F876A (2) PIC16F877A (9) PIC16F88 (2) PIC16F887 (60) PIC18 (19) PIC18F1220 (5) PIC18F2550 (5) PIC18F4550 (12) PICKit2 (1) PICMicro PCB (4) Pin Change Interrupt (1) PWM (12) RTC (12) SBN0064G (1) Sensor (15) SH1106 (3) Shift Register (14) Shift Registers (16) SN74HC595N (4) Software TWI (2) SPI (41) ST7735 (1) STM32 (29) STM32 Black Pill (1) STM32 Blue Pill (12) STM32 HAL (23) STM32CubeIDE (32) STM32F103C8T6 (9) STM32F103R6 (18) STM32F401CCU6 (1) SysTick (7) temperature sensor (15) TFT (1) TG12864A (1) Thermometer (22) Timer/Counter (32) TM1637 (2) twi (10) UART (10) Ultrasonic (4) Voltmeter (7) WDT (1) XC16 (2) XC8 (96)