Write a programs for PIC16F84A
The CPU will execute two tasks in parallel. First task will be a normal program Execution loop which continuously tests an active-low switch connected to RB3. When switch is pressed, an active-high LED connected to RB4 will turn on for 1 sec (using software delay). Any switch presses while the LED is on will not be detected as the CPU is busy in the 1 sec software delay. After delay and the LED is turn off, CPU will return to testing the active-low switch. The second task will be toggle an active-high LED connected to RA1 every 0.25 sec. Timer0 will be configured to generate an interrupt every 0.25 sec, and the code to toggle LED will be placed in ISR. Timing accuracy requirements is ±1% using 800 kHz RC oscillator.
this subject is under engineering electrical but also in assembly code.
Comments
Leave a comment