To do this I am going to show you how to blink a LED at approximately 1 Hz with a 50% duty cycle.
Step 1: Obtain Necessary Parts & Tools
1. A PIC, preferably a 16F1936--but as long as you know your specific hardware, you could probably implement this on nearly any 8 bit PIC with an on-board 16 bit timer. There are some slight programming differences between the 1936 and earlier uCs that you might be familiar with. The 1936 is what I have at the moment, and it's pretty spiffy
2. Some way to program the PIC. I am going to be using a PICkit III to do ICSP (In-circuit serial programming). Can be gotten from Microchip for a small sum of money. There are many programming options for PICs. You can even roll your own programmer.
3. MPlab. This is available from Microchip for the low low cost of Free.
4. Miscellaneous electronic parts/equipment
- A 3-6V power supply
- Jumper wires
- 1 uF Capacitor
- 10K resistor
- LED of choice (around 20 ma current draw), and appropriately sized resistor.
-A small tactile switch