Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The design that controls the oven temperature is given below. At a temperature a

ID: 2084288 • Letter: T

Question

The design that controls the oven temperature is given below. At a temperature above 220 ° C, the INT1 interrupt with low edge trigger calls ISR1 which turns off (OFF) the heater. At temperature values falling below 180 ° C, the sensor output calls ISR0, which provides (ON) to open the INT0 interrupt heater with low edge triggering. We write the program that fulfills these requirements in assembly and C.

Can you help me?

Reset INTI 8051 HEAT OFF HEAT ON 0 turn OFF 1 turn ON P1.0 Power switch Sensor logic 0 if 220 Sensor logic 0 if

Explanation / Answer

C program:

===========================

#include <REG52.H>

void ex0_isr (void) interrupt 0
{
P1=0x01; // turn heater on
}
void ex1_isr (void) interrupt 1
{
P1=0x00; // turn heater off
}

void main (void)
{
P1=0x00; // Define P1.0 as output pin
IT0 = 1; // Configure interrupt 0 for falling edge on /INT0 (P3.2)
EX0 = 1; // Enable EX0 Interrupt
IT1 = 1; // Configure interrupt 0 for falling edge on /INT0 (P3.2)
EX1 = 1; // Enable EX0 Interrupt
EA = 1; // Enable Global Interrupt Flag

while (1)
{
}
}

==================================