We are going to start with a very simple program. We are effectively considering the replacement of a simple astable circuit with a PICmicro which we will program to do the job. This is actually not as stupid as it sounds, in many situations you now find tiny computers which are programmed to do jobs which would once have been performed with discrete components. Working this way is becoming the cheapest way to do the job.
We will solve the problem by doing the following in sequence:
Find a way to turn a LED on
Find a way to turn a LED on and off
Get the program to loop around so that the LED flashes
To do this we will look at a number of C language constructions, as well as consider how the C program actually executes on the computer.