Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

7 Segment LCD Counter Problem

Status
Not open for further replies.

change1

New Member
Hello,

I am designing a counter that will count the # of time the light is turned on/off. I am using a HEF4510B BCD up/down counter & a MC14543B BCD-to-Seven Segment Latch/Decoder to a 7 segment LED. I am able to count from 0 through 9, but the 8 is missing. I can't figure out why the 8 is missing? Any help would be appreciated. Attached is the schematic.

**broken link removed**
 
TC output, pin 7, on the counter should not be grounded. Maybe that is upsetting the counter.

Also, MR, pin 8, should not be floating. Tie to ground when counting.

CE, pin 5, should be grounded, not floating.

PL, pin 1, should be grounded, not floating.

CP, pin 15, is positive edge triggered. Risetime with a pull-up is slow. Try lowering value of 15K resistor, just to see what happens, say, to 500 ohms.

Diode is problematic. CP is indeterminate when transistor is on. Try shorting it out.

You might have poor grounding. When counter counts from 7 to 8 more internal gates are switching simulaneously than during other counts, resulting in greater current draw and resulting switching spikes. Check that ground connections are short and try to connect them to a single point, or close to a single point. A 0.1 uF bypass capacitor from counter Vdd to ground, close to counter pins, my be in order if grounding is proper.
 
Last edited:
Try these changes:
 

Attachments

  • counter.GIF
    counter.GIF
    100.2 KB · Views: 556
Barring every idea mentioned, at this point, I would be suspecting a flaky counter chip, or something's up with the power supply voltage/regulation.

That phototransistor pulse source for a clock input, as it is, is not the best design, but it does work for the other counts, so it is hard to fault it as the cause of the problem. I still don't like it. It wouldn't hurt to try a substitute external pulse source with bounceless, fast rise and fall edges, though, before replacing parts. Clock inputs are very sensitive to bounces and slow edges and strange things can happen with them. If you don't have a clean external pulse source, try putting a buffer between the phototransistor output and the counter clock input that has Schmitt trigger input, such as a 4093 or 4584.
 
I've noticed that you have a table for binary 0-7 next to your diagram. Do the O1-O3 outputs cycle properly from 7-9? ie:

7= 0111
8= 1000
9= 1001
 
I'm starting to wonder the same thing...maybe the chip is defected? its an old chip that i found at work...probably like 15+ yrs old? i checked Radio Shack to see if they carry the the 2 chips, but all RS carry is the 555 chip...



Barring every idea mentioned, at this point, I would be suspecting a flaky counter chip, or something's up with the power supply voltage/regulation.

That phototransistor pulse source for a clock input, as it is, is not the best design, but it does work for the other counts, so it is hard to fault it as the cause of the problem. I still don't like it. It wouldn't hurt to try a substitute external pulse source with bounceless, fast rise and fall edges, though, before replacing parts. Clock inputs are very sensitive to bounces and slow edges and strange things can happen with them. If you don't have a clean external pulse source, try putting a buffer between the phototransistor output and the counter clock input that has Schmitt trigger input, such as a 4093 or 4584.
 
You don't really need a scope. A voltmeter or four LEDs, with apx 2.2K resistors in series with them, connected to the BCD outputs of the 4510 will show you what you need to know.
 
good idea...let me go try it...will let you know what i find out?



You don't really need a scope. A voltmeter or four LEDs, with apx 2.2K resistors in series with them, connected to the BCD outputs of the 4510 will show you what you need to know.
 
Ok, i put a voltmeter on each of the Outputs (0o - 03)...all the outputs are correct except for the digit 8....it goes from 7 to 9 and skipped 8...

0000
0001
0010
0011
0100
0101
0110
0111
1000 (Skipped)
1001


I'm starting to wonder if this chip is defected?


You don't really need a scope. A voltmeter or four LEDs, with apx 2.2K resistors in series with them, connected to the BCD outputs of the 4510 will show you what you need to know.
 
I'm starting to wonder if this chip is defected?
It sure looks like the 4510B is the culprit.
Strange behavior though. As long as the inputs are all connected and the clock input is clean, then it shouldn't behave like that. Replace it and see.
 
ok, i transferred the components from the breadboard to a pcb and soldered all the components together...turned it on and the 8 came on... strange? maybe it was the length of my wire (acting as an antenna?) when it was on the breadboard? EMC? but now its working properly... crazy! thanks for everyones help...
 
Fine business. Glad to hear it.

I am curious, though. Why would you solder all the parts in given that you thought the counter was defective?
 
this was for a school project...and it needs to be on a pcb and in a box for displaying purpose...so I thought missing the 8 will at least get a 3.5? but instead it works...it's probably not a defected board, but EMC, or ground shifting issue?



Fine business. Glad to hear it.

I am curious, though. Why would you solder all the parts in given that you thought the counter was defective?
 
this was for a school project...and it needs to be on a pcb and in a box for displaying purpose...so I thought missing the 8 will at least get a 3.5? but instead it works...it's probably not a defected board, but EMC, or ground shifting issue?

My guess, given everything together, is that is was a grounding issue. Best wishes for a 4.0. :)
 
Solution

The problem was key filters (debounce).... in my project I used 100nF and 10K resistor, but got almost same problem.... solved using 22pF and 10K (but bad filter) or 100nF and 1K resistor (good filter).
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top