Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Problem with P1 ports when initializing the 8051

Status
Not open for further replies.

2000

Member level 5
Joined
May 14, 2001
Messages
87
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
764
hello friends,

I'm having problems initializing the 8051. It's P1 ports are driving 4 relays using a ULN2003 driver, the problem is, when I power on the ckt, all relays are switched on and off. I've tried to use a 7414 to invert all P1 ports, but did not work. How to solve it?

regards,

2000
 

shanren

Advanced Member level 4
Joined
Oct 12, 2001
Messages
102
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
1,079
philips rc 408 schemat

hi,i think you make some mistakes.i did a job like this ,it works well.
i think:
1:do not use any pull up resistor;
2:your relay should be connect in collector of uln2003;
3:use a pull up resistor in P1;
4:if all above can not work,use a enable pin to enouble the uln2003,such as a 74hc244 or 74hc245 driver,use another io to control the 74hc245 enable pin ,do not forget a pull up resistor.
this can slove your problem.
 

flowers

Member level 1
Joined
Dec 2, 2001
Messages
33
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
189
slow power on 8051

To 2000:

Sometimes, you can try ATMEL and Philips one...
DO NOT use winbond one.. We met a lot of problem with winbond.
Its port is easily broken and output glitch while power on.
 

7rots51

Advanced Member level 4
Joined
May 17, 2002
Messages
1,184
Helped
25
Reputation
50
Reaction score
12
Trophy points
1,318
Activity points
9,651
8051 reset ckt

I think you use active high for relay activation,change thw design so that the relays be active low.
 

GrandAlf

Advanced Member level 2
Joined
Mar 9, 2002
Messages
520
Helped
47
Reputation
92
Reaction score
6
Trophy points
1,298
Location
UK
Activity points
4,730
pull up resistor for 74hc245

Most Micros ports go high (read) at power up before your embedded s/w takes over. The best way is to use an invertor on the inputs to the ULNxxx and use active low o/ps. Another way is to use another spare port pin and switch a PNP transistor/relay? that applies common power to all the other relays when the circuit has stabilised. Yet another ways is to use an RC timed relay on the PSU to do the same thing. Hope this gives you some ideas.

Mike
 

2000

Member level 5
Joined
May 14, 2001
Messages
87
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
764
8051 with 74hc245

hello friends,

I tried to invert all the control pins of the uln2003 and invert the software and it did not worked. are the pins crazy on reset?

2000
 

M!k

Advanced Member level 2
Joined
Apr 22, 2002
Messages
682
Helped
109
Reputation
218
Reaction score
35
Trophy points
1,308
Activity points
4,822
8051 power up problem

Some times ago I had a problem powering up a Temic 8051. If the power-up-rise-time was too slow (about some 10ms) the ports did NOT go to a high state, also not when reseted! But the processor and it's ports were running 8O . So check your power-up-time and compare it to the specs.


Mik
 

2000

Member level 5
Joined
May 14, 2001
Messages
87
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
764
8051 reset circuit 7414

I´m UL part of the schematic for you friends take a look and try to help me.

regards
 

GrandAlf

Advanced Member level 2
Joined
Mar 9, 2002
Messages
520
Helped
47
Reputation
92
Reaction score
6
Trophy points
1,298
Location
UK
Activity points
4,730
8051 all ports are in high state

If you absolutely have to use active high ouputs, you could maybe use sil resistor packs and pull to ground, I would suggest 3k3-10k as a starting point. This should be enough to pull down the weak pullup resistors on most ports. This of course will make the circuit a little more power hungry, but should work on micros that can souce moe than a couple of ma. Should be OK on Pics, but maybe a problem on such as 8051s with low drive capability.

Anyway it is not really good design practice, much better to use hex invertors etc. Dont know why it is so difficult to find darlington drivers with invertors built in, bit like trying to find common anode leds :lol
 

aglet1000

Junior Member level 2
Joined
May 29, 2002
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
172
best pull up resistor for uln2003 circuit

This may sound silly but what about a simple RC circuit on the enbale pin of a driver. Connect P1 to the driver 74hc245 (or such) and drive the relays from here. When the system is powered on the RC circuit will keep the driver disabled after the system is initialized then enable the driver. For a reset after the power has been on a while just reset the RC circuit at the same time.
 

waterman

Member level 5
Joined
Mar 27, 2002
Messages
80
Helped
2
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
562
how to initialize 8051

As title. Make sure a correct power-on reset ckt is used.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top