Write the C subroutine named "Indicator" that will control the RGB color as follows: Yellow - Ready (To make yellow R and G should light up) Green-Unlock Red-Lock

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

solve d) and e)

(d) Write the C subroutine named "Indicator" that will control the RGB color as
follows:
Yellow - Ready (To make yellow R and G should light up)
Green-Unlock
Red-Lock
(e) Write the main program that performs required function of the ATmega32 system
using the subroutine "lock_Delay", "Indicator" and "3Second_Delay". Initially
the RGB is set to Yellow when the system RESET. The system will unlock once
a High signal is received from the Fingerprint Sensor, turn the RGB to Green,
then wait 3 seconds before locking back and turning the RGB to red.
Transcribed Image Text:(d) Write the C subroutine named "Indicator" that will control the RGB color as follows: Yellow - Ready (To make yellow R and G should light up) Green-Unlock Red-Lock (e) Write the main program that performs required function of the ATmega32 system using the subroutine "lock_Delay", "Indicator" and "3Second_Delay". Initially the RGB is set to Yellow when the system RESET. The system will unlock once a High signal is received from the Fingerprint Sensor, turn the RGB to Green, then wait 3 seconds before locking back and turning the RGB to red.
FINAL EXAMINATION
Q.6 Referring to the ATmega32 Smart Door Lock system in Figure Q.6(a), answer the
following questions.
On RESET or Power ON the system will continuously display the color 'Yellow' on
the RGB LED indicating system is ready. The 'lock driver' require a high signal for
250ms to fully unlock/lock the door. TIMERO is used to implement the 250ms delay.
Another timer, TIMERI is used to implement a delay to re-lock the door after 3
seconds. Every time the door is unlocked; the system waits 3 seconds before locking it
back.
Three subroutines named "lock_Delay", "Indicator" and "3Second Delay" will be
used.
Vcc
Fingerprint
Sensor
Controller
E
1
m
m ww
m
MATE
ATE PO
IL PRE
IN12AND
AND PR
POM
MOSE PR
M30 P
CAPP
1
vo
GND EM
11
ATALZ 12
KAL12
AND POR
ITO POR Lis
INTAL POU 11
INTE POR
14
16
11
OCH POK
CIA: Pos
CF POK
Th
**
120
26
40
"
34
38
37
31
34
33
22
31
30
C 29
24
n
27
ME
22
24
26
M
24
24
PwC
PALADEO
MAT
WAS ACCE
P4 (ADC)
PASADC
PAS (ADICE
PAY ADCT
ARLI
GND
AVOC
PCF (Fosca
POS (FOSCE
POS (TOR
POR (100)
PO (100
PC
SCA
POS INCLE
FOR XOCE
H
Smart Lock
Driver
Smart
Lock
Figure Q.6(a)
(a) Show the calculations for the 250ms delay generation by choosing an optimum
Prescaler. Assume XTAL-IMhz
(b) Write the C subroutine named "lock_Delay" that implements 250ms delay using
TIMERO Normal Mode..
(c) Write the C subroutine named "3Second_Delay" that implements 3 second delay
using TIMERI CTC Mode.
Transcribed Image Text:FINAL EXAMINATION Q.6 Referring to the ATmega32 Smart Door Lock system in Figure Q.6(a), answer the following questions. On RESET or Power ON the system will continuously display the color 'Yellow' on the RGB LED indicating system is ready. The 'lock driver' require a high signal for 250ms to fully unlock/lock the door. TIMERO is used to implement the 250ms delay. Another timer, TIMERI is used to implement a delay to re-lock the door after 3 seconds. Every time the door is unlocked; the system waits 3 seconds before locking it back. Three subroutines named "lock_Delay", "Indicator" and "3Second Delay" will be used. Vcc Fingerprint Sensor Controller E 1 m m ww m MATE ATE PO IL PRE IN12AND AND PR POM MOSE PR M30 P CAPP 1 vo GND EM 11 ATALZ 12 KAL12 AND POR ITO POR Lis INTAL POU 11 INTE POR 14 16 11 OCH POK CIA: Pos CF POK Th ** 120 26 40 " 34 38 37 31 34 33 22 31 30 C 29 24 n 27 ME 22 24 26 M 24 24 PwC PALADEO MAT WAS ACCE P4 (ADC) PASADC PAS (ADICE PAY ADCT ARLI GND AVOC PCF (Fosca POS (FOSCE POS (TOR POR (100) PO (100 PC SCA POS INCLE FOR XOCE H Smart Lock Driver Smart Lock Figure Q.6(a) (a) Show the calculations for the 250ms delay generation by choosing an optimum Prescaler. Assume XTAL-IMhz (b) Write the C subroutine named "lock_Delay" that implements 250ms delay using TIMERO Normal Mode.. (c) Write the C subroutine named "3Second_Delay" that implements 3 second delay using TIMERI CTC Mode.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY