Counting 1-6 instead of 0-9 with a 74LS192 / 74LS47

R

Rikard Bosnjakovic

Jan 1, 1970
0
Rich said:
Well, the counting/decoding question has been thoroughly answered - but
I'm wondering, how do you get "the pulse of random length to the 555"?

I was thinking of making use of the noisy bounce in the switch. Depending
on the amount of noise, the cap (before the 555) will be differenly
charged for each time of a button press.

Atleast in (my) theory.
 
R

Rikard Bosnjakovic

Jan 1, 1970
0
John said:
Easy. Drive a VCO with a ramp derived from the integrated output of
the VCO and when the the ramp gets to the voltage corresponding to
1Hz, shut off the VCO.

What's a VCO?
 
J

John Fields

Jan 1, 1970
0
I sse your concern about the data race condition. In a onesies
project, I would just see if there is a poblem. If there were, or if I
were doing a more careful design, a well-placed capacitor or RC at the
output of the NAND could required the x111 state to last for a few
hundred ns to a few us before it reset the counters.

---
Even though this appears to be a one-off, doing a design for
something that someone else will be building requires that more care
be put into the design effort than just throwing a bunch of parts
together and hoping they'll work.

As far as the RC on the output of the NAND goes, I consider that an
improper way to solve the problem inasmuch as there are better ways
to go about it which don't depend on the vagaries of the circuit.
---
 
Rikard said:
The reason I'm using a 555 is because I want a slight delay after I push
the button. I.e. I don't want "push button => make number", I want "push
button, let numbers run for a second, and then stop".

If you use my idea of blanking the 74LS47, then you will not see the
number until you release the button. Chances are that you will inject
a random number of clock pulses when you push the button, and you may
or may not add one more clock pulse after you release the button. With
your approach, if you use a high enough clock rate, it will look like a
8 until you release the button. To me, both produce virtually the same
effect.
 
John said:
I consider that an improper way to solve the problem
My preference tends toward a little more precision than that. YMMV.

For me and in a hobby project, it would depend on what I had in my
junque box, and I would try to avoid buying additional parts. In a
more formal design, I might go for your more hygienic approach,
depending on the criticality of the application. In an educational
situation, I would suggest building and evaluating all "reasonable"
possibilities, including testing for failure modes and operating
margins. Sometimes, cheap and dirty is OK, and sometimes it can lead
to disaster. Learning the difference is part of developing some
engineering judgement.
 
J

John Fields

Jan 1, 1970
0
For me and in a hobby project, it would depend on what I had in my
junque box, and I would try to avoid buying additional parts. In a
more formal design, I might go for your more hygienic approach,
depending on the criticality of the application. In an educational
situation, I would suggest building and evaluating all "reasonable"
possibilities, including testing for failure modes and operating
margins. Sometimes, cheap and dirty is OK, and sometimes it can lead
to disaster. Learning the difference is part of developing some
engineering judgement.

---
For anything I'm involved in which isn't a real-time emergency or a
rig which needs to be put together to solve a problem once, _right
now_ , I won't do "quick and dirty". Especially on Usenet. This is
seb, and newbies and novice querants need to be given stuff which
will work, unconditionally. If it costs an extra 25 cents or even
an extra dollar, so what?
 
John said:
Depending on the duration of the bounce and how hard he drives the
display, he'll probably see a flash as the switch bounces on make.

Probably? How many microseconds? Are you seriously suggesting this
is a problem? I am guessing that, in a casual design, it would be hard
to find a switch that was sloppy enough and to drive the display that
hard. I can see how you might force it to produce an easily visible
flash if that was the desired effect, but my version of that circuit
would be more complicated.
There will be many more than one clock pulse generated when the
switch is released, because of break bounce. Try it.

In this application, my judgement is that it does not matter,
especially if you cannot see the count when the switch is closed and
you cannot discern it counting when the switch is opened. You may
decide differently.
It will probably look more like a nine because segment 'e' will only
be illuminated 1/3 of the time.

Now you are being unnecessarily picky. I think it looks more like an
8 with weak segments. At least, that was how I viewed my rapidly
changing 7-segment displays (admittedly with 0-9 or "random" digits,
and not cycling through 1-6).
A momentary flash VS a steady '9' is hardly the same... :)

I did write "virtually". Chacon a son gout.
 
R

Rikard Bosnjakovic

Jan 1, 1970
0
With
your approach, if you use a high enough clock rate, it will look like a
8 until you release the button. To me, both produce virtually the same
effect.

Point taken. I did not realise this.

I was, however, thinking to use a low frequency output for the 555,
perhaps 10Hz or something. The frequency is something I'm going to try out
on my breadboard, until I find a reasonable value that I can use.

I will - of course - try your version as well since for high freqs it will
yield the same output. I just want some action on the display after I
press the button ;)
 
J

John Fields

Jan 1, 1970
0
Point taken. I did not realise this.

