Download presentation
Presentation is loading. Please wait.
1
Interfacing of LCD with µP
Temperature control using ADC Interfacing of LCD with µP 7/28/2018 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. 7/28/2018 Temperature control using ADC
3
Temperature control using ADC
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. D D7 - Data bus MSB. 15 & 16 - Backlight. 7/28/2018 Temperature control using ADC
4
Temperature control using ADC
7/28/2018 Temperature control using ADC
5
Interfacing of ADC with µP
7/28/2018
6
7/28/2018
7
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/28/2018
8
SELECTING AN ANALOG CHANNEL
How to select the channel using three address pins A, B, C is shown in Table below: 7/28/2018
9
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 7/28/2018
10
Interfacing of ADC0808 with µP
PA0-PA7 D0-D7 ALE PB0 PB1 PB2 PB3 PB4 SOC OE A B C 8255 ADC 0808 PC0 EOC Clock generator CLK 7/28/2018
11
The sequence and bit pattern required to give control signals
The sequence and bit pattern required to give control signals. The steps involved will be as: × C B A OE SOC/ALE 7/28/2018
12
Program:- JNZ UP MVI A,02H OUT 81H IN 80H OUT DISPLAY CALL DELAY MOV A,B ADI 04H MOV B,A JMP LOOP MVI A,99H OUT 83H MVI B,00H LOOP: MOV A,B ANI 1CH ORI 01H OUT 81H UP: IN 82H ANI 01H CPI 01H 7/28/2018
13
Interfacing of DAC with µP
7/28/2018
14
Pin diagram of DAC AD7523 7/28/2018
15
Interfacing of DAC with 8255
7/28/2018
16
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. 7/28/2018
17
DAC AD-7523 7/28/2018
18
Program:- MVI A,80H Generate square wave :- OUT 83H UP: MVI A,00
CALL DELAY MVI A,F0H OUT 80H JMP UP 7/28/2018
19
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 7/28/2018
20
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 7/28/2018
21
Temperature control using ADC
7/28/2018 Temperature control using ADC
22
Temperature control using ADC
. Flow chart . START . Initialize 8255 CALL CONVERSION Turn heater on Is Temp > SET Temp Turn heater off 7/28/2018 Temperature control using ADC
23
Temperature control using ADC
Diagram Temperature control using ADC Sensor Heater 7/28/2018 Temperature control using ADC
24
Temperature control using ADC
Control Word The control word for the PPI is – i.e., 91H. 7/28/2018 Temperature control using ADC
25
Temperature control using ADC
7/28/2018 Temperature control using ADC
26
Temperature control using ADC
Program: MVI A, 91H OUT CR BEGIN: CALL CONVERSATION CPI 41H JC NEXT MVI A, 0EH JMP BEGIN NEXT: MVI A, 0FH 7/28/2018 Temperature control using ADC
27
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 OUT PB ; Make ALE Low LOOP: IN PC ANI 01H JZ LOOP ; Wait for EOC IN PA RET ; Return value and store Accumulator 7/28/2018 Temperature control using ADC
28
Temperature control using ADC
Interfacing Circuit 7/28/2018 Temperature control using ADC
29
Temperature control using ADC
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. 7/28/2018 Temperature control using ADC
30
Temperature control using ADC
Program:- MVI A,91H OUT 03 L2: CALL CONVERSION CPI 80H JC L1 MVI A,0EH OUT CWR JMP L2 L1: MVI A,OFH SUBROUTINE conversion : MVI A,00H OUT PB MVI A,08H MVI C,0AH L3: DCR C JNZ L3 MVI A,18H L4: IN PC ANI 01H JZ L4 IN PA RET 7/28/2018 Temperature control using ADC
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.