Linked to below is the source code for the rugby PIC clock.  It has been written using the Hi-Tech C Compiler.  If you don’t have this compiler (which is likely!) then the hex file is also linked to below, which you can load in any PIC programmer and load on to your PIC 16F88.

Email me for any help/support regarding the code.





3 thoughts on “PIC code”
  1. A Fascinating article.
    I don’t know much about pics but am very keen to find out how I can make a circuit to control my inside and outside lights at home based upon the msf time code.
    I’m up to speed on most analogue electronics and have built all sorts of heavy load controllers based on triacs and solid state relays. I’ve triggered the triac drive circuits using computer outputs (bbc micro!!!! and pc) and by using simple ldr circuits. Is it a huge step to programme a pic to provide combinations of lighting for security purposes eg. one programme to turn certain lights on at 6.00pm then off at 4am etc. and also to provide random control. What is the easiest programming language to use? I’ve use bbc basic (a long time ago) and an up to date schools flowchart control system but haven’t programmed in ‘c compiler’.
    Can you help.
    Kind regards

  2. Tom,

    It’s not a huge step to use a PIC for this purpose, no. I sounds like you already have the knowledge to be able to use a 5V logic line to turn mains supplies on and off, so you’re half way there really.

    Microchip offer a free C compiler – details here:

    I would use the Hi-Tech C compiler if I were you – linked to on the above site.

    You basically just need a tutorial in order to learn the basics on how to program a PIC to toggle lines up and down. You can then extend this into the application you describe.

    There’s a tutorial for Hi-Tech C here:

    Hope this is enough to get you started.



Comments are closed.