Answered step by step
Verified Expert Solution
Question
1 Approved Answer
can i get the code and the circuit for this assignemnt We would like to build a fun binary counter that is able to count
can i get the code and the circuit for this assignemnt
We would like to build a fun binary counter that is able to count up from 0 to 31 on a 16F877A PIC microcontroller but not necessarily in a sequential order. The hardware should be composed of 5 LEDs to show the count and 2 push buttons. We'll call the 2 push buttons P and P2 consecutively. The system should behave as follows: When powered up, the default behavior for the counter is to count up sequentially from 0 to 31 with a pause of 1 second between the counts. If push button Pis clicked, the counter should continue counting from its current value up to 31 but should increment by 2 instead of 1. If push button Pis clicked again, the counter should continue counting from its current value up to 31 but should increment by 3. Further clickings on P should increment the counter by 4, then by 5 and then back to increment by 1. . If push button P, is clicked during counting, the counter should increase the pause value between increments: The first time P, is clicked, the pause between counts should be made 2 seconds. Further clickings on P, should make the pause between counts 3 seconds, 4 seconds and 5 seconds consecutively. Clicking on P, after the 5-second pause should bring it back to 1 second What you should do Build the controller described above on a bread board. Remember to add to each LED a 2200 series resistor to limit the current. Remember as well to add a 10KN pull-up resistor to each push button or use the internal weak pull-up resistors), add a 4MHZ oscillator (with 2 x 22pF capacitors) and a 4.7K.S2 pull-up resistor to the MCLR pin. Build the PIC assembly code that implements the behavior described above under MPLAB IDE. Assemble your code and make sure you get a successful build. Use the simulator if you wish to make sure the behavior is correct. Send the zipped folder that contains your source before the deadline. If the deadline is reached and you are still having problems with your code, just send it as is Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started