Question: Write a program to do the following: 1 - PORT 1 must start with the LEDs connected to P 1 . 0 , P 1

Write a program to do the following:
1-PORT 1 must start with the LEDs connected to P1.0, P1.1, P1.6, and P1.7 being ONwhile the rest of the LEDs are OFF for 2 seconds. You must then switch the LEDs offbefore reading the ADC.
2-In the main program, read the 8-bits ADC0804 which is connected through Port P2.The ADC0804 on board is an 8-bit device with an internal reference voltage of 5 volt. TheADC is connected to a temperature sensor. If the temperature sensor output is 5V, thenthe real temperature is 90-degree Celsius. In the main program you must read thesensor output and convert it to the real temperature. This real temperature must bedisplayed on the two 7-segment displays which is connected to Port 1.(Binary to BCDconversion must thus be done). If the temperature goes above 40 degree Celsius(Including 40), the LED connected to Port 3.0 must switch ON (Take note of how it isconnected). For temperatures below 40-degree Celsius, the LED must be OFF.
3-You must also activate the external interrupt 0, for the Hex keypad which isconnected through the MM74C922 decoder device. On every key press, an interrupt is triggeredon pin P3.2 and can be used to interrupt the main program.
In the interrupt service routine:
-you must read the values that you receive from the keypad encoder when a key ispressed, correct the received values and display the corrected value on Port 1 for aslong as the key is pressed. Display only the binary value received from the keypad onthe LEDs connected to Port 1.
-While still in the interrupt routine, just after the pressed key is released, display the rawvalue that was received from the ADC for 1 second. (Hint: The value received from theADC must thus be globally declared. Create another 1-second software delay in theinterrupt service routine. Do not call an outside delay function).
-Only after displaying the key pressed value and the raw ADC value the program mustreturn to the main program and display the temperature again on the 7-segmentdisplays connected through 2 bin-7seg decoders through pins P1.2, P1.3, P1.4, P1.5.and P3.4, P3.5, P3.6 and P3.7.
Write a program to do the following: 1 - PORT 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!