Maker Pro
Maker Pro

The ultimate clock-problem (74LS42)

R

Rikard Bosnjakovic

Jan 1, 1970
0
Greetings

I have a small assembly consisting of a 74LS192 (BCD-counter), 74LS42
(BCD-to-decimal decoder) and a 74LS02 (NOR).

Using my breadboard, I built a debounce-switch after John Field's
schematic in my earlier post (thanks!) and connected everything. The
pins LOAD and DOWN on 74LS192 are connected to +5 (I'm only counting
up). And since I only want to count 1-5 (and repeat) I connected pin 6
of 74LS42 to the NOR-gate and then to CLR on 74LS192 (together with a
pulldown-resistor). Since the outputs of 74LS192 are HIGH when the
number is not due, this makes CLR be zero through the NOR. As soon as 6
is reached (the output goes LOW), NOR feeds a HIGH to CLR and the
counter starts over. Works flawlessly on the breadboard.

However. I rebuild the circuit on a stripboard/veroboard and I've
double-double checked all connections and copper tracks for unproperly
cuttings, but I still get the following weird error: Instead of getting
the sequence 1, 2, 3, 4, 5 (checked with a LED on each pin) and repeat,
I get this sequence:

1 (when power on)
4 (when button pushed and released)
1, 2 (when button pushed - yes, 1 _and_ 2)
5 (when button released)
1, 2 (push)
5 (release)
(1, 2 and 5 above repeats 3 times)
<blank> (5 times)
3 (when push + release)
5 (when push + release)
1,2 (when push + release)
(3, 5 and 1,2 above repeats every time here after)


After a double double-checking making sure the CLR-pin was not shortcut
with some of the output-pins I assured myself that it wasn't. Like I
said, the ICs work on my breadboard so they are not broken or similiar.

This problem is driving me nuts.

Can anyone shed some light of what on earth is happening?



--
Rikard Bosnjakovic http://bos.hack.org/cv/

Anyone sending unwanted advertising e-mail to my address will be
charged $250 for network traffic and computing time. By extracting
address from this message or its header, you agree to these terms.
 
L

Lord Garth

Jan 1, 1970
0
Rikard Bosnjakovic said:
Greetings

I have a small assembly consisting of a 74LS192 (BCD-counter), 74LS42
(BCD-to-decimal decoder) and a 74LS02 (NOR).

<snip>
After a double double-checking making sure the CLR-pin was not shortcut
with some of the output-pins I assured myself that it wasn't. Like I
said, the ICs work on my breadboard so they are not broken or similiar.

This problem is driving me nuts.

Can anyone shed some light of what on earth is happening?

Isolate the individual IC's from each other and test each stage
independently.
You might add a power on clear so you automatically start at zero.
 
R

Rikard Bosnjakovic

Jan 1, 1970
0
ryan said:
add a pull-up resistor to the push-buton, don't leave it floating

The button isn't floating, I just didn't include the actual
debouncer-circuit since it can be found in the thread "Trigger pulse
from a push button" in this group, in the article dated 2005-03-25 by
John Fields (who made that circuit for me).

When the button isn't pressed there's +5V to the pulse-input, and when
pressing the voltage drops to 0V.



--
Rikard Bosnjakovic http://bos.hack.org/cv/

Anyone sending unwanted advertising e-mail to my address will be
charged $250 for network traffic and computing time. By extracting
address from this message or its header, you agree to these terms.
 
J

John Fields

Jan 1, 1970
0
Greetings

I have a small assembly consisting of a 74LS192 (BCD-counter), 74LS42
(BCD-to-decimal decoder) and a 74LS02 (NOR).

Using my breadboard, I built a debounce-switch after John Field's
schematic in my earlier post (thanks!) and connected everything. The
pins LOAD and DOWN on 74LS192 are connected to +5 (I'm only counting
up). And since I only want to count 1-5 (and repeat) I connected pin 6
of 74LS42 to the NOR-gate and then to CLR on 74LS192 (together with a
pulldown-resistor). Since the outputs of 74LS192 are HIGH when the
number is not due, this makes CLR be zero through the NOR. As soon as 6
is reached (the output goes LOW), NOR feeds a HIGH to CLR and the
counter starts over. Works flawlessly on the breadboard.

