1 / 30

Interfacing of LCD with µP

Interfacing of LCD with µP. LCD (Liquid crystal display). A liquid crystal display ( LCD ) is a thin, flat electronic visual display that uses the light modulating properties of liquid crystals (LCs). Applications:-

dida
Télécharger la présentation

Interfacing of LCD with µP

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. Interfacing of LCD with µP Temperature control using ADC

  2. LCD (Liquid crystal display) A liquid crystal display (LCD) is a thin, flat electronic visual display that uses the light modulating properties of liquid crystals (LCs). Applications:- Used in computer monitors , televisions , instrument panels, video players, gaming devices, clocks , watches, calculators , and telephones etc. Temperature control using ADC

  3. Pin diagram of LCD 1.Vss – Gnd 2.Vcc - +5V 3.Vee - Contrast control 4. RS - Register select [RS=0: Command, RS=1: Data] 5. RW - Read / Write 6. EN - Enable pulse. 7. D0 - Data bus LSB 8. D1 ........ ........ 14. D7 - Data bus MSB. 15 & 16 - Backlight. Temperature control using ADC

  4. Temperature control using ADC

  5. Interfacing of ADC with µP

  6. ADC 0808 1. A, B, C addresses to select IN0-IN7 2. activate Address latch enable (ALE) to latch in the address. 3. SC is for Start Conversion. 4.EOC is for End of Conversion 5. OE is for Output Enable. 6. The output pins D0-D7 provides the digital output from the chip. 7. Vref (-) and Vref (+) are the reference voltages

  7. SELECTING AN ANALOG CHANNEL How to select the channel using three address pins A, B, C is shown in Table below:

  8. Interfacing of ADC0808 with µP Input to ADC0808- • SOC • OE • A,B,C • ALE Output for ADC0808- • EOC • D0-D7 PORT A - D0-D7(input) PORT B - SOC(PB0) - OE(PB1) - A,B,C(PB2,PB3,PB4) PORT C - EOC(PC0) CWR=99H Addresses for ports A,B,C and CWR=60H,61H,62H,63H

  9. Interfacing of ADC0808 with µP IN0 IN1 IN2 IN3 IN4 IN5 IN6 IN7 PA0-PA7 D0-D7 ALE PB0 PB1 PB2 PB3 PB4 SOC OE A B C 8255 ADC 0808 PC0 EOC Clock generator CLK

  10. The sequence and bit pattern required to give control signals. The steps involved will be as:

  11. Program:- MVI A,99H OUT 83H MVI B,00H LOOP: MOV A,B ANI 1CH ORI 01H OUT 81H ANI 1CH OUT 81H UP: IN 82H ANI 01H CPI 01H JNZ UP MVI A,02H OUT 81H IN 80H OUT DISPLAY CALL DELAY MOV A,B ADI 04H MOV B,A JMP LOOP

  12. Interfacing of DAC with µP

  13. Pin diagram of DAC AD7523

  14. Interfacing of DAC with 8255

  15. Pin description • The supply range is from +5V to +15V, while Vref may be any where between -10V to +10V. • The maximum analog output voltage will be any where between -10V to +10V, when all the digital inputs are at logic high state. • Usually a zener diode is connected between OUT1 and OUT2 to save the DAC from negative transients. • An operational amplifier is used as a current to voltage converter at the output of AD to convert the current out put of AD to a proportional output voltage.

  16. DAC AD-7523

  17. Program:- • Generate square wave :- MVI A,80H OUT 83H UP: MVI A,00 OUT 80H CALL DELAY MVI A,F0H OUT 80H CALL DELAY JMP UP

  18. Generate Triangular wave:- MVI A,80H OUT 83H MVI B,00H AGAIN: MOV A,B UP: OUT 81H CALL DELAY INR B MOV A,B CPI FFH JNZ UP BACK :DCR B MOV A,B OUT 81H CALL DELAY CPI 00H JNZ BACK JMP AGAIN

  19. Generate saw-tooth wave:- MVI A,80H OUT 83H AGAIN: MVI B,00H JMP AGAIN MOV A,B HLT UP: OUT 81H CALL DELAY INR B MOV A,B CPI FFH JNZ UP

  20. Temperature control Temperature control using ADC

  21. . Flow chart • . START Initialize 8255 CALL CONVERSION Turn heater on Is Temp > SET Temp Turn heater off . Temperature control using ADC

  22. Diagram Sensor Heater Temperature control using ADC

  23. Control Word The control word for the PPI is – 1 0 0 1 0 0 0 1 i.e., 91H. Temperature control using ADC

  24. Temperature control using ADC

  25. Program: MVI A, 91H OUT CR BEGIN: CALL CONVERSATION CPI 41H JC NEXT MVI A, 0EH OUT CR JMP BEGIN NEXT: MVI A, 0FH OUT CR JMP BEGIN Temperature control using ADC

  26. Conversion Subroutine: CONVERSION: MVI A,00H OUT PB ; Send address to select IN0 MVI A,08H ;Latch address by giving ALE High OUT PB  MVI A,18H OUT PB ; Make SOC High MVI A,08H OUT PB ; Make SOC Low MVI A,00H OUT PB ; Make ALE Low LOOP: IN PC ANI 01H JZ LOOP ; Wait for EOC IN PA RET ; Return value and store Accumulator Temperature control using ADC

  27. Interfacing Circuit Temperature control using ADC

  28. The load, in this case a heater, is a device which operates under 230V ac. The control signal from the microprocessor through the peripheral interface is of 5V magnitude. A solid state relay device is used to interface the control signal with the load. Temperature control using ADC

  29. Program:- MVI A,91H OUT 03 L2: CALL CONVERSION CPI 80H JC L1 MVI A,0EH OUT CWR JMP L2 L1: MVI A,OFH OUT CWR JMP L2 SUBROUTINE conversion : MVI A,00H OUT PB MVI A,08H OUT PB MVI C,0AH L3: DCR C JNZ L3 MVI A,18H OUT PB MVI A,08H OUT PB MVI A,00H OUT PB L4: IN PC ANI 01H JZ L4 IN PA RET Temperature control using ADC

More Related