PIC Programming & DesignThe 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! |
|||
![]() |
VE3LNY's PIC projectsI was introduced to the world of PIC 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.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 ProgrammersWhen 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. I had serious problems with this kit, so I do not provide links. First of all, the kit arrived with the included PIC unprogrammed, so the kit did not work. I sent several emails to the company asking for help but never received a reply. Finally I borrowed a PIC programmer from a friend, discovered the problem and programmed the PIC myself. The kit then worked fine, until I ordered several PIC16F685s and found the kit did not support them. I figured they were new(er) so I went to the kitsrus web site for a firmware update. There was no update available, and to this day I do not think it has been updated. (I subsequently heard the original operator passed away, but the kits are still for sale.) (Update: There is a new software version available now, but to add to the misery of this kit, some anti-virus programs flag the PC program as a trojan, making it very difficult to use. Their readme (pdf) file will give you an idea of some of the problems with this programmer.) |
|||
![]() |
Finally 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. |
||
![]() |
Furnace Blower Speed ControllerMy first project used a PIC16F84A as a timer to replace a device I had previously built that used two time-delay relays to control a furnace blower motor. |
||
![]() |
ThermometerA thermometer interfaced to either an LED or LCD display, using a PIC16F684. |
||
![]() |
SourceBoost C CompilerJust 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 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 C CompilerHI-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. |
||
![]() |
No BasicI
realize that Basic is a very popular
language for embedded development. I had my fling with basic many years
ago and have moved on. I apologize to all of you basic programmers, you
will not find any basic code on this site. |
||
![]() |
Frequency CounterAn audio frequency counter using a PIC16F684 and either an LED or LCD display. |
||
![]() |
Humidity MeterA PIC16F684 Based Humidity Meter with LED readout. |
||
Battery DischargerA quick and dirty PIC16F684 2-Cell Battery Discharger. |
|||
![]() |
Cable TesterA PIC16F877A 8 conductor cable tester. |
||