Forums

8051 Port2 power consumption

Started by hhanff December 15, 2006
Hi,
I am using a C8051F311 MCU (Silicon Laboratories) and have connected
P2(0:4) to +3.3V (+Vcc) via a DIP switch. When I close all 4 switches,
the MCU consumes so much power that my voltage regulator (a 78M33) goes
into thermal protection and switches off for some microseconds which
resets the MCU.
P2 is configured as digital input.
Why is so much power consumed? Where is my mistake???
Thank you for answers,

/hhanff

hhanff wrote:
> Hi, > I am using a C8051F311 MCU (Silicon Laboratories) and have connected > P2(0:4) to +3.3V (+Vcc) via a DIP switch. When I close all 4 switches, > the MCU consumes so much power that my voltage regulator (a 78M33) goes > into thermal protection and switches off for some microseconds which > resets the MCU. > P2 is configured as digital input.
The symptoms suggest otherwise...
> Why is so much power consumed? Where is my mistake??? > Thank you for answers,
Hold the uC in reset, and measure the current. Then switch one switch at a time, and measure the current. Put a 1K resistor to gnd, and measure the port voltage. -jg
Hi Jim. Thank you for your answer. It helped me on my way. When taking
a look at the datasheet of the CPU, I realized that a better way to
write 0s or 1s to the port is by pulling it to ground with the DIP
switch.

Got it? It's hard to describe but I guess it's the ususal way. I just
didn't know it because I'm new to MCUs.

Thanks,

Hendrik

Jim Granville schrieb:

> hhanff wrote: > > Hi, > > I am using a C8051F311 MCU (Silicon Laboratories) and have connected > > P2(0:4) to +3.3V (+Vcc) via a DIP switch. When I close all 4 switches, > > the MCU consumes so much power that my voltage regulator (a 78M33) goes > > into thermal protection and switches off for some microseconds which > > resets the MCU. > > P2 is configured as digital input. > > The symptoms suggest otherwise... > > > Why is so much power consumed? Where is my mistake??? > > Thank you for answers, > > Hold the uC in reset, and measure the current. > Then switch one switch at a time, and measure the current. > Put a 1K resistor to gnd, and measure the port voltage. > > -jg