Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 21st May 2007, 02:57 PM   (permalink)
Default Controlling relays using 89c51

Hi friends,

I am driving 5V relays using ULN2803 conncected to a microcontroller 89c51 controller. when switching on the power all the realys are getting switched on and off with in a fraction of secons, since 89c51 initializes all the ports as output ports(i.e high). To avoid this i am trying to make all the port pins as 0's (low), though i am getting the same problem as before. Could anyone suggest me how to rectify this problem by using software logic, since my PCB has been already developed.

Waiting for your suggestion,

with regards,

Chandu,
chandu13 is offline  
Old 21st May 2007, 03:03 PM   (permalink)
Default

Your request does not make sense.

When your 89C51 is under reset condition, all its port pins are high and this is causing you problem. The MCU is not even running any code yet.

How can a "software" change can help in this case?
__________________
L.Chung
eblc1388 is offline  
Old 22nd May 2007, 03:02 AM   (permalink)
Default

8051's have quasi bi directional pins. Even though they are nominally high, any external load can pull them to ground since the pins can source only 60 microamps or so. I'd need to see a schematic to be sure, but I doubt there is a software fix. I see a board relayout in your future. So sorry!
Papabravo is offline  
Old 22nd May 2007, 04:36 AM   (permalink)
Default

So it's a high impedance pullup rather than a low impedance driver?
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is offline  
Old 22nd May 2007, 12:56 PM   (permalink)
Default

Quote:
Originally Posted by Sceadwian
So it's a high impedance pullup rather than a low impedance driver?
In the high state - yes. It can drive a gate input high but can be driven low by an external sink without causing the 8051 chip itself the slightest upset. Intel, and of course the 8051 clones, were the only folks cheap enough to take this dodge in 1978 rather than implement a true data direction register like the 6800 or 6502. Just look what happened to those visionary innovators -- go figure.

Last edited by Papabravo; 22nd May 2007 at 01:00 PM.
Papabravo is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
what are the advantages of pic over 89c51? simrantogether Micro Controllers 16 13th October 2008 11:07 PM
Complex (Sort of) timer circuit using relays... Electric Rain Electronic Projects Design/Ideas/Reviews 15 8th September 2008 01:45 PM
Help, Need a non digital timer circuit. (Relays man) BART Electronic Projects Design/Ideas/Reviews 10 9th November 2006 09:39 PM
89C51 and Relays naimidrees Micro Controllers 5 15th February 2004 02:53 AM
powering relays coma General Electronics Chat 6 23rd January 2004 09:17 AM



All times are GMT. The time now is 06:05 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker