help regarding at89s52 output

Thread Starter

nuclearsam

Joined Dec 7, 2007
7
hi

i m using at89s52 in my project... i need to drive a relay using it. i m using a transistor to drive the relay and the output from the microcontroller goes to the base of transister via resistance... the relay works properly when base is connected to 5 volt supply and it consumes 4.2mA but when i connect the base to the pin of at89s52 (through a resistance) the output voltage of the pin drops significantly to 0.67 V from 5 V.... i don't know why this is happening.... i tried reprogramming the microcontroller but all in vain... due to voltage drop the relay is not functioning... please help asap......


hasta la vista
 

Papabravo

Joined Feb 24, 2006
21,225
No member of the 8051 family has outputs that can source current. That is the nature of the quasi-bi-directional port pin structure that has been a part of the architecture since 1980. What this means is that your outputs can sink current but they cannot source current. I suggest a high side switch controlled by a common base amplifier. It is two transistors but solves the problem.
 
Top