Bizzare: 74LS90 can't count.

Discussion in 'The Projects Forum' started by NZMikeV, Jun 19, 2010.

  1. NZMikeV

    Thread Starter New Member

    Jun 18, 2010
    22
    0
    Hi there,
    I am working on a clock project and have a rather unusual problem with a 74LS90 decade counter. Found lots of threads on the counter but none with my particular problem. Instead of counting 0..9, my counter is producing the sequence: 0,1,2,3,12,13,4,5,14,15,6,7,8,9 :confused:
    I have double/triple checked all my wiring and can't find a fault. I have also tried replacing the counter chip and same problem.
    My schematic is based on the HowStuffWorks digital clock http://electronics.howstuffworks.com/gadgets/clocks-watches/digital-clock6.htm
    I have a 555 producing pulses, a single 74LS90 wired as in the schematic for divide-by-10 and watching the binary output via LEDs.
    Thanks is advance for any suggestions.
     
  2. bertus

    Administrator

    Apr 5, 2008
    15,649
    2,348
    Hello,

    Take a look at the datasheet of the 7490.
    This has some thruth tables in it with how to connect it.

    Bertus
     
  3. NZMikeV

    Thread Starter New Member

    Jun 18, 2010
    22
    0
    Cheers. I already have those datasheets but I can't see the problem in there. As far as I can work out, the 47LS90 can only count to a maximum of 9 so the strange values of 12,13, etc between the normal figures should not even be possible?

    I'll draw up and post a schematic in the morning to see if that sheds any more light on why 47LS90 insists on acting the goat.
     
    Last edited: Jun 19, 2010
  4. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Correct, the 7490 can count to 9 (or 5, or 2), if you want additional digits you will need a second counter.

    Why not show us the schematic you're using?
     
  5. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  6. bertus

    Administrator

    Apr 5, 2008
    15,649
    2,348
    Hello,

    Did you read the thruth tables in the datasheet?

    [​IMG]

    I think you are looking at the worng leds to calculate the number.

    Bertus
     
  7. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
    The 7490 is what is known as a Bi-Qinary counter. It has two stages involved. One is simply a divide by 2 counter. The other is a Divide by 5 counter. Depending upon how the two counters are connected, various results can be obtained. According to my 1976 TTL Data Book (remember those, guys and gals), to get a BCD count sequence, you need to connect Qa (Pin 12) to input B (Pin 1). The BCD values are then taken from Qa=1, Qb=2, Qc=4 and Qd=8. Hope this helps!
     
  8. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    My 1981 Motorola and my 1984 Signetics manuals agree.

    We might note that the OP's count -
    - is impossible with a 74LS90. He would need to be using a binary counter like the 'LS93 to get a value of 15 (Fh).
     
  9. bertus

    Administrator

    Apr 5, 2008
    15,649
    2,348
    Hello,

    @ beenthere,
    The strange thing is, the OP notes 14 values, the 7490 can only make 10.

    Is the correct counter used?

    Bertus
     
  10. NZMikeV

    Thread Starter New Member

    Jun 18, 2010
    22
    0
    Hi folks,
    Thanks for the advice so far. Still can't see anything wrong with my project.
    I've included the schematic with this post. Hope this will help shed some light on the problem. One thing worth noting is that when I remove the transistor and LED used to show the pulse, the behaviour of the counter changes. It starts looping in a pattern of 8 'pseudo-random' numbers. Haven't written the values down but can do so later. This behaviour is clearly not right either but it goes to show something.. (just not sure what :))
     
  11. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,159
    Why not remove the transistor entirely and use just the resistor and LED connected to pin 3 of the 555?

    You might want to add a 10 nF cap between pin 5 (Control) and ground.

    From what I see, the e-b junction of the transistor is always conducting because the 555 output will never get high enough to turn the transistor off.
     
    Last edited: Jun 20, 2010
  12. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
    First thing I would check would be individual output voltage right at the IC pin when an LED is ON. With the load you have, it may be marginal for the operation of the internal gates that provide the count function. Try using a buffer if you need bright lights or increase your 220 ohm reistors to 1K. The LEDs will still light with the 1K but not as brightly.
     
  13. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    That value of "5 - 13 volts" for Vcc is a killer for the 74LS90. That voltage can't exceed 5.5 volts or the IC dies. Using 360 ohms for the LED limiting resistors is better than 220, but still a stretch for the logic. Using a buffer or transistor drivers for the LED's is even better.
     
  14. bertus

    Administrator

    Apr 5, 2008
    15,649
    2,348
    Hello,

    The powersupply should be 5 Volts or you will burn the 7490.

    I added a power-on reset, this will overcome the problem of strange counts at start-up.
    Whithout this the count may start in a undefined state that also includes higher values.

    [​IMG]

    Bertus
     
  15. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Unless the voltage written means 5.13V
     
  16. NZMikeV

    Thread Starter New Member

    Jun 18, 2010
    22
    0
    The voltage is 5.13V, not 5V - 13V. Sorry I didn't make it clearer on the schematic.
    Thanks for all the suggestions.
    I'll try with the power-on-reset and higher value resistors to the LEDS and extra capacitors. It wouldn't surprise me if it's a current or voltage issue as two seperate counter chips were suffering the exact same problem.
    I'll discard the transistor-LED indicator and use a resistor as in the modified schematic. I only did the transistor thing because the LED sucked up too much current when it was inline (can't think why I didn't just do a resistor off the side).
    I'll make the mods tonight and let you know how it goes.

    Mike.
     
  17. NZMikeV

    Thread Starter New Member

    Jun 18, 2010
    22
    0
    Yahoo!, I got the thing working! I applied all the suggestions to the circuit. What finally kicked some sense into the 7490 was bridging pins Vcc and Gnd with a capacitor. (Guess I should have done that from the start - live and learn :D). The timing isn't exactly smooth but that may be due to the capacitor value I used - 0.1uf Polyester, and pin 5 on the timer is still floating. But, my project is now sitting on the table happily counting between 0 and 9 in base2 forever and ever.
    As an offshoot. I can probably get my 7-seg LED decoder chip working correctly now too.

    Big Thanks to everyone that provided assistance. I would have been absolutely stuffed without the advice from this forum.

    Kind Regards
    Mike.
     
  18. bertus

    Administrator

    Apr 5, 2008
    15,649
    2,348
    Hello,

    The decoupling capacitor is one of the basics.
    At each IC you should have one.
    At the 555 it may be a bit larger as the 0.1 uF.

    Bertus
     
  19. NZMikeV

    Thread Starter New Member

    Jun 18, 2010
    22
    0
    Yeh, Pity the HowStuffWorks clock schematic doesn't include them. Guess they got lucky! Perhaps I should have known better after reading up on the 555 but this is my first time working with ICs in a project.
    A Dick Smith project book included a single capacitor across all ICs but gave no explanation for it's inclusion.

    Thanks again all
    Mike.
     
Loading...