However. I rebuild the circuit on a stripboard/veroboard and I've
double-double checked all connections and copper tracks for unproperly
cuttings, but I still get the following weird error: Instead of getting
the sequence 1, 2, 3, 4, 5 (checked with a LED on each pin) and repeat,
I get this sequence:

1 (when power on)
4 (when button pushed and released)
1, 2 (when button pushed - yes, 1 _and_ 2)
5 (when button released)
1, 2 (push)
5 (release)
(1, 2 and 5 above repeats 3 times)
<blank> (5 times)
3 (when push + release)
5 (when push + release)
1,2 (when push + release)
(3, 5 and 1,2 above repeats every time here after)


After a double double-checking making sure the CLR-pin was not shortcut
with some of the output-pins I assured myself that it wasn't. Like I
said, the ICs work on my breadboard so they are not broken or similiar.

This problem is driving me nuts.

Can anyone shed some light of what on earth is happening?

---
Don't know for sure, but R1 isn't helping anything (you should delete
it) and you need an individual 150 ohm resistor for _each_ LED. Also,
the debouncer I did was for CMOS, not TTL, as Rich Grise pointed out,
so it may be a little flaky. I've posted a schematic on abse under
the heading "The ultimate clock-problem (74LS42) from seb" which ought
to work if you want to try rewiring the circuit.
 
R

Rich Grise

Jan 1, 1970
0
I have a small assembly consisting of a 74LS192 (BCD-counter), 74LS42
(BCD-to-decimal decoder) and a 74LS02 (NOR).
However. I rebuild the circuit on a stripboard/veroboard and I've
double-double checked all connections and copper tracks for unproperly
cuttings, but I still get the following weird error: Instead of getting
the sequence 1, 2, 3, 4, 5 (checked with a LED on each pin) and repeat,
I get this sequence:

1 (when power on)
4 (when button pushed and released)
1, 2 (when button pushed - yes, 1 _and_ 2)

If these are outputs of the LS42, then you have either a defective chip
or a solder bridge. A properly-operating LS42 will _never_ have more than
one output active at a time.

And the different sequencing tells me that you've got bit lines crossed,
unless the solder bridge accounts for it as well. (or a different solder
bridge).

Also, as John Fields has said, your pulldown resistor is pointless at
best.

Good Luck!
Rich
 
R

Rikard Bosnjakovic

Jan 1, 1970
0
Lol :)

For the record, I moved the ICs from the veroboard and moved them back
to the breadboard following Lord Garth's advice "Isolate the ICs and
test them independently". I tested the 74LS192 by itself (using my
TTL-button) and verified that the bit outputs are correct, and that the
debouncer works as a charm.

Then I added the 74LS42 to the board altogether with 9 LEDs. Works
perfectly, each LED is staged/counted up one by one and even if i keep
the button pressed none of the LEDs will flash or blink, and no two LEDs
will be lit at the same time.

Therefore I'm believing Rich is right. The ICs are not defective and so
is not the debouncer. There must be some solder bridge somewhere. Good
thing is that I've got a bunch of dentist hooks so I can peel around at
small areas. First time in life I'm grateful to dentists I think. Bad
thing is that I don't have a lens or microscope or anything that can
extend my visual tracking. But atleast I now know what to look for.

And the best part, I'm the kind of person who has a strong belief in
that you cannot learn things properly if you never make any errors.
Making these kind of errors and having this newsgroup giving tips and
general guidance, my path to learn electronics is going to be pretty
nice to walk on.



--
Rikard Bosnjakovic http://bos.hack.org/cv/

Anyone sending unwanted advertising e-mail to my address will be
charged $250 for network traffic and computing time. By extracting
address from this message or its header, you agree to these terms.
 
R

Rikard Bosnjakovic

Jan 1, 1970
0
John said:
Don't know for sure, but R1 isn't helping anything (you should delete
it) and you need an individual 150 ohm resistor for _each_ LED. Also,

Why do I need a resistor for each led, when the 74LS42 only outputs to
one LED at a time? Sure, it doesn't output to one individual pin in this
case, but in proper cases?
the debouncer I did was for CMOS, not TTL, as Rich Grise pointed out,
so it may be a little flaky. I've posted a schematic on abse under
the heading "The ultimate clock-problem (74LS42) from seb" which ought
to work if you want to try rewiring the circuit.

