Monday, February 16, 2009

The infinite circuit...

Some years ago (2004?) I was writing a simulator for a PIC microcontroller. I though it was a neat project, and maybe someon else would be intersted. So, I put up a website for it.

I wanted to make it look better, so I did a background for it.

Website backgrounds often (though not always) consist of a image that is repeated "forever" (or at least enough to fill the page). So, for a good background, the image should "make sense" when the right/left/top/bottom of one image connets to the corresponding left/right/bottom/top of the adject image (think of the image as the 2-D equivalent to the unit cell in crystalography).

Since I was dealing with microcontrollers and circuits, I decided to make a large "mesh" circuit that could go on forever.

I started with a simple circuit:

that was drawn so that connections on the top would match the connections on the bottom, and connections on the right would match the connections on the left.

So, doing a cut-and-paste, you can see how the circuit matches on top, bottom, right, and left (click on the picture for a better view):


And since each of the new circuit placements can have their own connections, you get a complete grid (click on the picture for a better view):


For the website background, I greyed-out the image so that the text could be read.

I occasionally toyed with the idea of writing software for the processors in the mesh -- something simple that would do a state change based on the linkages to it's neighbors, and see what would evolve in the system. Differences in startup timing and power-up RAM values would create a random starting point for every power cycle, and a new pattern every time.

Why did I use the full-featured (i.e. expensive) 12F675 instead of it's cheaper cousin, the 12F629, or even the lowly 12F508? Because I was working my 12F675 simulator at the time. If it ever gets built, save yourself some money with a simpler chip.

(Note: Edited 2/18/2009 -- I was off by a pixel on my tiled images)

No comments: