While we’re still working on the next workshops, here’s a very simple and useful mini project, a low cost 40 pins PIC programmer using the serial port.
Micro-controllers play a very important role in electronics, as they are able to perform tasks in automation, control, image processing, among others. Their usage is immense. There are various families of micro-controllers, one of those is the Microchip’s PIC (Peripheral Interface Controller). PICs are very popular as they are relatively cheap and because of their characteristics, for example their low power consumption, internal oscillator and free development tools.
This is an example of a very simple PIC programmer:
As shown above, there are only three 4,7k resistors connected between the DB9 connector and the PIC. According to the schematic, these resistors are connected to the following pins of the PIC: MCLR (1), PGC (39) and PGD (40). The pin no.8 from the DB9 connector is connected to the PGD pin (40) in the PIC.
This programmer operates at 5V DC. Therefore, an external voltage source must be connected to the 2-pin connector.
Using the KiCad software, a PCB layout was designed:
Then we started making the PCB, first we printed the layout on an acetate sheet. Then we used the UV exposure method to transfer the circuit to the board and for last, we corroded the PCB with iron perchlorate.
And the programmer is ready to use! Here’s how it looks:
These are the steps to use the programmer:
1. Connect it through a serial cable to a computer;
2. Plug in the desired PIC on the board, for example, the PIC18F4550;
3. Using an IDE, MPLAB for instance, write, compile the code and generate the .HEX file;
4. Through a programmer software like PICPgm, send the .HEX file to the PIC.
And there you go, the PIC is ready to use and you got a new programmer for 40 pins PIC micro-controllers.