What happens if you DON'T set a pin low ? (or high)

12 Apr 2011

Hi all.

here's a good one. I have a transistor connected to a digital out pin. It simply switches an extra resistor into a circuit when I need it.

/media/uploads/DaveStyles/switch.jpg

gives me a very easy 2 state potential divider.

So, I'm messing about with it today, and I'm accidentally not setting the digital out. and my output (from the potential divider) is wandering by about 5%.

I think in my mind I thought it'd be low, if I didn't initialise it.

I get round to sorting the "switch", (I'd forgot to set it low) and when I switch it high or low, my output stops wandering and stabilises !

So.. any ideas what was actually going on ?

was that transistor buzzing open and closed like a very buzzy thing ?

I'm happy it's all become stable, but I'm just wondering what it was doing ?

12 Apr 2011

The base of the transistor should have a week pull down resistor,100L ish

if the base is floating, with the MBED pin as a niput, then I guess, enough noise could radiate, and cause it to start conducting

Enjoy Ceri