Section: Hardware Interfacing Experiments
Aim: To write an assembly language program to convert an analog signal into a digital signal using an ADC interfacing.
Apparatus Required:
- Microprocessor kit (8085) – 1
- Power Supply (+5 V dc, +12 V dc) – 1
- ADC Interface board – 1
Algorithm:
- Select the channel and latch the address.
- Send the start conversion pulse.
- Read EOC (End of Conversion) signal.
- If EOC = 1 continue, else go to step (3).
- Read the digital output.
- Store it in a memory location.
Program:
| Address | Label | Mnemonics | Operand | Comment |
|---|---|---|---|---|
| 4100 | MVI | A, 10H | Select channel | |
| 4102 | OUT | C8 | Send through output port | |
| 4103 | MVI | A, 18H | Load accumulator with value for ALE low | |
| 4105 | OUT | C8 | Send through output port | |
| 4106 | MVI | A, 01H | Store the value to make SOC high in the accumulator | |
| 4108 | OUT | 00H | Send through output port | |
| 4109 | XRA | A | Introduce delay | |
| 410A | XRA | A | Introduce delay | |
| 410B | XRA | A | Introduce delay | |
| 410C | MVI | A, 00 | Store the value to make SOC low in the accumulator | |
| 410E | OUT | D0H | Send through output port | |
| 410F | L1 | IN | D8H | Read the EOC signal from port & check for end of conversion |
| 4110 | ANI | 01 | Mask bits | |
| 4112 | CPI | 01 | Compare with 01 | |
| 4114 | JNZ | L1 | If conversion is not completed, read EOC signal again | |
| 4117 | IN | C0H | Read data from port | |
| 4118 | STA | 4150H | Store the data in memory location | |
| 411B | HLT | Stop the program |
Observation:
| Analog Voltage (V) | Digital Data on LED Display | Hex Code in Memory Location |
|---|---|---|
| 5 V | 1111 1111 | FF |
| 0 V | 0000 0000 | 00 |
| 2.5 V | 1000 0000 | 80 |
Result: Thus the ADC was interfaced with 8085 and the given analog inputs were converted into its digital equivalent.
Flowchart:
+-----------------------------------+
| START |
+-----------------+-----------------+
|
v
+-----------------------------------+
| SELECT THE CHANNEL AND LATCH |
+-----------------+-----------------+
|
v
+-----------------------------------+
| SEND START CONVERSION PULSE |
+-----------------+-----------------+
|
v <-------------------+
/ \ |
/ Is \ |
/ EOC = 1? \ |
< > |
\ / |
\ / |
\ / |
| |
+-----------+-----------+ |
| | |
YES NO |
| +---------+
v
+-----------------------------------+
| READ THE DIGITAL OUTPUT |
+-----------------+-----------------+
|
v
+-----------------------------------+
| STORE DIGITAL VALUE IN MEMORY |
| LOCATION |
+-----------------+-----------------+
|
v
+-------------------+
| STOP |
+-------------------+
Viva Questions:
- What is the name given to the time taken by the ADC from the active edge of SOC (start of conversion) pulse till the active edge of EOC (end of conversion) signal?
- What are the popular techniques that are used in the integration of ADC chips?
- What procedure/algorithm steps are involved in interfacing an ADC?
- Which of the following is an ADC IC?
a) AD 7523 b) 74373 c) 74245 d) ICL7109 - What is the conversion delay in successive approximation of an ADC 0808/0809, and how many inputs can be connected at a time to an ADC integrated with successive approximation?
- For what application is the ADC 7109 (which uses Dual slope integration) used?
- Which phase is not a part of the total conversion cycle in dual-slope ADCs?
- Which phase contains a feedback loop in it?
a) Auto zero phase b) Signal integrate phase c) Deintegrate phase d) None - In the signal integrate phase, for what fixed period is the differential input voltage integrated?
For all 2026 published articles list: click here:
…till the next post, bye-bye & take care