Question: Write a C-language program that runs on the AT89C51CC03 board. Add four LEDs to your board to P1.0, P1.1, P1.2, and P1.3 and add a

Write a C-language program that runs on the AT89C51CC03 board. Add four LEDs to your board to P1.0, P1.1, P1.2, and P1.3 and add a push button switch to the board on P3.4. All resistors are 1K. For this problem you are going to multiplex the LEDs so that they appear to be all on when the switch is pushed but your program will only turn on one LED at a time. The blink rate of the eye is about a thirtieth of a second - that is, you can see something blinking if it is blinking at a rate slower than about 30 times s second - but this is brightness dependent. For this problem we will take the blink rate to be about 50 times second. Since we have four LEDs you will have to turn on the first, then turn it off and turn on the second, turn that off and turn on the third, turn that off and turn on the fourth all in a 50th of a second (20 msec). Since there are four LEDs each LED will be on for just 5 milliseconds. When the switch is pushed you will run a loop that turns on the next LED every 5 msec. Your program should use a function which accepts an unsigned character argument named x and does a software delay of x msec. Do a demo of your program in class on the due date and turn in the following: 1. A cover sheet with your name, assignment number, and the date turned in. 2. A hard copy of your commented assembly-code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
