Using a protoboard, connect an LED to pin RB0 on your PIC-P40 board. Be sure to use a current limiting resistor (470 Ω)
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Using a protoboard, connect an LED to pin RB0 on your PIC-P40 board. Be sure to use a current limiting resistor (470 Ω)
Using a protoboard, connect an LED to pin RB0 on your PIC-P40board. Be sure to use a current limiting resistor (470 Ω) in serieswith the LED (see attached PIC-P40 schematic, for proper wiring ofthe LED). Write a C program so that when the on-board button (seeattached schematics for details) is pressed and held, the on-boardLED (RA0) flashes on for 1.0 second and off for 1.0 seconds, 3times, followed by a 2 second off interval, then repeats the cycle.When the on-board button is released, the LED connected to RB0flashes on for 0.5 seconds and off for 0.5 seconds, 5 times,followed by a 2 second off interval, then repeats the cycle. BothLED’s should be off on program start-up. Use the Timer modules(Timer0 and/or Timer 1) to create the delays. Be sure to use theMPLAB simulator to verify the proper operation of the program. Onceyou have fully debugged the program, write the code to the PIC-P40and demonstrate its operation to the instructor by uploading avideo