SlideShare a Scribd company logo
1 of 24
Active Learning Assignment
Sub:- Microcontroller and
Interfacing
Topic:- LCD Interfacing with
ATMega32
Branch :- Electronics & Communication
Arshiya Maniar 130120111014
Zulin Patel 130120111021
Riya Simon 130120111024
Faculty-In-charge
Prof. Hardik Patel
 Displays
 LCD displays
 Advantages of LCD displays
 Pin description of LCD
 LCD command codes
 Sending commands and data to LCD
 Sending 8-bit data to LCD
 Programming in ‘C’ language
 References
 If keyboard are the predominant means of interface to human input,
then visible displays are the universal means of human output.
 Displays can be grouped in to three broad categories:
1) Single light (e.g. LED Indicators)
2) Single character (e.g. seven segment display)
3) Intelligent alphanumeric (e.g. LCD display)
 LCD (Liquid Crystal Display) type displays, provide a very
convenient way of displaying information or digital data in the
form of numbers, letters or even alpha-numerical characters.
 LCD displays have one major advantage over similar LED types in
that they consume much less power.
 Nowadays both LCD and LED displays are combined together to
form larger Dot-Matrix Alphanumeric type displays which can
show letters and characters as well as numbers in standard Red or
Tri-color outputs.
 LCD’s are finding widespread use replacing seven segment LEDs or
multisegment LEDs. This is due to following reasons:
 The declining prices of LCDs.
 The ability to display number, character, and graphics.
 Incorporation of a refreshing controller into the LCD, thereby
relieving the CPU of the task of refreshing the LCD.
 Ease of programming for characters and graphics.
Pin No. Name Description
1 VSS Power supply (GND)
2 VCC Power supply (+5V)
3 VEE Power supply to control Contrast
4 RS 0 = Instruction input / 1 = Data input
5 R/W 0 = Write to LCD module / 1 = Read from LCD module
6 EN Enable signal
7 D0 Data bus line 0 (LSB)
8 D1 Data bus line 1
9 D2 Data bus line 2
10 D3 Data bus line 3
11 D4 Data bus line 4
12 D5 Data bus line 5
13 D6 Data bus line 6
14 D7 Data bus line 7 (MSB)
Code (Hex) Command to LCD Instruction (Register)
1 Clear display
2 Return home
4 Decrement cursor (shift cursor to left)
6 Increment cursor (shift cursor to right)
5 Shift display right
7 Shift display left
8 Display off, cursor off
A Display off, cursor on
C Display on, cursor off
E Display on, cursor blinking
F Display on, cursor blinking
10 Shift cursor position to left
14 Shift cursor position to right
18 Shift the entire display to the left
1C Shift the entire display to the right
80 Force cursor to beginningof first line
C0 Force cursor to beginning of second line
28
38


