Question: Problem 3 ) Given a PIC 2 4 processor with three outputs for controlling three LEDs: RB 0 ( RED ) , RB 1 (

Problem 3) Given a PIC24 processor with three outputs for controlling three LEDs:
RB0(RED), RB1(YELLOW) and (RB2) GREEN.
(a) Draw the circuit diagram (includes LEDs and Resistors). Assume maximum
current flows in each LED is 1 mA .
(b) Write a code initialize the I/O and implement the following traffic light state
machine:
Assume you are given two functions:
start_timer() : to start timer (count seconds)
is_expired(uint8 interval): returns 1 if the timer seconds is greater than interval,
otherwise return 0.
Problem 3 ) Given a PIC 2 4 processor with three

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!