Lightning Detector Source Code

For the lightning detector's microcontroller, there are two files you will want to get. The assembler source code and the hex file that is used to program the device.

I realize that some electronic hobbyists will not have a PIC microcontroller programmer. There are some simple hardware circuits that can built to program PIC's though. Here are a list of links that may be helpful:

    • Microchip sells a complete line of products to program their devices.
    • Picprog programming software, it uses a JDM-style programmer.
    • Wouter van Ooijen's Wisp628 programmer
    • Olin Lathrop's EasyProg
    • For general PIC information the Piclist is a great resource.

If none of the above links prove helpful, contact me and we can work something out so that you can get a part programmed.

To set the comparator's voltage reference to the value I wanted, I wrote a short program in Ruby to print a table of configuration numbers and the resulting reference voltage. Here is a link to the program and its output. This data isn't in the 12F629 reference manual; I wonder if it is in the chip's family reference manual? I bet it is :)