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:
PORT must start with the LEDs connected to P P P and P being ONwhile the rest of the LEDs are OFF for seconds. You must then switch the LEDs offbefore reading the ADC.
In the main program, read the bits ADC which is connected through Port PThe ADC on board is an bit device with an internal reference voltage of volt. TheADC is connected to a temperature sensor If the temperature sensor output is V thenthe real temperature is 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 segment displays which is connected to Port Binary to BCDconversion must thus be done If the temperature goes above degree CelsiusIncluding the LED connected to Port must switch ON Take note of how it isconnected For temperatures below degree Celsius, the LED must be OFF.
You must also activate the external interrupt for the Hex keypad which isconnected through the MMC decoder device. On every key press, an interrupt is triggeredon pin P 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 for aslong as the key is pressed. Display only the binary value received from the keypad onthe LEDs connected to Port
While still in the interrupt routine, just after the pressed key is released, display the rawvalue that was received from the ADC for second. Hint: The value received from theADC must thus be globally declared. Create another 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 segmentdisplays connected through binseg decoders through pins P P P Pand P P P and P
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