• To write “Hello” on the LCD using 8-bit data.
LCD Connections for 8-bit Data
LCD PROGRAMMING IN ASSEMBLY LANGUAGE
. INCUDE “M32DEF.INC”
.EQU LCD_DPRT = PORTA
.EQU LCD_DDDR = DDRA
.EQU LCD_DPIN = PINA
.EQU LCD_CPRT = PORTB
.EQU LCD_CDDR = DDRB
.EQU LCD_CPIN = PINB
.EQU LCD_RS = 0
.EQU LCD_RW = 1
.EQU LCD_EN = 2
LDI R21, HIGH (RAMEND)
OUT SPH,R21
LDI R21,LOW (RAMEND)
LDI SPL,R21
LCD programming in ‘C’ language
#include<avr/io.h>
#include<util/delay.h>
#define lcd_data PORTA // LCD data port
#define ctrl PORTB
#define en PB2 // enable signal
#define rw PB1 // read or write signal
#define rs PB0 // register select signal
void lcd_cmd(unsigned char cmd);
void init_lcd(void);
void lcd_write(unsigned char data);
int main()
{
DDRA=0xFF;
DDRB=0x07;
init_lcd(); // initialization of LCD
_delay_ms(50); // delay of 50ms
lcd_write_string(“Hello"); // prints string on LCD
return 0;
}
void init_lcd(void)
{
lcd_cmd(0x38); // LCD initialization
_delay_ms(1);
lcd_cmd(0x01); // clear LCD
_delay_ms(1);
lcd_cmd(0x0E); // cursor ON
_delay_ms(1);
lcd_cmd(0x80); // ---8 go to first line and --0 is for 0th position
_delay_ms(1);
return;
}
void lcd_cmd(unsigned char cmd)
{
lcd_data=cmd;
ctrl =(0<<rs)|(0<<rw)|(1<<en);
_delay_ms(1);
ctrl =(0<<rs)|(0<<rw)|(0<<en);
_delay_ms(50);
return;
}
void lcd_write(unsigned char data)
{
lcd_data= data;
ctrl = (1<<rs)|(0<<rw)|(1<<en);
_delay_ms(1);
ctrl = (1<<rs)|(0<<rw)|(0<<en);
_delay_ms(50);
return ;
}
void lcd_write_string(unsigned char *str) //store address value of the string in pointer
*str
{
int i=0;
while(str[i]!='0‘) // loop will go on till the NULL character in the string
{
lcd_write(str[i]); // sending data on LCD byte by byte
i++;
}
return;
}
 AVR microcontroller and embedded system – Muhammad Ali
Mazidi, Sepehr Naimi, and Sarmad Naimi.
 The 8051 microcontroller architecture, programming and its
applications – Kenneth J Ayala of Western Carolina University.
 http://www.electronics-tutorials.ws/ LCDdisplay/bin_3.html
Lcd interface with atmega32 avr best.ppt

More Related Content

Similar to Lcd interface with atmega32 avr best.ppt

2022-BEKM 3453 - LCD and keypad.pdf
2022-BEKM 3453 - LCD and keypad.pdf2022-BEKM 3453 - LCD and keypad.pdf
2022-BEKM 3453 - LCD and keypad.pdfVNEX
 
AVR_Course_Day5 avr interfaces
AVR_Course_Day5 avr interfacesAVR_Course_Day5 avr interfaces
AVR_Course_Day5 avr interfacesMohamed Ali
 
jbptunikompp-gdl-syahrul-23476-14-14-inter-y.ppt
jbptunikompp-gdl-syahrul-23476-14-14-inter-y.pptjbptunikompp-gdl-syahrul-23476-14-14-inter-y.ppt
jbptunikompp-gdl-syahrul-23476-14-14-inter-y.pptlcaimi1
 
SIMPLE Frequency METER using AT89c51
SIMPLE Frequency METER using AT89c51 SIMPLE Frequency METER using AT89c51
SIMPLE Frequency METER using AT89c51 aroosa khan
 
L14 kb-lcd-interfacing-with-atmega328 p
L14 kb-lcd-interfacing-with-atmega328 pL14 kb-lcd-interfacing-with-atmega328 p
L14 kb-lcd-interfacing-with-atmega328 prsamurti
 
Lcd module interface with xilinx software using verilog
Lcd module interface with xilinx software using verilogLcd module interface with xilinx software using verilog
Lcd module interface with xilinx software using verilogsumedh23
 
m.tech esd lab manual for record
m.tech esd lab manual for recordm.tech esd lab manual for record
m.tech esd lab manual for recordG Lemuel George
 
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...SANTIAGO PABLO ALBERTO
 

Similar to Lcd interface with atmega32 avr best.ppt (20)

LCD Interacing with 8051
LCD Interacing with 8051LCD Interacing with 8051
LCD Interacing with 8051
 
08_lcd.pdf
08_lcd.pdf08_lcd.pdf
08_lcd.pdf
 
Lcd interfacing
Lcd interfacingLcd interfacing
Lcd interfacing
 
Microcontroller part 4
Microcontroller part 4Microcontroller part 4
Microcontroller part 4
 
Lecture mp 7(interface)
Lecture mp 7(interface)Lecture mp 7(interface)
Lecture mp 7(interface)
 
LCD WITH 8051.docx
LCD WITH 8051.docxLCD WITH 8051.docx
LCD WITH 8051.docx
 
2022-BEKM 3453 - LCD and keypad.pdf
2022-BEKM 3453 - LCD and keypad.pdf2022-BEKM 3453 - LCD and keypad.pdf
2022-BEKM 3453 - LCD and keypad.pdf
 
Interfacing with LCD
Interfacing with LCDInterfacing with LCD
Interfacing with LCD
 
report cs
report csreport cs
report cs
 
_LCD display-mbed.pdf
_LCD display-mbed.pdf_LCD display-mbed.pdf
_LCD display-mbed.pdf
 
LCD_Example.pptx
LCD_Example.pptxLCD_Example.pptx
LCD_Example.pptx
 
Arduino based applications part 2
Arduino based applications part 2Arduino based applications part 2
Arduino based applications part 2
 
AVR_Course_Day5 avr interfaces
AVR_Course_Day5 avr interfacesAVR_Course_Day5 avr interfaces
AVR_Course_Day5 avr interfaces
 
jbptunikompp-gdl-syahrul-23476-14-14-inter-y.ppt
jbptunikompp-gdl-syahrul-23476-14-14-inter-y.pptjbptunikompp-gdl-syahrul-23476-14-14-inter-y.ppt
jbptunikompp-gdl-syahrul-23476-14-14-inter-y.ppt
 
SIMPLE Frequency METER using AT89c51
SIMPLE Frequency METER using AT89c51 SIMPLE Frequency METER using AT89c51
SIMPLE Frequency METER using AT89c51
 
L14 kb-lcd-interfacing-with-atmega328 p
L14 kb-lcd-interfacing-with-atmega328 pL14 kb-lcd-interfacing-with-atmega328 p
L14 kb-lcd-interfacing-with-atmega328 p
 
BCD Counter
BCD CounterBCD Counter
BCD Counter
 
Lcd module interface with xilinx software using verilog
Lcd module interface with xilinx software using verilogLcd module interface with xilinx software using verilog
Lcd module interface with xilinx software using verilog
 
m.tech esd lab manual for record
m.tech esd lab manual for recordm.tech esd lab manual for record
m.tech esd lab manual for record
 
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
 

Recently uploaded

Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfSkNahidulIslamShrabo
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdfAlexander Litvinenko
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsMathias Magdowski
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfragupathi90
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualBalamuruganV28
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxMustafa Ahmed
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisDr.Costas Sachpazis
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdfKamal Acharya
 
Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfKira Dess
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUankushspencer015
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...IJECEIAES
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Studentskannan348865
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Stationsiddharthteach18
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfEr.Sonali Nasikkar
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
Software Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdfSoftware Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdfssuser5c9d4b1
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxKarpagam Institute of Teechnology
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksIJECEIAES
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptamrabdallah9
 
History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationEmaan Sharma
 

Recently uploaded (20)

Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdf
 
Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdf
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Students
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Station
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Software Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdfSoftware Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdf
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networks
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.ppt
 
History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & Modernization
 

Lcd interface with atmega32 avr best.ppt

  • 1. Active Learning Assignment Sub:- Microcontroller and Interfacing Topic:- LCD Interfacing with ATMega32 Branch :- Electronics & Communication
  • 2. Arshiya Maniar 130120111014 Zulin Patel 130120111021 Riya Simon 130120111024 Faculty-In-charge Prof. Hardik Patel
  • 3.
  • 4.  Displays  LCD displays  Advantages of LCD displays  Pin description of LCD  LCD command codes  Sending commands and data to LCD  Sending 8-bit data to LCD  Programming in ‘C’ language  References
  • 5.  If keyboard are the predominant means of interface to human input, then visible displays are the universal means of human output.  Displays can be grouped in to three broad categories: 1) Single light (e.g. LED Indicators) 2) Single character (e.g. seven segment display) 3) Intelligent alphanumeric (e.g. LCD display)
  • 6.  LCD (Liquid Crystal Display) type displays, provide a very convenient way of displaying information or digital data in the form of numbers, letters or even alpha-numerical characters.  LCD displays have one major advantage over similar LED types in that they consume much less power.  Nowadays both LCD and LED displays are combined together to form larger Dot-Matrix Alphanumeric type displays which can show letters and characters as well as numbers in standard Red or Tri-color outputs.
  • 7.  LCD’s are finding widespread use replacing seven segment LEDs or multisegment LEDs. This is due to following reasons:  The declining prices of LCDs.  The ability to display number, character, and graphics.  Incorporation of a refreshing controller into the LCD, thereby relieving the CPU of the task of refreshing the LCD.  Ease of programming for characters and graphics.
  • 8.
  • 9. Pin No. Name Description 1 VSS Power supply (GND) 2 VCC Power supply (+5V) 3 VEE Power supply to control Contrast 4 RS 0 = Instruction input / 1 = Data input 5 R/W 0 = Write to LCD module / 1 = Read from LCD module 6 EN Enable signal 7 D0 Data bus line 0 (LSB) 8 D1 Data bus line 1 9 D2 Data bus line 2 10 D3 Data bus line 3 11 D4 Data bus line 4 12 D5 Data bus line 5 13 D6 Data bus line 6 14 D7 Data bus line 7 (MSB)
  • 10. Code (Hex) Command to LCD Instruction (Register) 1 Clear display 2 Return home 4 Decrement cursor (shift cursor to left) 6 Increment cursor (shift cursor to right) 5 Shift display right 7 Shift display left 8 Display off, cursor off A Display off, cursor on C Display on, cursor off E Display on, cursor blinking F Display on, cursor blinking
  • 11. 10 Shift cursor position to left 14 Shift cursor position to right 18 Shift the entire display to the left 1C Shift the entire display to the right 80 Force cursor to beginningof first line C0 Force cursor to beginning of second line 28 38
  • 12.
  • 13.
  • 14. • To write “Hello” on the LCD using 8-bit data. LCD Connections for 8-bit Data
  • 15. LCD PROGRAMMING IN ASSEMBLY LANGUAGE . INCUDE “M32DEF.INC” .EQU LCD_DPRT = PORTA .EQU LCD_DDDR = DDRA .EQU LCD_DPIN = PINA .EQU LCD_CPRT = PORTB .EQU LCD_CDDR = DDRB .EQU LCD_CPIN = PINB .EQU LCD_RS = 0 .EQU LCD_RW = 1 .EQU LCD_EN = 2 LDI R21, HIGH (RAMEND) OUT SPH,R21 LDI R21,LOW (RAMEND) LDI SPL,R21
  • 16.
  • 17.
  • 18.
  • 19. LCD programming in ‘C’ language #include<avr/io.h> #include<util/delay.h> #define lcd_data PORTA // LCD data port #define ctrl PORTB #define en PB2 // enable signal #define rw PB1 // read or write signal #define rs PB0 // register select signal void lcd_cmd(unsigned char cmd); void init_lcd(void); void lcd_write(unsigned char data);
  • 20. int main() { DDRA=0xFF; DDRB=0x07; init_lcd(); // initialization of LCD _delay_ms(50); // delay of 50ms lcd_write_string(“Hello"); // prints string on LCD return 0; } void init_lcd(void) { lcd_cmd(0x38); // LCD initialization _delay_ms(1); lcd_cmd(0x01); // clear LCD _delay_ms(1);
  • 21. lcd_cmd(0x0E); // cursor ON _delay_ms(1); lcd_cmd(0x80); // ---8 go to first line and --0 is for 0th position _delay_ms(1); return; } void lcd_cmd(unsigned char cmd) { lcd_data=cmd; ctrl =(0<<rs)|(0<<rw)|(1<<en); _delay_ms(1); ctrl =(0<<rs)|(0<<rw)|(0<<en); _delay_ms(50); return; }
  • 22. void lcd_write(unsigned char data) { lcd_data= data; ctrl = (1<<rs)|(0<<rw)|(1<<en); _delay_ms(1); ctrl = (1<<rs)|(0<<rw)|(0<<en); _delay_ms(50); return ; } void lcd_write_string(unsigned char *str) //store address value of the string in pointer *str { int i=0; while(str[i]!='0‘) // loop will go on till the NULL character in the string { lcd_write(str[i]); // sending data on LCD byte by byte i++; } return; }
  • 23.  AVR microcontroller and embedded system – Muhammad Ali Mazidi, Sepehr Naimi, and Sarmad Naimi.  The 8051 microcontroller architecture, programming and its applications – Kenneth J Ayala of Western Carolina University.  http://www.electronics-tutorials.ws/ LCDdisplay/bin_3.html

Editor's Notes

  1. The declining prices of LCDs The ability to display number, character, and graphics. This is in contrast to LEDs, which are limited to numbers and a few characters. Incorporation of a refreshing controller into the LCD, thereby relieving the CPU of the task of refreshing the LCD. In contrast, the LED must be refreshed by the CPU to keep displaying the data. Ease of programming for characters and graphics.
  2. Rs = register select
  3. Interfacing LCD with atmega32
  4. RAMEND = last location of RAM