I saw Rich's post as well and rebuilt your schematics into a TTL-one. It
looked like it worked on my breadboard, but this could ofcourse be the
source of the error as well. I do not own an oscilloscope so I cannot
check if my solution is proper or not. A good guess is that my solution
is not proper.

Also, my ISP does not import binary-newsgroups. Would you mind mail that
schematic to me, or put it anywhere where I can reach it?

Thanks.


--
Rikard Bosnjakovic http://bos.hack.org/cv/

Anyone sending unwanted advertising e-mail to my address will be
charged $250 for network traffic and computing time. By extracting
address from this message or its header, you agree to these terms.
 
J

John Fields

Jan 1, 1970
0
Why do I need a resistor for each led, when the 74LS42 only outputs to
one LED at a time? Sure, it doesn't output to one individual pin in this
case, but in proper cases?
 
R

Rikard Bosnjakovic

Jan 1, 1970
0
After 6 straight hours of finding the problem, I think I've found a
possible problem of why my circuit won't work. The 74LS192 is not a
74LS192. It's a 74C192, which I take is a CMOS-circuit. I recall someone
saying that you can't control a CMOS-circuit with a TTL-circuit (or was
it the other way around?), but I'm not 100% sure of that fact.

So, to conclude the problem: 74C192 controls the 74LS42, which sends a
signal to the inverter-NOR 74LS02, which sends a reset-signal back to
the 74C192. So I guess it looks something like this:

CMOS -> TTL -> TTL
^ |
\----------------/

I do not have any other (TTL) 192-ICs and no other (CMOS) 42-ICs, but I
have one CMOS-NOR if that is of any help.


--
Rikard Bosnjakovic http://bos.hack.org/cv/

Anyone sending unwanted advertising e-mail to my address will be
charged $250 for network traffic and computing time. By extracting
address from this message or its header, you agree to these terms.
 
J

John Fields

Jan 1, 1970
0
After 6 straight hours of finding the problem, I think I've found a
possible problem of why my circuit won't work. The 74LS192 is not a
74LS192. It's a 74C192, which I take is a CMOS-circuit. I recall someone
saying that you can't control a CMOS-circuit with a TTL-circuit (or was
it the other way around?), but I'm not 100% sure of that fact.

So, to conclude the problem: 74C192 controls the 74LS42, which sends a
signal to the inverter-NOR 74LS02, which sends a reset-signal back to
the 74C192. So I guess it looks something like this:

CMOS -> TTL -> TTL
^ |
\----------------/

I do not have any other (TTL) 192-ICs and no other (CMOS) 42-ICs, but I
have one CMOS-NOR if that is of any help.
 
R

Rikard Bosnjakovic

Jan 1, 1970
0
John said:
Before you change the NORs, try connecting a 10k resistor from the
output of the LS02 to Vcc and see what happens. Also, make _sure_ any
unused inputs are properly terminated.

