4 bit synchronous binary counter

Discussion in 'The Projects Forum' started by raphaelriv29, Nov 4, 2013.

  1. raphaelriv29

    Thread Starter New Member

    Nov 4, 2013
    10
    0
    Hello all

    I'm trying to learn how counters work so I picked this 74HCT4520 synchronous binary counter up and I did the following

    pin 1 - clock input
    pin 2 - set high
    pin 3 - LED1
    pin 4 - LED2
    pin 5 - LED3
    pin 6 - LED4
    pin 7 - set LOW
    pin 8 - GND
    pin 16 - 5V

    so viewing the state of the LEDs I thought upon resetting the counter once it would start counting from state 0000 ---> 1111 (2^4 = 16 values 0-15)
    but the counter its random, I don't see a nice count such as:

    0000
    0001
    0010
    .
    .
    .
    .
    .
    1111

    instead I see the values all over the place, worth saying that there are 16 values after it starts to count again so at least that seems to make sense. What concept am I missing? :confused:

    also what is the point of pin 2 and 10, looking at the figure 6, the timing diagram shows that when the regular clock goes low if a clock is fed into this pin than the count continues? :confused:

    Thanks

    Newbie
     
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    You aren't trying to use a pushbutton/switch as a clock, are you?

    If so, look up switch bounce and understand why you can't use a pushbutton as a clock (unless you denounce it first).

    If not, what is the frequency of your clock?

    Yes, it would appear that pins 2 and 10 allow the counter to count when the clock is low.
     
    Last edited: Nov 4, 2013
    raphaelriv29 likes this.
  3. alexfreed

    Member

    Oct 8, 2012
    72
    10
    raphaelriv29 likes this.
  4. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    raphaelriv29 likes this.
  5. raphaelriv29

    Thread Starter New Member

    Nov 4, 2013
    10
    0
    I was just using a push button to generate a clock.
    thanks for the help!
     
  6. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,361
    If you wish to avoid having to debounce a pushbutton simply use a 555 timer circuit set for a low frequency. Even a simple 74LS14 or 74HCT14 inverter oscillator would do the trick.
     
    raphaelriv29 likes this.
  7. raphaelriv29

    Thread Starter New Member

    Nov 4, 2013
    10
    0
    hey guys,

    I have another question, so I was able to feed a proper clock signal that gives me a nice count. The following output was obtained from the first binary counter of the HC4520:

    Output 1: 3.2 KHz (frequency) 128.9 μs(width)
    Output 2: 1.6 KHz (frequency) 250.9 μs(width)
    Output 3: 802 Hz (frequency) 580.0 μs(width)
    Output 4: 400 Hz (frequency) 1107.7 μs(width)

    so all of those make sense but shouldn't the width of Output 1 be approximately twice that of the Clock input?

    My second dilemma is, when I feed "Output 4" to pin 10 of the second counter and grounded the CLOCK input pin 9. This gave me the following outputs:

    Output 5: 200 Hz (frequency) 2496.1 μs(width)
    Output 6: 200 Hz (frequency) 14.81 μs (width)

    What I noticed is that output 6 ends up having the same width as the original input, but with a frequency of 200 Hz (which makes sense) but how is the width working here?

    thanks
     
  8. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,361
    Depends on what you mean by width.

    You should be measuring the period of the waveform, not the width of the pulse.

    The width of the input clock pulse has no effect on what happens at the outputs. The outputs should have 50% duty cycle, i.e. the width is half the period.
     
    raphaelriv29 likes this.
  9. raphaelriv29

    Thread Starter New Member

    Nov 4, 2013
    10
    0
    that's correct, all outputs have 50% duty cycle (by width I meant the pulse width) but I only started fixating on this because I noticed a difference and I wasn't sure why it was happening.

    I'm going to play with this some more but if I feed a non-50% duty cycle clock vs a 50% duty cycle clock signal, it makes no difference?
     
  10. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,361
    That's what I said.
     
Loading...