C Routines for Low End Microchip PICs - $10.00


This is a collection of sample C routines to illustrate applications of low end Microchip PICs including the 12C508/509, 12CE518/519, 16C505, 16HV540, 12C671/672 and 12CE673/674. Routines for the 12-bit and 14-bit core devices are written using CCS PCB and PCM, respectively.

This consists of 130 pages of discussion in .pdf format and about 70 sample routines which are distributed via e-mail.

Payment may be made via PayPal. My info is pha@phanderson.com, Last name is Anderson.

This is also available via Amazon zShops

Each processor is discussed in the context of a simple design problem, a frost alarm. This is a simple device that gardeners or farmers might use to warn of a potential frost. The device continually monitors and displays the temperature and if this is less than an alarm temperature setting, a sonalert is pulsed to warn the user of a potential frost condition.

The user may set the alarm threshold using a potentiometer and while setting the threshold, its value is displayed.

Note that this design involves a 1-wire interface with a Dallas DS18S20, some means of measuring the value of a potentiometer and some means of displaying either the alarm threshold and the current temperature. I found that in developing each of the modules and then combining all of the pieces to realize the final design I was able to cover most of the features of each the processors. Thus, for each processor, there are routines to measure temperature using a DS18S20, measuring the value of a potentiometer using an RC network and displaying quantities using 9600 baud serial, flashing an LED or outputting a series of tones. For some processors having adequate IO pins, programs include directly driving a Hitachi type text LCD, sequentially outputting digits to single 7-segment LED

Additional routines were also written to illustrate various other features of each processor that did not fit into the frost alarm design.

Listing of Routines

PIC12C508/509

PIC16C505

PIC16HV540

PIC12C672


Sample Routines