Interfacing 8051 - Interfacing of ICs with 8051 LCD Pin...

This preview shows page 1 - 10 out of 32 pages.

Interfacing of ICs with 8051 Interfacing of ICs with 8051
Image of page 1

Subscribe to view the full document.

LCD Pin description
Image of page 2
Pin Descriptions for LCD Pin Symbol I/O Description 1 Vss Ground 2 Vcc +5V power supply 3 VEE Power supply to control contrast 4 RS I RS=0 to select command register, RS=1 to select data register 5 R/W I R/W=0 for write, R/W=1 for read 6 E I/O Enable 7 DB0 I/O The 8-bit data bus 8 DB1 I/O The 8-bit data bus 9 DB2 I/O The 8-bit data bus 10 DB3 I/O The 8-bit data bus 11 DB4 I/O The 8-bit data bus 12 DB5 I/O The 8-bit data bus 13 DB6 I/O The 8-bit data bus 14 DB7 I/O The 8-bit data bus 3
Image of page 3

Subscribe to view the full document.

LCD Command Codes Code (Hex) Command to LCD Instruction Register 1 Clear display screen 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 beginning to 1st line C0 Force cursor to beginning to 2nd line 38 2 lines and 5x7 matrix 4
Image of page 4
Interfacing with 8051
Image of page 5

Subscribe to view the full document.

ALP for LCD display An ALP to display “ECE” on LCD ; calls a time delay before sending next data/command ;P1.0-P1.7 are connected to LCD data pins D0-D7 ;P3.1 is connected to RS pin of LCD ;P3.2 is connected to R/W pin of LCD ;P3.0 is connected to E pin of LCD $MOD51 RS EQU P3.1 EN EQU P3.0 RW EQU P3.2 ORG 0000H MOV A,#38H ;INIT. LCD 2 LINES, 5X7 MATRIX LCALL LCD_COMD MOV A,#0EH ;Display on, cursor on LCALL LCD_COMD MOV A,#06H ;Shift cursor right LCALL LCD_COMD MOV A,#01H ;Clear LCD LCALL LCD_COMD
Image of page 6
MOV A,#'E’ ;Display letter E LCALL LCD_ TEXT MOV A,#'C’ ;Display letter C LCALL LCD_ TEXT MOV A,#'E' ;Display letter E LCALL LCD_ TEXT LOOP: SJMP LOOP ; End of program LCD_COMD: CLR C ; Write command LCALL WRITE RET LCD_ TEXT: SETB C ; write data LCALL WRITE RET WRITE: SETB EN CLR RW MOV RS,C MOV P1,A CLR EN LCALL DELAY ;Give LCD some time RET DELAY: MOV R0,#60 LOOP2: MOV R1,#255 LOOP1: DJNZ R1,LOOP1 DJNZ R0,LOOP2 RET END
Image of page 7

Subscribe to view the full document.

Interfacing with key board
Image of page 8
Steps to detect pressed key
Image of page 9

Subscribe to view the full document.

Image of page 10
  • Winter '12
  • praveen
  • Display resolution, 8-bit, mov, Clockwise

{[ snackBarMessage ]}

Get FREE access by uploading your study materials

Upload your study materials now and get free access to over 25 million documents.

Upload now for FREE access Or pay now for instant access
Christopher Reinemann
"Before using Course Hero my grade was at 78%. By the end of the semester my grade was at 90%. I could not have done it without all the class material I found."
— Christopher R., University of Rhode Island '15, Course Hero Intern

Ask a question for free

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern