David Wrigley's Microwave Website, Manchester, England

PIC chip Projects


PIC programmer

I have used the Tait programmer for many years, and I found that it would read and program other PICs but with limitations. At this point I started looking round at what was on offer world-wide in terms of a universal design from the PICStart down.

I soon learnt that the PIC devices were so popular and varied that a commercial programmer with the ability to keep up with newer designs was required. I bought a ICD-2 programmer which works with the MPLab software from Microchip and also uses the USB connection now almost universally found on PC's these days.

I have been totally happy with this programmer and recommend it.

I usually use the Vdd supply of the cicuit PCB rather than the supply from the programmer. This can make testing and changes very fast. Immediately the programmer is connected it stops normal circuit operation and when disconnected resumes it.

Programming with the MPLab is easy and fast even in Assembler - which I use exclusively as it is more efficient in terms of processor speed and memory usage than compiled C.

The process begins by starting MPLab and then the opening of a project in in a convenient directory ( I use the same directory as the hardware-it keeps it all together). It is best to open up two windows using the "view" tab "Project" and "Output"

An Assembler file (---.asm) is written or downloaded and saved into the project directory. This file can then be added to the project ( In MPLab - use "Project / Add files to project"). The asm file will now appear under "source files" in the "project" window.

The next step is the build the hex file for programming

1. Use "Configure/ select device" to establish which device you want to use.
2. Use "Programme/Settings" - to set up the communication path to the programmer and the power arrangements.
3 Then use "Programme/Connect" to establish connection to the programmer. It may well have to download a new operating system for the ICD-2 if the device has been changed from last time. It will also reveal any problems and whether you have got the connection to the PIC correct.
4. "Program/ build all" to build the hex - this process will also reveal any errors in the file.
5. Finally "Programme/Program" to write to the PIC.

This might seem long winded but changes can be effected using just the last two actions after saving the changes to the asm file.

I find that using several different PIC devices, the main problem is keeping up with the different interface initialisations.
And I still haven't tried the dsp PIC versions yet!

Last updated 2014 June 09