I was, however, thinking to use a low frequency output for the 555,
perhaps 10Hz or something. The frequency is something I'm going to try out
on my breadboard, until I find a reasonable value that I can use.

I will - of course - try your version as well since for high freqs it will
yield the same output. I just want some action on the display after I
press the button ;)

---
I posted a solution and a schematic for you here:


and am disappointed that you haven't commented on it, one way or the
other. Did you miss it, perhaps?
 
R

Rikard Bosnjakovic

Jan 1, 1970
0
John said:
I posted a solution and a schematic for you here:


and am disappointed that you haven't commented on it, one way or the
other. Did you miss it, perhaps?

That link doesn't work in my newsreader.

I'm sure I missed it. What newsgroup did you post to?
 
John said:
I posted a solution and a schematic for you here

Why did you leave the D! and D2 inputs open, instead of pulling them up
(prefereably through a resistor) like you did with the UP clock input?

Why not hardwire the D input to the 74LS47 to ground instead of
connecting it to the Q3 output of the 74LS192?
 
J

John Fields

Jan 1, 1970
0
Why did you leave the D! and D2 inputs open, instead of pulling them up
(prefereably through a resistor) like you did with the UP clock input?
 
R

Rikard Bosnjakovic

Jan 1, 1970
0
John said:
This one.

I found the post. I must have read it the other time without thinking
about it. Sorry.

Using a simulator, I built the schematic in your post but I didn't get it
to work at all. I'm sure I've missed something about the 555, although I
can't see I haven't connected according to your schematic.

The oscilloscope in the application shows 0V on the 555's output when the
switch is open, and when I close the switch the scope reads 9V (i.e. VCC
in my circuit). I do not see any pulses at all, except for when I open the
switch again, then the scope drops to 0V and I have a nice square wave.

Here's my version of your circuit:

http://bos.hack.org/tmp/circuit.pdf
 
J

John Fields

Jan 1, 1970
0
I found the post. I must have read it the other time without thinking
about it. Sorry.

Using a simulator, I built the schematic in your post but I didn't get it
to work at all. I'm sure I've missed something about the 555, although I
can't see I haven't connected according to your schematic.

The oscilloscope in the application shows 0V on the 555's output when the
switch is open, and when I close the switch the scope reads 9V (i.e. VCC
in my circuit). I do not see any pulses at all, except for when I open the
switch again, then the scope drops to 0V and I have a nice square wave.

Here's my version of your circuit:

http://bos.hack.org/tmp/circuit.pdf

--- _______ _________
Yes, there's an error in my circuit. TRIGGER, (pin 2) not DISCHARGE
(pin 7) should be connected to THRESHOLD, like this:


Vcc
|S1
O |
+-----[1K]----+ O |
| +-------+ | |
+--|TH OUT|--+-----|-----> To '192 DOWN clock
| |__ _| |
+-O|TR R|O-------+
| +-------+ |
[0.1µF] 7555 [1K]
| |
GND GND


Sorry about that.

Also, reduce the 10k resistor from the RESET pin to ground to 1000
ohms. If you don't, you may find that the chip oscillates with the
switch closed _or_ open!

If you're using a bipolar 555 instead of a CMOS 7555 and you have
trouble getting it to oscillate using the above circuit, you may
want to try the astable shown in figure 1B at:

http://pdfserv.maxim-ic.com/en/ds/ICM7555-ICM7556.pdf
 
J

Jasen Betts

Jan 1, 1970
0
What's a VCO?

a voltage controlled oscilator one that changes frequency depending on
some input voltage..

something like what you want can be fashioned from a 555 like so.


Clock source for electronic dice.

r2 r1 | 4.5-16v DC
+-[5K6]-+--[10K]----+
| | |
| +-+ +-[100k]--+
| | | r5 | r4
| | +-+---------(-[10K]-+
| | | | |
| | | +-------+-+ |
| | o | | | |
| |-| | | . . . | . . . |
| | o | | . vcc . |
| | | +--r out----+---- out.
|10|| | | . .
+--||-(-+-+--tr .
| || | | . 555 .
| c1 | +--th di--
| | . .
| +--+---cv .
| | . gnd .
| | . . . | . . .
| | |
| | ||22 |
|-[100k]-+---||---+
| r3 ||c2 |
| |
+-----------------+
| 0v

it won't give nice even pulses (but you don't need even pulses to drive a
counter) it will a give gradual slowing of the pulses (from near 10Hz) as
C2 discharges through r3 and when it eventually goes below about 1/10 of
the supply (a few seconds) it'll stop entirely.

increasing c2 will make it the ramp-down longer.
increasing c1 (or r4) will make it run slower all.
r1 and r2 control the charging time for C2 reducing them
will make it ramp up to full speed faster when the
button is pressed.

(try to keep the aproximate 2:1 r1:r2 ratio)
r4:r5 determines the fraction of the voltage
where the clock stops about 1:10 is a good starting point.
more eg 1:5 would make makes the stopping more sudden,
1:20 would make it more gradual...

Bye.
Jasen
 
Top