Connect with us

How do I set a Divide-By-N counter High or Low

Discussion in 'Electronic Design' started by Guest, Sep 30, 2004.

Scroll to continue with content
  1. Guest

    Guest Guest

    I need to know how to set the pins on a Divide-By-N counter either High or
    Low on a PCB. Also is "1" and "0" the same as high and low?

    Can anyone help me?
  2. Mac

    Mac Guest

    I'm hesitant to answer this question because it looks like a troll. I
    mean, you know what a Divide-By-N counter is, and you use the term PCB,
    but you're not sure whether high is the same as 1 and low is the same as

    Anyway, if you are designing the circuit board, connect the pins to VCC
    (the positive power supply) to set them high, and connect them to GND
    to set them low. And yes, High is the same as 1, and Low is the same as 0.

    If you're not sure where you want to set them, you might consider adding
    resistors. You would connect two resistors to each pin you're not sure
    about. One resistor would be connected to VCC, and the other to GND. Only
    when you actually make the board, you only install one of the resistors.
    That way you can change your mind about the exact settings.

    Now, on the other hand, if you are tweaking an existing circuit board,
    that is a more difficult task. You can still connect the pins to VCC or
    GND by soldering a short piece of wire to them and connecting the other
    end to the desired Voltage, but if some other circuit is driving those
    pins, the direct connection to power or ground will likely fry that
    circuit. This may or may not matter to you, depending on your scenario.

    I guess I should also mention that some IC's nowadays have multiple power
    connections of differing voltages. So the notion that there is just one
    VCC could be wrong. Before making any connection, you should probably
    double-check with a volt-meter (while the board is powered) that the net
    you want to connect to is at the desired voltage level.

    Anyway, if you don't want to fry the circuitry driving that net, another
    option is to lift one of the pins (assuming it is a surface mount device).
    You can remove most of the solder from a pin, then bend it up carefully
    off of the circuit board while the remaining solder is still molten (Keep
    the soldering iron on the pin while you bend it up). Then you can solder a
    wire to the pin, and connect the other end of the wire to whatever you
    want (VCC or GND). This is a fairly delicate task, and if you don't have
    anyone to show you the finer points, you should expect to do some
    (possibly irreparable) damage to the board the first time you try it.

    The most common problems are that you bend the pin and thereby lift the
    surface mount pad off of the board (this happens when the solder is not
    molten), and that you bend the pin too far or too many times and it breaks
    off altogether.

    Good luck. I think you're going to need it!

  3. Rich Grise

    Rich Grise Guest

    That's odd. I was about to recommend using the "preset" or "clear" inputs.

  4. John Fields

    John Fields Guest

    Not so far, huh?^)

    Anyway, an easy way to do it is to use pullup resistors and shunts,
    (those little 2-pin connectors that short two header pins together)
    and then to use the counter's LOAD input to load the ones (high, Vcc,
    supply positive) and zeroes (low, ground, 0V, supply negative) into
    the counter.

    The basic scheme goes something like this:

    Vcc Vcc Vcc Vcc
    | | | |
    [R] [R] [R] [R]
    | | | |
    +--->>-+ +--->>-+ +--->>-+ +--->>-+
    | J4| | J3| | J2 | J1|
    | +->>-+ | +->>-+ | +->>-+ | +->>-+
    | | | | | | | |
    | | | | |
    | | | | |
    | | | | |
    | +---+----------+----------+----------+---+
    | | D C B A |
    | | |
    CLOCK>--|--|>CLK |
    | |_ MAX/MIN|--->OUT
    Vcc>----|--|U/D 74HC191 |
    | |____ |
    +-O|CTEN |
    |____ __|
    +-O|LOAD RC|O-+
    | +----------------------------------------+ |
    | |

    The possible combinations of jumpers (shunts) and the resultant lows
    and highs (and their hexadecimal numerical values) on the counter
    numerical inputs looks like this:

    J4 J3 J2 J1 D C B A Hex
    IN IN IN IN 0 0 0 0 0
    IN IN IN OUT 0 0 0 1 1
    IN IN OUT IN 0 0 1 0 2
    IN IN OUT OUT 0 0 1 1 3
    IN OUT IN IN 0 1 0 0 4
    IN OUT IN OUT 0 1 0 1 5
    IN OUT OUT IN 0 1 1 0 6
    IN OUT OUT OUT 0 1 1 1 7
    OUT IN IN IN 1 0 0 0 8
    OUT IN IN OUT 1 0 0 1 9
    OUT IN OUT IN 1 0 1 0 a
    OUT IN OUT OUT 1 0 1 1 b
    OUT OUT IN IN 1 1 0 0 c
    OUT OUT IN OUT 1 1 0 1 d
    OUT OUT OUT IN 1 1 1 0 e
    OUT OUT OUT OUT 1 1 1 1 f

    Basically what happens is that when the counter counts to zero, the
    next high-to-low transition of the clock will pull the RC output low.
    When that happens, the LOAD input will be pulled low, which will force
    the number on the numerical inputs into the counter. Because of that
    the counter will leave its zero state, the RC output will go high, and
    the counter will start counting down from the number loaded into it.

    For example, if 1010 was loaded into the counter it would need ten
    clocks to occur before it counted down to zero and the RC output went
    low and started everything over again. So, for every ten clocks in
    there would be one low-going RC output, and the counter would be
    dividing by ten. (or 9? Do the timing to be sure) The high-going TC
    output is also available, instead of the RC output, and it goes high
    as soon as the counter gets to zero and goes low again when any
    non-zero number is loaded into the counter.

    For timing diagrams and more details about how the counter works, go
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