PadhaikoAll subjects

Past exam question: Assignment 3, Q3(b)

Instrumentation · 3 marks

Open in the Padhaiko app

Topic: Microprocessor and microcontroller and their selection criteria, and…

Question

The monitoring system takes input from four analog temperature sensors & records values in memory. If any of temperature exceeds , alarming circuit should be triggered and if temperature is further increased to , the cooling system should be started each of four sensor has their own alarming circuit and cooling circuit. Then b) Based on your designed system write portion of 8085 code to initialize 8255.

Solution

Deriving the 8255A Control Word: From the hardware design at base address F0H (Control Word Register = F3H):

Combining the bits:

8085 Initialization Code: Write 98H to the Control Word Register (F3H), and clear Port B (F1H) and Port C Lower (F2H) so all alarms, cooling drivers, and ADC control lines start in the OFF/idle state:

8085 Code: Initialize 8255 at F0H8085 ASM
INIT_8255: MVI A, 98H      ; Control word: PA=In, PCU=In, PB=Out, PCL=Out (Mode 0)
           OUT F3H         ; Write control word to CWR at F3H
           MVI A, 00H      ; Initial state: all alarms and cooling circuits OFF
           OUT F1H         ; Clear Port B (F1H)
           OUT F2H         ; Clear Port C lower control lines (F2H: channel 0, ALE/SOC=0)
Answer:

The 8255A control word is 98H (), written to Control Register F3H via MVI A, 98H followed by OUT F3H, after which Port B (F1H) and Port C (F2H) are cleared to 00H so all alarms, coolers, and ADC triggers start idle.

All past exam questions for Instrumentation