This project is going to get you into PIC programming for $5.00.
The PIC12Fxxx Proto Board costs just $5.00 and includes a surface-mount PIC chip.
This whole concept has some advantages and some disadvantages.
The advantages are these:
The disadvantages:
The decision is yours.
But there is no cheaper way to start with microcontrollers.
Buying the PIC12Fxxx Proto Board is just the start. There are other things you will need.
FIRST PROJECT see Hello world
Before carrying out any of the experiments, you will need to install software from the CD’s that come with PICkit-2 and place a number of icons on your desktop.
Here are additional things you will need:
You can jump off the “deep end” and start the experiments, or read-up about the chip in the documents above.
The first thing you will want to do is create a program to flash a LED, to make sure everything is working.
Connect a LED to pin xxx via a 470R resistor and burn the following program into the chip.
This is not a “normal” program. It uses the watchdog timer to reset the chip and this produces the on and off time. This is not the normal use for the watchdog timer. It normally monitors a program and if the micro gets stuck in a routine or jumps to an incorrect section of the program, the micro is reset.
(It is able to do this because the programmer adds an instruction to clear the watchdog timer at various location in a program (such as a delay routine) and the timer counts down every time an instruction is executed. It the program executes too many instructions without clearing the wdt, it gets reset.)
This program also uses the “sleep” function. This is similar to putting it into an endless loop. The program will execute too many instructions s and the wdt timer will reset the micro.
The XOR instruction changes each bit in a file from “0” to “1” or “1” to “0.” That’s how the LED is turned on and off. We have used one of the bits in the input-output port and connected it to the LED and this bit is made “1” to produce a HIGH and “0” to produce a LOW.
Quick Links
Legal Stuff
Social Media