Connect with us

8051 port question

Discussion in 'Electronic Design' started by Abe, Feb 29, 2004.

Scroll to continue with content
  1. Abe

    Abe Guest

    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,
    Abhijit Karnik
  2. Tim Dicus

    Tim Dicus Guest

    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

    Hope that helps,

  3. Abe

    Abe Guest

    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
  4. Tim Dicus

    Tim Dicus Guest

    Yes. No resistors.
    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.
    Do you have, or know a link to the datasheet for this device? I would be glad to take a look.

    You are very welcome,

  5. Tim Dicus

    Tim Dicus Guest

    The DS89C420 is a Dallas Semiconductor processor. Port2 has weak pullups when set to an input (startup default). Datasheet at:

    Hope that helps,

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day