Putting a resistor there didn't help, so I replaced the NORs and
resoldered (too bad 4001 and LS02 isn't pin-compatible). That solved the
sequence, and I got 1-5 as I though.

However, I still had the LED 1-2 lit at the same time-problem, so I
measured all over with my multimeter. I found that when the counting
arrived at 6 (where it was supposed to reset), LED 1 and 2 flashed and
the counter suddenly was at 7. Pressing the button made it count to 8
and 9 and then starting over.

I thought the LS02 was broken so I replaced it with a new one. Still the
same error. I measured the voltage at the input pins of the NOR with my
Fluke and found it to be 1.8V, which is illegal and I had no idea how
the LS42 could output an illegal current.

Then I got an idea, similiar to this one: Perhaps the NOR has got slower
gates than the reset of 74C192, that when pin 6 goes from high to low
and in the middle of the NOR-operation (or similiar) the reset is due,
which confuses the circuits and skips the reset.

(atleast when I'm writing this now it makes sense, resetting a bunch of
flip-flop is probably faster than performing a logical NOR)

So, my next problem was how do make some sort of delay for the gate, so
the NOR would be proper. I digged around in my box and found a new
1nF-cap, that I put in the IC-socket between pin 6 and GND (pin 8).
After powering the circuit up I test it, and... it worked!

The space around the ICs is dead tight so the cap couldnt be soldered
there. I cut a wire, soldered and moved the cap 6-7cm away from the IC
and tested again. Didn't work. The distance to the cap was probably too
long (considering its storage-size), so I soldered it straight under the
IC-socket, and now everything works as a charm.

The units above the 1nF-caps is 1.5nF, and the next one is 1uF. Without
testing (and w/o yet knowing the valuable math) that value felt too much
for the gate, so I kept the 1.5nF-one.

Thank you John and Rich for your help. Without the debouncer I would
have to wait 1-2 weeks before getting the components I've ordered, and
I'm way too impatient for that.


Two final questions:

1. Is my hypothesis about the time for the reset and NOR correct, or is
it complete rubbish?

2. The reason that the 1nF didn't work when soldering it 6-7cm away from
the IC, is it because of the reasons I wrote above?



--
Rikard Bosnjakovic http://bos.hack.org/cv/

Anyone sending unwanted advertising e-mail to my address will be
charged $250 for network traffic and computing time. By extracting
address from this message or its header, you agree to these terms.
 
J

John Fields

Jan 1, 1970
0
Putting a resistor there didn't help, so I replaced the NORs and
resoldered (too bad 4001 and LS02 isn't pin-compatible). That solved the
sequence, and I got 1-5 as I though.

However, I still had the LED 1-2 lit at the same time-problem, so I
measured all over with my multimeter. I found that when the counting
arrived at 6 (where it was supposed to reset), LED 1 and 2 flashed and
the counter suddenly was at 7. Pressing the button made it count to 8
and 9 and then starting over.

I thought the LS02 was broken so I replaced it with a new one. Still the
same error. I measured the voltage at the input pins of the NOR with my
Fluke and found it to be 1.8V, which is illegal and I had no idea how
the LS42 could output an illegal current.

Then I got an idea, similiar to this one: Perhaps the NOR has got slower
gates than the reset of 74C192, that when pin 6 goes from high to low
and in the middle of the NOR-operation (or similiar) the reset is due,
which confuses the circuits and skips the reset.

(atleast when I'm writing this now it makes sense, resetting a bunch of
flip-flop is probably faster than performing a logical NOR)

So, my next problem was how do make some sort of delay for the gate, so
the NOR would be proper. I digged around in my box and found a new
1nF-cap, that I put in the IC-socket between pin 6 and GND (pin 8).
After powering the circuit up I test it, and... it worked!

The space around the ICs is dead tight so the cap couldnt be soldered
there. I cut a wire, soldered and moved the cap 6-7cm away from the IC
and tested again. Didn't work. The distance to the cap was probably too
long (considering its storage-size), so I soldered it straight under the
IC-socket, and now everything works as a charm.

The units above the 1nF-caps is 1.5nF, and the next one is 1uF. Without
testing (and w/o yet knowing the valuable math) that value felt too much
for the gate, so I kept the 1.5nF-one.

Thank you John and Rich for your help. Without the debouncer I would
have to wait 1-2 weeks before getting the components I've ordered, and
I'm way too impatient for that.


Two final questions:

1. Is my hypothesis about the time for the reset and NOR correct, or is
it complete rubbish?

---
I don't think it's right because, as long as the clock input is
stable, there's no race that I can see. U3Q5 goes low, the output of
the NOR goes high, the counter gets cleared, the inputs of the LS42 go
low, U3Q0 goes low, lighting the LED and U3Q5 goes high releasing the
clear on the 192 and everything starts over.
---
2. The reason that the 1nF didn't work when soldering it 6-7cm away from
the IC, is it because of the reasons I wrote above?

---
I don't think so. What I think is that you have an oscillation in the
system and the cap killed it when it was wired to the chip. Unless,
as Rich said, you've got wiring problems, there's no other way I can
think of that you could see more than one LED lit at time. Besides,
that 1.8V you meeasured on the input of the NOR makes it sound like it
could have been oscillating before you put the cap in.
 
R

Rich Grise

Jan 1, 1970
0
And the best part, I'm the kind of person who has a strong belief in
that you cannot learn things properly if you never make any errors.
Making these kind of errors and having this newsgroup giving tips and
general guidance, my path to learn electronics is going to be pretty
nice to walk on.

Welcome to the loony bin! ;-D

Cheers!
Rich
 
Top