# logic design question

Discussion in 'Electronic Basics' started by panfilero, Oct 19, 2006.

1. ### panfileroGuest

Hello, I'm trying to build a circuit that has an array of switches (8
switches) and takes in a clock signal and compares the clock signal to
my switches one at a time. Then if both the clock signal and the
switch are "high" i would like an input signal to be connected to my
output. Anything else should result in a break between my input and
output signals. I'm having a hard time getting started with this
project and was wondering if anyone had any suggestions on how I may
accomplish this. My input is a very small audio signal.

thank you.

2. ### petrus bitbyterGuest

Hmm... Your description is not very clear, at least not to me. So you have
an input signal (one?), small audio, that should be connected to an output
(one?) or not depending on some clock. How does this clock arrive? At what
time do I compare what part of that clock to what switch? What's next? It
may be usefull to tell more about the background too.

petrus bitbyter

3. ### PeteSGuest

While contemplating your response to Petrus, you may also contemplate
cross posting rather than multiposting

Crossposting ensures that a reply goes to all the newsgroups you posted
to, so anyone interested sees the reply regardless of where it came from.

Cheers

PeteS

4. ### panfileroGuest

ok, the signal is from a guitar, the output is to an amplifier. i
believe the audio signal from the guitar to be pretty small...
millivolts i assume. the clock i'm thinking i will make from a 555
chip, i would like to be able to control the speed of the frequency. i
have 8 buttons, when i push a button that button should be "high", my
goal is to make something where a clock signal is constantly being
compared to these 8 buttons. Whenever my clock signal is a "high" and
the button is a "high" i would like the input to be connected to the
output, else i would like it to be off. So, if I press all 8 buttons
then my output would be an audio signal that is only on when my clock
is "high" and it should sound like a stutter. If 1 = connected (sound)
and 0 = not connected (no sound) then when all 8 buttons are pressed i
should hear 1,1,1,1,1,1,1,1 this should be continuously looping. If
the 3rd,4th,6th,7th,8th button are pressed I should hear
0,0,1,1,0,1,1,1 coninuously looping. If i increase my clock speed,
then my logic circuit would just loop through these 8 buttons quicker.
I'm guessing I'm comparing the clock with each button using an AND
function. Audio should only come out if both clock AND button are
high.

thank you, i appreciate any suggestions of how to get started with this

5. ### panfileroGuest

this is actually my first time posting in these things.... how do i
cross post? thank you

6. ### Homer J SimpsonGuest

Like Newsgroups: sci.electronics.basics,sci.electronics.design

7. ### Randy DayGuest

panfilero wrote:

[snip]
Is this the kind of thing you want?

This is *not* an engineered circuit, and may
not work in practice, but maybe it will give
someone ideas...

Set up an 8-bit shift register in a ring
configuration, with switches off the outputs
as shown. Pre-load the register with a 1,
then cycle it with the clock. Each time the 1
hits a closed switch, the transistor base goes
high, turning on a relay, pre-amp or audio
switch.

.------.
| | |
.-. | 555 |
| |<--| |
| | |timer |
'-' | |
| '---.--'
| T
.--V----. ---
| |---o o------------.
| | T |
| | --- |
| |---------o o------| VCC
| | T | +
| | --- | |
| |---o o------------| .------.
| | T | | |
| 8-bit | --- | | pre |
| |---------o o------| in -| amp |- out
| shift | T | | |
| | --- | | |
| reg. |---o o------------| '------'
| | T | |
| | --- | ___ |/
| |----------o o-----+-|___|--|
| | T | R |>
| | --- | |
| |---o o------------| |
| | T | ===
| | --- | GND
| |----------o o-----'
`-------'
(created by AACircuit v1.28 beta 10/06/04 www.tech-chat.de)

8. ### petrus bitbyterGuest

Well,

Suppose you know how to build that 555 clock. Keep in mind that when you
change the frequency, you may change the pulse-pause rate (duty cycle) as
well.

Then you need a 3 bits binary counter. The precise type does not matter as
long as it counts binary. A 74HCT163 or CD40163 will do. (They're 4 bits
counters, you only use the three least significant bits.) The counter just
has to count from 000bin up to 111bin and start all over again.

Next you need an eight input multiplexer. 74HCT151 for instance. Connect the
counter outputs to the select inputs and the buttons to the multiplexer
inputs. Now the multiplexer output will show the button values one by one.
An AND-gate and you're done with the logic.

As for the switch consider a CD4066B. You may set all four switches in
parallel to reduce the internal switch resistance. An AND-gate can easily
drive them all.

petrus bitbyter

9. ### Lord GarthGuest

Additionally, you cannot allow the audio signal to go negative, with respect
to ground,
if the 4066 is running on a single ended power supply such as 5 volts and
ground.

Doing so will destroy the 4066. The solution is to run a bipolar power
source such
as +5 volts, -5 volts and common ground.

10. ### panfileroGuest

Appreciate the suggestions, I think they will definitely help me get
started on this thing. Thanks!

11. ### panfileroGuest

that sounds about right, the part that gets me is how to make it
sequence, and check each and gate one by one and then loop and check
them again.

thanks.

12. ### Lord GarthGuest

A previous poster suggested you use a counter / decoder to sequence
your clock through the 8 switches, one at a time.

This is still a correct answer!

13. ### JamieGuest

Use of AND gates seems to fit your delima!
The AND gates for the sampling would simply use the clock
and what ever input your sampling. if both are high for example,
the AND gate output goes high, that in turn can turn on another
INPUT of and gate, where is, the other input of this gate
will have your passive signal you want to gate through .