Re: Random timer!
- From: John Fields <jfields@xxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 02 Jun 2007 08:21:28 -0500
On Sat, 02 Jun 2007 04:26:43 -0500, John Fields
<jfields@xxxxxxxxxxxxxxxxxxxxx> wrote:
On Fri, 01 Jun 2007 22:37:08 +0100, Baron
<baron.nospam@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
---This is intended as a reaction timing device. The user pushes a
button and after a random delay, pops a light on and starts a
counter. The user presses a second button that stops and freezes the
counter. A little like the "Simon" toy but with a counter instead of
a buzzer. Fixed delays ie 1, 2, 4 etc seconds is easy. I didn't
think a random delay would be so hard !
---
It isn't, it's just that your description is confusing and isn't
detailed enough to allow a design to be done.
From your second description I take it that you want a device which,after a button (START) is pushed, waits for between 1 second and 15
seconds to turn on a light and simultaneously start a counter then,
when a second button (STOP) is pressed, stops the counter while
preserving the value of the count it has accumulated.
What you haven't said is whether you want the delay to occur in
random increments of one second and what granularity you want from
the reaction time counter. That is, 1s? 100ms? 10ms? ???
You also haven't addressed how you want the reaction time counter to
be reset if you're doing multiple runs.
A good way to do it would be to have the START button do it at the
beginning of each run, unless you have a better idea.
I've made a few assumptions and posted a schematic to abse.
The device should work like this:
1. When the START button is pushed, a four-bit pseudo-randomly
generated number is loaded into a four bit binary delay counter
and the counter enabled.
2. The PRSG is advanced to the next state.
3. The counter's one second clock is started.
4. The four BCD digit reaction time counter's outputs are cleared.
When the delay counter times out:
1. The delay timer is disabled and latched up.
2. An LED is turned on.
3. The reaction time counter is enabled.
4. The 1000Hz reaction counter clock is started.
When the STOP button is pressed:
1. The reaction time counter is disabled and its outputs frozen in
the state they were in when the STOP button was pressed.
When the START button is pressed again, the new pseudo-random number
will be loaded into the delay counter and the cycle started anew.
One caveat: One of the allowed states of the PSRG is 1111, which
will cause the LED to come on as soon as the START button is
pressed, so instead of 15 random delays from 1 second to 15 seconds
you'll have 16 random delays from zero seconds to 15 seconds.
It's a feature, not a bug. ;)
--
JF
.
- Follow-Ups:
- Re: Random timer!
- From: Baron
- Re: Random timer!
- From: Baron
- Re: Random timer!
- References:
- Random timer!
- From: Baron
- Re: Random timer!
- From: John Fields
- Re: Random timer!
- From: Baron
- Re: Random timer!
- From: John Fields
- Random timer!
- Prev by Date: Re: Random timer!
- Next by Date: Re: Current - vs - Voltage
- Previous by thread: Re: Random timer!
- Next by thread: Re: Random timer!
- Index(es):
Loading