There are many Microchip PIC programmer designs on the Internet, and for not much money you can purchase one already assembled.
As I had some spare parts at home, I decided to build my own programmer following the design of Jens Madsen, the JDM Programmer. In order to program correctly some devices (like the PIC16F628), you should include some minor modifications to the original design, so you better follow the schematic published in fullcustom.es. If you can read spanish, their guide would be interesting for you.
A piece of advice: if you want to program PIC16F628 microcontrollers, pin RB4 should be left unconnected to the programmer.
Once you have the JDM programmer hardware (either homemade or purchased), you will need the appropriate software to program the PIC image files (extension .hex) to the device. For Windows, probably the best is IC-Prog. Don't forget to download also the driver for Windows 2000/XP. To configure IC-Prog for the JDM Programmer, open the "Hardware Settings" dialog, an set these options:
- Programmer: JDM Programmer
- Interface: Direct I/O
- I/O Delay: 10 (you may have to test other values if you get programming errors)
- Communication: (all disabled)
To program the microcontroller, first make sure that the correct device model is selected on the drop-down list of the toolbar (see screenshot), then open the .hex file, and finally, click on the "Program All" toolbar button. Normally you don't need to worry about "Oscillator" and "Fuses" configuration, because the correct values are included in the .hex file, so when you open it, they are set properly.