1 / 12

LCD INTERFACING

LCD INTERFACING. LCD OPERATION. LCD replaces LEDs Declining prices Ability to display numbers, characters and graphics Incorporation of a refreshing controller into the LCD Relieves the CPU from refreshing task Ease of programming for characters and graphics. LCD PIN DESCRIPTIONS.

elsa
Download Presentation

LCD INTERFACING

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LCD INTERFACING

  2. LCD OPERATION LCD replaces LEDs Declining prices Ability to display numbers, characters and graphics Incorporation of a refreshing controller into the LCD Relieves the CPU from refreshing task Ease of programming for characters and graphics.

  3. LCD PIN DESCRIPTIONS 14 pins 1 – Vss , Ground 2 - Vcc , +5V 3 – VEE, for controlling LCD contrast 4 – RS, Register Select, input pin two important registers inside LCD – Command Register and Data Register. RS pin is used for the selection of these registers RS = 0 to select command register, allows user to send command such as clear display, cursor at home etc. RS = 1 to select data register allows the user to send data to be displayed on the LCD

  4. 5 – R/W • Input pin • Allows the user to write information to LCD or read information from it. • R/W = 0 for write, =1 for read 6 – E, I/O, Enable • To latch information presented to its data pins • A high to low pulse must be applied to this pin to latch information. • Minimum duration 450ns.

  5. 7 – 14, data pins, DB0 – DB7, I/O • Used to send information to LCD or to read contents of LCD’s internal registers • To display letters and numbers we send ASCII codes for the letters A - Z, a – z, and numbers 0 -9 to these pins while Rs = 1. • Use RS = 0 to check the busy flag to see if LCD is ready to receive information. • Busy flag is D7 and can be read when R/W = 1, RS = 0 • When D7 = 1, LCD is busy and D7 = 0 LCD is ready to receive new information.

  6. LCD INTERFACING DIAGRAM

  7. SENDING COMMANDS AND DATA TO LCD’S To send any command to LCD make pin RS = 0, for data RS = 1 Send a high to low pulse to E pin P1.0 to P1.7 are connected to LCD data pins P2.0 is connected to RS pin P2.1 is connected to R/W pin P2.2 is connected to E pin

  8. PROGRAMME MOV A,#38H LCD 2 lines , 5x7 matrix ACALL CMTWRT ACALL DELAY MOV A, #0EH Cursor blinking ACALL CMTWRT ACALL DELAY MOV A,#01H Clear LCD ACALL CMTWRT ACALL DELAY MOV A, #’N’ display letter N ACALL DATWRT

  9. ACALL DELAY MOV A, #’O’ Display letter O ACALL DATWRT ACALL DELAY AGAIN: SJMP AGAIN CMTWRT: MOV P1,A CLR P2.0 RS = 0 for command CLR P2.1 R/W =0 for write SETB P2.2 E = 1 for high pulse ACALL DELAY CLR P2.2 E =0 RET

  10. DATAWRT: MOV P1,A SETB P2.0 RS=1 FOR DATA CLR P2.1 R/W = 0 SETB P2.2 E = 1 ACALL DELAY CLR P2.2 RET DELAY: MOV R4,#255 HERE: DJNZ R4, HERE RET END

  11. ADC INTERFACING • ADC – most widely used device for data acquisition • Every physical quantity is in analog form. • It should be converted to digital to be read by the MC. • ADC has n-bit resolution where ‘n’ can be 8,10,12, 16 or 24 bits • Higher resolution provides smaller step size. • Conversion time – time taken by ADC to convert analog into digital. • ADC chips are serial or parallel – one pin for serial and n pins for parallel.

  12. ADC 0804 CHIP • 8 – bit parallel ADC • Works with +5V, resolution – 8bits • PINS 1.CS – chip select, active low , input, activate 0804 2.RD – Read, input, active low, used to get the converted data out of ADC. CS = 0, high to low pulse is applied to RD , 8 – bit o/p at D0 – D7. ADC converts analog to binary and holds it in an internal register

More Related