PIC Programming & Design


The source code is provided for each project. The code is for EDUCATIONAL purposes ONLY. There is no warranty and no support. All these projects are a result of my hobby, so I don't necessarily know what I'm doing! Also note that all code available here carries the MIT License.
avr

VE3LNY's PIC projects

I was introduced to the world of PIC microcontroller programming by AmQRP, the American QRP Club. They had an inexpensive project board called the PIC-EL, or PIC Elmer (photo left). They also provide an excellent PIC programming tutorial. I had a lot of fun doing the tutorial, then developed a few projects of my own. (Latest: the Pic-EL III).

By the way, PICs are manufactured by Microchip Technology Inc. in a vast number of models from tiny and simple to huge and complex. The one used in my PIC-EL is a PIC16F84A, available from Digi-Key for around $8.70 Canadian. It has 1024 words of program memory, 68 bytes of data RAM, 64 bytes of EEPROM, and 13 I/O pins that can be used for various purposes. (The latest PIC-EL uses a PIC16F628.)

PIC Programmers

When I started working with PICs, I used the PIC-EL to program the PIC16F84A. When I wanted to try other PICs, I soon learned that the PIC-EL would not program them, and I looked around for a programmer. I decided to try a DIY Electronics Kitsrus kit #128. To make a long story short, I had many hassles with this kit and do not recommend it.
pickit2 Next I purchased an inexpensive in-circuit programmer from Microchip, the PICkit 2, which solved my problems. The PICkit 2 Starter Kit is available from DigiKey for around C$34.

UPDATE 2013-02 My "old" Pickit2 no longer works with the current software and Windows 7. I get the
"unrecognized device" USB error now, even though the device is present in device manager. Microchip suggests I open the unit up and solder in a resistor, see this link. I don't really want to do this so this may be the end of my development with PICs.

Update 2014-09 the Pickit2 has been replaced by the Pickit3 and is no longer be available.
pickit2
UPDATE 2014-09 I discovered that DealExtreme has a Pickit2 clone at a very reasonable price. I ordered one and I'll update this after I've had a chance to try it out.

Both the Kit2 and the Pickit2 work under Windows XP and a Windows 7 32-bit computer, but neither are recognized by my Windows 7 64-bit computer, even when XP compatibility is selected for the program. If you've gotten one to work, I'd like to hear how you did it.

Update 2016-04 I installed a 32-bit version of Windows 7 under VirtualBox on my Windows 64-bit development PC. Remember to enable USB 2.0 support in the settings; the Pickit2 does work!
Thermometer

Thermometer

A thermometer interfaced to either an LED or LCD display, using a PIC16F684.
sourceboost logo

SourceBoost C Compiler

Just a word on the source code. Like everyone else I started out programming PICs in assembler. Since I had learned other assembler languages in the past, this was not a problem for me, and I was doing fine for smaller programs. When I tackled a larger program, the tedium of the language plus the peculiarities of the PIC processor (multiple code pages and data banks) drove me crazy to look for a C compiler. I decided on the  SourceBoost BoostC compiler (I have no association with the company), because of its features and friendly pricing policy for hobbyists. The following projects are all programmed with this compiler.

hi-tech logo

HI-Tech C Compiler

HI-Tech makes a comprehensive line of  C compilers for the various PIC micros. A free Lite version is avalable here. I tried it some time ago and it is very good, except that there are limitations such as the amount of PIC memory you can use.

cc5x logo

CC5X C Compiler

Another PIC C Compiler with a limited-function free version.

counter

Frequency Counter

An audio frequency counter using a PIC16F684 and either an LED or LCD display.
Humidity meter

Humidity Meter

PIC16F684 Based Humidity Meter with LED readout.
Ham Radio Clock

Ham Radio Clock

A dual time zone PIC16F685 LCD clock.
Cable Tester

Cable Tester

PIC16F877A 8 conductor cable tester.
Line Monitor

PC Power Monitor

Monitors the power line and shuts down your computer when the power fails.



Back to VE3LNY's Home Page