picture home | pixelblog | qt_tools

omino code blog

We need code. Lots of code.
David Van Brink // Fri 2008.08.8 22:42 // {wbl weird blinking lights}


A Future City

Our project for Burning Man this year is a minuscule reproduction of the Trylon and Perisphere from the 1939 World’s Fair. Google it, it’s worth reading a little, seeing a few photos…

Ours will be 16″ in diameter, with a tiny miniature city inside (as opposed to the giant miniature city within the original).

Kitchen Table Prototypeneighbors

Naturally, we’ll need to light this up, both magically on the inside and dramatically on the outside. This is a job for WBLs.


This board is an update from the wbl05a:

Improvements include:

  • Several unallocated power and ground points (good for stabilizing caps, and such)
  • Can be populated for LEDs, or to activate transistors for heavier loads, like speakers or bigger lamps
  • Two power planes, one for the pic, and one for the transistor-driven loads
  • Can take a 7805, for driving (for example) 12v LED clusters and powering the pic at 5v
  • Connection for In Circuit Serial Programming (icsp), which can shorten the code/debug/test cycle significantly.

ICSP and the Pic 12F509

How I do love the 12F509! It costs less than a dollar, and makes lights blink any way you want! And it has the most lovable quirky asymmetric nonorthogonal memory map and feature set you could ever want. It’s like building a ship in a bottle which I’ve never done but I bet it’s kinda like this. Except anyone can see how cool a ship in a bottle is, and only you, dear reader, will know how nifty programming this stupid Pic chip is. I mean, if you give it a go sometime.

Anyway, it’s easy enough to hook up to ICSP, but there are some issues, noted below.

I’m here using the Microchip ICD2, but their PicKit 2 or other programmers should work the same. The rj12 phone jack is from Home Depot, intended to go in a wall, with push-down wires out of some cat-5e.

Some things to keep in mind are:

  • Keep the leads short! I had wires too long, and got comletely sporadic results. Checksum errors, partial programming, all zeroes, nonsense like that. Keeping the wires short (like in the picture> fixed it right up.
  • Only 3 pins left. This makes it a little bit pointless. Two of the outputs, and GP3 (the dedicated input) can’t be used while the ICSP is connected. They probably can if you’re smart enough, but I’m not. Actually, even missing some pins, getting to see the code run right after compiling is quite helpful.
  • There are various contradictory reports in forums and such about using the 12F509’s internal oscillator and dedicated reset pin in various combinations. They all work fine. This is a fact. There are no forbidden combinations of config bits and ICSP. The ICSP “activates” the chip by pulling pin 4, MCLR’, higher than Vcc, so it can’t be locked out.

That’s enough for now! Back to the bottle go I.

oh, i dont know. what do you think?

(c) 2003-2011 omino.com / contact poly@omino.com