Connect with us

Pull down resistors on bus of microcontroller board

Discussion in 'Electronic Design' started by Rene, Jun 17, 2007.

Scroll to continue with content
  1. Rene

    Rene Guest

    Hello to all!

    I have a question that may sound stupid to one who knows the answer but
    I am bit uncertain about whether what I would like to do would be a wise
    thing. For some time now (I have not much time to spend on my hobby) I
    have been building an experimentation board for AVR processors, quite a
    sophisticated one if You ask me (it's my own design) :). Often one sees
    that output leds are coupled directly to the output ports (well, with a
    resistor off course). I did not like that so I chose to use 74HCT540 bus
    drivers (they sink the current through the led so the latter lights up
    when there is a one on the bus). The bus is 18 lines wide (plus two for
    PS) and which line has which function depends on the adapter that is
    plugged in (it holds the controller)(btw for LED 17 and 18 I use two
    ports from a 74HCT04 in case someone would wonder how to buffer 18 lines
    with 2 octal buffers). The problem is that when a line is "not defined",
    it's led turns on. And sometimes off. And on. And so forth... Point Your
    finger to it and it will do something. The impedance of those drivers is
    obviously extremely high. I noticed that if I use a pull-down resistor
    of 1Mohm on every line, this unwanted behaviour does not occur. However,
    the datasheet of several AVR-processors says that it is not allowed to
    put more than one gate (a HC-buffer) on the oscillator output (XTAL2) of
    the processor if one is using an external crystal. In a datasheet with
    general specs of the 74HC family I found that input leakage current is
    maximum 1 uA, at 25 degrees C even only 0.1 uA. They tested this with a
    VCC of 6 volts. That means an impedance of 6 MOhm and that is more than
    my 1 MOhm.
    My question is whether anybody foresees problems when I mount these
    resistors. Off course there might be a problem if I want to measure an
    analogue voltage from an high-impedance source (the impedance of the ADC
    is, iirc, about 32 MOhm) but in that case I will have to buffer it, no
    problem. But what are Your opinions, apart from that? And when some line
    of the bus will be connected to the crystal, do You think that in real
    life that will cause problems? I can off course make some of these
    resistors "disconnectable" by means of jumpers (I wish I had done that
    with the leds, but then again, then You just wouldn't see them anymore,
    the buffer might still start oscillating), but as I can connect several
    diff. types of controllers through the adapters, it would mean more
    jumpers than for just one type of controller.

    Thank You very much in advance for Your opinions/experiences.

    Yours sincerely,


    P.S. I just thought of what might a smarter solution to the crystal
    problem, if I want to use a controller with an external crystal I can
    put the jumper on the specific controller adapter so that the line will
    not be connected to the bus on the development board. I guess that would
    be best. Remains the question whether there could be other problems.

    P.P.S. I could have rewritten my question after my brainwave from the
    first P.S. but in that case someone might have come up with a suggestion
    about that the crystal might give problems, I thought it would be wiser
    to just leave it like this so You might see that those specific pins
    won't be a problem anyhow.
  2. Rene wrote:

    The crystal oscillator function is analog, not digital, and
    quite sensitive to not only DC leakage ands loading from
    external resistors, but also to capacitive loading. I am
    not familiar with the AVR line, but I suspect the oscillator
    is usually connected to only a few of all the possible pins.
    If you can confirm this, it would be a good idea to have a
    relocatable jumper that would disconnect your pulled down
    buffer input from the oscillator pins and possibly free it
    up for a secondary use.
  3. colin

    colin Guest

    The maximum load of 1 HC gate on the osc output is probably ac limited due
    to capacitance
    and its effect on osc stability.
    It should have no trouble driving a 1M pulldown if it is a true/typical cmos

    ofc you shoulnt have anything at all connected to oscillator input when used
    as an xtal osc.

    Colin =^.^=
  4. whit3rd

    whit3rd Guest

    There are several options on each pin of the processor, including
    'output', 'input' and sometimes 'current-limited output'. In
    it is common for 'input' to be the default, and for a weak pullup
    to be programmed for that state (this is a convenience to
    prevent unused pins from being in an unstable state).

    By using an inverting bus driver you are allowing the input-pin
    state to (through the weak pullup) light the LED. Conventional
    wisdom would be to ADD WEAK PULLUPS and not pulldowns
    (this is a holdover from TTL which dissipates extra power
    when pulldowns are used), and to drive LEDs between the
    74HCT540 output and ground (rather than between output and
    V+). Because the 74HCT540 is CMOS, it can source current
    for this function. And your added pullups establish the
    situation 'inputs float high' which is conventional (and found in
    the most unlikely places- you can't ignore this convention).

    Another conventional solution would be to swap the 74HCT540
    for the 74HCT541 (noninverting but otherwise similar).

    In either case, the 'inputs float high' convention is satisfied, and
    the polarity of your command-the-LED-to-light is inverted from
    the existing situation. Sorry about that.
  5. Rene

    Rene Guest

    Dear John, Colin and With3rd,

    Thank You very much for Your input!

    Yours sincerely,
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