Practical questio 1- Write a C program t Arlano thar centrels a set of tawa traffic lights A & BR ata crossmadk. Assame When the traffic lights (A) are green er amber, the urafic lights (B) are red. When the traffic lighas (B) are green or amber, the uaffic lights (A) are red. Green lights must stay on for 15 seconds, amber lights for 5 seconds and ied lights for 20 seconds. 2. Sketch the circuit diagram to wire the Ardaine to the two traffic lights C can c bits TOVe Mode TOP OCRE Cone 20 Set Under Fast PWM bits 000 Nomal immediate 00 K11 Normal operation, OCer disconnected 001 Phase Comrect PWM eFF on TOP Normal operation, ocaA discoenected, Ce Timer Comp ach ICTO 010 OCRA immediate Oce eered ocA teggles on Compare match, Oce ered 011 Fast PWM OFF 01 111 100 Reserved Clear OC on Compare Match Set OCe at tinon-inverting mode 10 K11 101 Phase Comect PWM OCRBA on TOP 110 Reserved Set Ocer on Compare Match, Clear Oc al inverting madel 11 111 Fast PWM OCRBA TOP TCO Waveform Genenatos tnde B WGM2:0) CS Deseription frequency CS Description frequency perind cka IMH 200 250a 25 25 s00 d 100 dk 62.5kH 2414 Ha 101 dk For PWM mode For timericounter mode TCCROA 13 TCCROB

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
: Practical questiod
1. Write a C program for Arduino thar controls a set of two traffic lights A & B at a crossmadk. Assume
that:
When the traffic lighus (A) are green or amber, the traffic lights (B) are red.
• When the traffic lights (B) are green or amber, the raffic lights (A) are red.
Green lights must stay on for 15 seconds, amber lights for 5 seconds and red lights for 20
seconds.
2. Sketch the circuit diagram to wire the Arduina to the two traffic lights.
O COr cone COn cone
O csea csas ca
R/W? RIW /N RIN N
bits
TOVO
Mode
ТОР
OCRO
COne
2:0
Set
bits
HGO
Under Fast PWM
00
Normal
immediate
00
K11
Normal operation, ocer disconnected
001 Phase Correct PWM
on TOP
OXFF
Normal operation, OCcBA disconnected,
01
011
Clear Timer n Compee
match ICTO
010
OCROA
immediate
aFF
Ocen reserved
OCBA toggles on Compare match,
011
Fast PWM
exFF
01
111
ocon reserved
100
Reserved
Clear OCex on Compare Match,
Set OCex at ex0. inon-inverting mode)
10
101 Phase Correct PWM OCROA
on TOP
exee
110
Reserved
Set OCex on Compare Match,
Clear OCx al ecoo, Ginverting made)
11
111
Fast PWM
OCROA
TOP
TCU Winveform Generatie Afrde Ati (WGAUZ:0)
CS
Deseription
frequency
CS
Description
frequency perind
dka Im
001 dk
16MI O25s
16MH
625 Kle
1400
010 dk
2MHZ
7812.5 Ha
200
011 dk
250kHz
976.5625 Hz
40ps
25
100
62.5kH
16
6.25
100 dk
62.5kHz
21414 Ha
15.62Ha 4Qus
15425
101 lk
15.625KHz
61.35 Hz
For PWM mode
For timericounter mode
TCCROA
TCCROB
Transcribed Image Text:: Practical questiod 1. Write a C program for Arduino thar controls a set of two traffic lights A & B at a crossmadk. Assume that: When the traffic lighus (A) are green or amber, the traffic lights (B) are red. • When the traffic lights (B) are green or amber, the raffic lights (A) are red. Green lights must stay on for 15 seconds, amber lights for 5 seconds and red lights for 20 seconds. 2. Sketch the circuit diagram to wire the Arduina to the two traffic lights. O COr cone COn cone O csea csas ca R/W? RIW /N RIN N bits TOVO Mode ТОР OCRO COne 2:0 Set bits HGO Under Fast PWM 00 Normal immediate 00 K11 Normal operation, ocer disconnected 001 Phase Correct PWM on TOP OXFF Normal operation, OCcBA disconnected, 01 011 Clear Timer n Compee match ICTO 010 OCROA immediate aFF Ocen reserved OCBA toggles on Compare match, 011 Fast PWM exFF 01 111 ocon reserved 100 Reserved Clear OCex on Compare Match, Set OCex at ex0. inon-inverting mode) 10 101 Phase Correct PWM OCROA on TOP exee 110 Reserved Set OCex on Compare Match, Clear OCx al ecoo, Ginverting made) 11 111 Fast PWM OCROA TOP TCU Winveform Generatie Afrde Ati (WGAUZ:0) CS Deseription frequency CS Description frequency perind dka Im 001 dk 16MI O25s 16MH 625 Kle 1400 010 dk 2MHZ 7812.5 Ha 200 011 dk 250kHz 976.5625 Hz 40ps 25 100 62.5kH 16 6.25 100 dk 62.5kHz 21414 Ha 15.62Ha 4Qus 15425 101 lk 15.625KHz 61.35 Hz For PWM mode For timericounter mode TCCROA TCCROB
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Algebraic Expressions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education