Magic Multiplexing

December 26th, 2008

Everyone loves multiplexing.  You know, turn on one digit for a little bit, turn on the next one, and so forth.  It save power compared to having everything on all the time, and it allows you to use one pin for each segment and one pin for each digit instead of (num of digits)*(num of segments) pins on your microcontroller.

But… as with almost anything, there are a couple different ways to do it.  The standard would be to illuminate one digit at a time, and the hardware, if you do it the “right way”, is one current limiting resistor per segment, plus one transistor per digit to turn it on or off.  

But what if you don’t want to use all that jazz?  What about just hooking all the pins straight to the microcontroller?   Read the rest of this entry »

CPLD: fast and cheap

December 12th, 2008

I’ve been trying to come up with a cheap and fast way to add a CPLD to projects, and saw a very neat thing on Hack a Day: how-to: programmable logic devices (cpld).

Read the rest of this entry »

Your Friend the Op Amp

December 2nd, 2008

Many people take the seemingly lowly op-amp for granted.  Most people won’t think twice about throwing one in to a circuit to boost a signal or buffer some sensor, preparing one signal to be fed somewhere else in a circuit to become something more exciting or useful.

Read the rest of this entry »

Intense DIY 0-1.75GHz Spectrum Analyzer

November 21st, 2008

While stumbling about the interwebs, I found a pretty nice project for a 0-1750 MHz spectrum analyzer that you could, theoretically, make yourself. Read the rest of this entry »

Old Electronic Books… For Free!

November 20th, 2008


I found some electronics books from the 40’s and 50’s, or so, and thought they’d be worth posting about.

Read the rest of this entry »

MacBook X-Ray

November 20th, 2008

MacBook x-ray via Make:Blog

Other X-Rays of note after the break…

Read the rest of this entry »

LEDs are FUN!

November 20th, 2008

An interesting video on Make:Blog about LEDS.  I love LEDs, so colorful and so bright!


MAKE presents: The LED from make magazine on Vimeo.

Read the rest of this entry »

Interesting New PIC Stuff

November 20th, 2008

A little late in coming, but Microchip has announced two new programmers/debuggers for their line of 8/16/32 bit microcontrollers.

Read the rest of this entry »

In Soviet Russia, Analog Pin Programs YOU!

September 24th, 2008

No microcontroller experience is worse than crafting some code, getting it running in debug mode, only to have it be completely non-functional when you program the “release” version.  It sucks being stuck with few options to see what is going on.

 A potentially big source of such issues on dsPIC 30f/33f devices are the ADPCFG (30f) and the AD1PCFG and AD2PCFG (33f) registers.  These cryptic acro-breviations are the locations at which you tell your chip whether an analog pin is to be used for analog input or digital I/O.  They are set to 0×0000 on reset, meaning all analog pins are set to analog.  Therefore, if you have a digital thingy attached, and you try to use it, it probably won’t work.  I say probably because sometimes the debugger can set the analog pins to digital I/O.  So if you forget to set all your digital I/O pins to 1’s in the appropriate ADxPCFG register, your program may function perfectly while using the debugger, but fail completely when you try to run it stand-alone.To avoid this hard to debug bug, give this crazy register what it wants.  I’d initialize it right after you set up the stack, so when you refer back to that file to see how to initialize the stack you’ll see the weird

mov 0×00fa, w0  
mov w0, ADPCFG

and think, “hey, I almost forgot about that stupid thing, good thing I put it way up here.  Thanks me.”  And your past self will feel a sense of accomplishment in saving future you from hours of fruitless debugging.