hypothetical circuit need help

Started by Ansil, December 18, 2003, 08:04:11 AM

Previous topic - Next topic

Ansil

hypothetical time kiddies.

hypotheticaly, i wish to push and hold down a button and have a counter start counting. once i release this button it will remember how long it took me to do so.

now when i hit button no. 2  momentray button.  i desire it to pulse an electronic switch long enough to close two contact point. to start device.  after which said device will function too the precise time length of button no. 1.  when time has been reached.  unit will pulse again and repeat cycle till batteries die.  


any help would be appreciated  

ansil

Paul Perry (Frostwave)

I think you need a clock (a 555 would do) that feeds a counter until you tell it to stop doing so. And when you tell it to stop, you also load a register.
And then, for the cycling, you load the register back into a counter (that goes up & down0 and count down until it reaches zero (whihc you detect with some logic).
nd so on.. of course, this would be simple with a PIC, but not for me (:
Don Lancaster's CMOS Cookbook will have all the info one needs to build it in discrete logic (should be 4 or less chips).

R.G.

The simplest, cheapest way to do this is with a PIC microcontroller. The 8 pin DIP PICs cost under $2.00 and will do this perfectly, *including* debouncing the switch. You'll spend more than that getting any counter/timer setup to work, if it ever works reliably.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

The Tone God

The way I see it you would use a OSC, feed a counter with it, when you reach your point load the value of the counter in to either a register or a latch, reset the counter, then use a logic comparitor to check the value of the counter against the value being stored. When the counter reaches the value being stored a pulse could be generated. I see atleast four ICs just for this operation.

It can be done but would take time to tweak.

Andrew

P.S. If this is for that RS toy your playing with there may be an easier way to do it with minimal external logic needed if you don't mind hacking the thing a bit.

Ansil

yeah this is for the ratshack..  TG