General purpose PICBasic programmable board

This web page documents a board with a variety of inputs and outputs, designed to be easily programmed with PICBasic.
Board size is 2.75" square.

Project timeframe: August 2006
Client: Leo Villareal
Initial webpage creation: August 22 2006

(top view)

Feature set:


My client has a need for a simple to program board to control external LEDs (or laser diodes or whatever), as well as generate (and possibly receive) DMX.  It has to be small, battery-powerable, have flexible controls, and relatively cheap.

Technical discussion

Not much of any trickyness.  The pots are 5K so the PIC's A/D can read them without buffering.  The 16 SOT-23 NFETs all have 100K pulldowns to keep them off when power is first applied and PIC is starting up (avoids a flash of external LEDs or whatever at power-on).  The PIC 18F4620 is the microcontroller used.  The debugging serial in/out is also the two external switches, so they can't be used simultaneously.  Likewise, the pushbuttons use the PIC PGC/PGD programming pins, so they cannot be pressed while the PIC is being programmed.  Not a big deal.

Mistakes, tools and future work

All in all pretty good, pcb changes for the prototypes were minor and are easily fixed for the next run of boards.  The two errors that were made:
  1. Wired the pushbuttons wrong, so they were always on.  Made it impossible to program.  Ack.
  2. Pullup resistors for the BCD rotary DIP switch were forgotten.

Tools used:  Eagle 4.16 (, which I wholeheartedly recommend, the CCS PCH C compiler (, which was horrendously buggy for 18 months and is now more or less reasonable, and PICBasic, which I got into for the first time for this board and like a lot.  (

Schematics?  Board layouts?   Gerbers?   BOM?   Software downloads?  ...

Sorry, this was a paying client project and the IP is not available for give-away.  If you would like to purchase some boards or have a proposal for commercialization of the design, feel free to contact me.

However, sample PICBasic code that runs everything:
main code
library code

And CCS C code that does a basic test of the hardware:
test C code