Maker Pro
Maker Pro

8051 port question

A

Abe

Maybe this is a somewhat stupid question, but I just can't seem to get
the right answer for it. I am implementing a DS89C420 (8051 derivative
with lotsa free samples) based system. I will be selecting one of 8
external devices which can either be talkers (i/p) or listeners (o/p).
Now the 8-bit data as output is sent through P1 and input is recvd on
P0 while p2's pins act as device selector. Now the question:
2 devices are talkers and hence connected to P0. How am I supposed to
wire them to the p0? Since they have tri-statable o/p, there is not
problem with directly connecting their similar bit lines directly to
p0's pin. But do I reqiure to put a pull up resistor, or do I have to
put a resistance between the p0's pin and the junction of the 2
devices' lines. or I can directly connect the lines directly to p0.

Alternative 1
___0-<-Device 1
uC p0.0-o---<___
0-<-Device 2

Alternative 2

1KOhm ___0-<-Device 1
uC p0.0-o-/\/\/\-<___
0-<-Device 2
Alternative 3

0 5V
|
\
/ 5K1 Ohm Pullup
\
/
| ___0-<-Device 1
uC p0.0-o-+-<___
0-<-Device 2

Which one is right?

Additionally when I start up the system, according to the datasheet,
the uC takes about 65536 cycles (@11.0592Mhz) after power-up to begin
execution. So before this occurs, can the devices actually screw-up
each other's o/ps due to all being enabled simultaneously. Or will
their performance degrade over time? If so, is there a work around?
Thanks in advance,
Regards,
Abhijit Karnik
India
 
T

Tim Dicus

Abe said:
Maybe this is a somewhat stupid question, but I just can't seem to get
the right answer for it. I am implementing a DS89C420 (8051 derivative
with lotsa free samples) based system. I will be selecting one of 8
external devices which can either be talkers (i/p) or listeners (o/p).
Now the 8-bit data as output is sent through P1 and input is recvd on
P0 while p2's pins act as device selector. Now the question:
2 devices are talkers and hence connected to P0. How am I supposed to
wire them to the p0? Since they have tri-statable o/p, there is not
problem with directly connecting their similar bit lines directly to
p0's pin. But do I reqiure to put a pull up resistor, or do I have to
put a resistance between the p0's pin and the junction of the 2
devices' lines. or I can directly connect the lines directly to p0.

Alternative 1
___0-<-Device 1
uC p0.0-o---<___
0-<-Device 2

Alternative 2

1KOhm ___0-<-Device 1
uC p0.0-o-/\/\/\-<___
0-<-Device 2
Alternative 3

0 5V
|
\
/ 5K1 Ohm Pullup
\
/
| ___0-<-Device 1
uC p0.0-o-+-<___
0-<-Device 2

Which one is right?

Additionally when I start up the system, according to the datasheet,
the uC takes about 65536 cycles (@11.0592Mhz) after power-up to begin
execution. So before this occurs, can the devices actually screw-up
each other's o/ps due to all being enabled simultaneously. Or will
their performance degrade over time? If so, is there a work around?
Thanks in advance,
Regards,
Abhijit Karnik
India

Just connect the data lines directly. Port pins initialize to inputs with weak pullups, except port0 (it floats). If your external
devices use a low-level activated chip select (CS), then they can be connected directly to port2 also. If port2 on your model floats
instead of having weak pullups like a "true" MCS51 series, then you will need to install your own weak pullups there to insure the
external devices do not output data at the same time during startup. That would probably cause damage after a while. Check the
datasheet.

Hope that helps,

Tim
 
A

Abe

Tim Dicus said:
Just connect the data lines directly.

Port pins initialize to inputs with weak pullups, except port0 (it
floats). If your external
devices use a low-level activated chip select (CS), then they can be connected directly to port2 also.

If port2 on your model floats
instead of having weak pullups like a "true" MCS51 series, then you will need to install your own weak pullups there to insure the
external devices do not output data at the same time during startup.

That would probably cause damage after a while. Check the
datasheet.

Hope that helps,

Tim

Thanks
Abhijit
 
T

Tim Dicus

***
Yes. No resistors.
***
Port pins initialize to inputs with weak pullups, except port0 (it
floats). If your external

***
Since you are using port2 for addressing, you should not need pullups. Check your datasheet to make certain that this model has the
weak pullups. I am not familiar with the DS89C420, but I am familiar with the MCS51 series (8031, 8051, etc.) from Intel.
***
If port2 on your model floats

***
Do you have, or know a link to the datasheet for this device? I would be glad to take a look.
***

Thanks
Abhijit

You are very welcome,

Tim
 
T

Tim Dicus

Abe said:
Port pins initialize to inputs with weak pullups, except port0 (it
floats). If your external

If port2 on your model floats

That would probably cause damage after a while. Check the

Thanks
Abhijit

The DS89C420 is a Dallas Semiconductor processor. Port2 has weak pullups when set to an input (startup default). Datasheet at:
http://pdfserv.maxim-ic.com/en/ds/DS89C420.pdf

Hope that helps,

Tim
 
Top