Author |
Message |
wetterberg
Joined: Jun 27, 2008 Posts: 48 Location: denmark
|
Posted: Mon Nov 17, 2008 4:52 pm Post subject:
The 4029 counter and analog control Subject description: - help a relative newb build something really cool! |
 |
|
hi all,
so I'm fascinated by the 4029, internal counter and all that is BRILLIANT.
However, I'm stumped when it comes to presetting via the JAM inputs.
If you permit, an example:
Let's say I have a row of buttons that I would use to jump to steps 0 through 7 - what would I need to do?
I get that it takes a binary input, but I'm used to computer sequencing, where everything happens in a given order. If I use a momentary button to go high on inputs J0 and J1, while going high to preset_enable, what's to stop it from going low on J0 and J1 before preset_enable goes low?
And what to do when interfacing several buttons? How do I make sure that I only spit out the most recent button press?
Cheers so much, you wizards!
Andreas |
|
Back to top
|
|
 |
DrJustice

Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Mon Nov 17, 2008 7:05 pm Post subject:
Re: The 4029 counter and analog control Subject description: - help a relative newb build something really cool! |
 |
|
wetterberg wrote: | hi all,
so I'm fascinated by the 4029, internal counter and all that is BRILLIANT.
However, I'm stumped when it comes to presetting via the JAM inputs.
If you permit, an example:
Let's say I have a row of buttons that I would use to jump to steps 0 through 7 - what would I need to do?
|
You need to add logic to decode one of 8 buttons to a 3 bit binary word. Look here for the general principle. For this you could use a 1-of-8 to 3 bit priority encoder, e.g. a 4532. BUT - you'd need more, see below.
Quote: |
I get that it takes a binary input, but I'm used to computer sequencing, where everything happens in a given order. If I use a momentary button to go high on inputs J0 and J1, while going high to preset_enable, what's to stop it from going low on J0 and J1 before preset_enable goes low?
|
Nothing is going to stop it from doing that... We are dealing with sequential logic here, just like in a computer, so things must happen in a specific order. You could take an 1-of-8 to 3 bit encoder, like the 4532 above, and add some sequential logic around it to make sure that the preset_enable is pulsed only when there is a valid decoded binary word. Or you could use a specialized 'convenience IC' that contains everything you need for the jamming (or perhaps better, a synchronous LOAD in other counters similar to the 4029), e.g. a 14419, that will decode up to 16 lines to a 4 bit word AND generate a strobe (for the preset_enable). It is a rare and expensive IC, though.
It might be that this problem could be better solved with a design that does not use binary encoded counters, but decade counters instead, depending on the application. You'd still have to cobble together logic gates in a sequential design, of course.
However, it must be said that these days few people would use lots of logic IC's, which cost a lot and takes up a lot of board space, to solve this task. In this millennium, programmable logic in the form of CPLDs or FPGAs, or even microcontrollers would be cheaper, simpler, use less space and possibly less power etc.. They really make short work of it, and you can reprogram them to change the functionality at any time. We have a sub forum here on EM, called Microcontrollers and Programmable Logic, for discussing such devices in detail.
Having said that, there are probably sequencer designs implementing things similar to your jamming step selector in the DIY forums. I think our most esteemed member and proprietor, mosc, made an extensive one at a time, but I can't find the thread right now. If a step time sequencer is what you want to build, I'm sure other members can point you to specific projects with similar features - possibly using just logic IC's.
Quote: | And what to do when interfacing several buttons? How do I make sure that I only spit out the most recent button press?
|
I'm not sure what you mean here. Are you thinking of buffering key presses in a queue, or do you mean if several keys are accidentally pressed simultaneously? The latter would be handled by the 1-of-N to M bit binary encoder.
DJ
-- |
|
Back to top
|
|
 |
wetterberg
Joined: Jun 27, 2008 Posts: 48 Location: denmark
|
Posted: Mon Nov 17, 2008 7:29 pm Post subject:
|
 |
|
thanks for getting back to me so quickly!
What I need is an electronic switching system that would take incoming pulses or gates to switch to an stage. I think I may go back to doing the lo-fi thing of rigging an LM3914 to do this -
- the methods suggested seem VERY high-tech compared to what I want to hack together. Priority encoding I get, and would solve part of the problem, but it would need to latch instead of return to the 0000 position.
Re: using a PIC for this task... what's the feasibility of getting someone technically adept to do a humble system like this?
"1 input, 8 or more outputs, 8 or more control inputs. Send it a pulse to a control input to open the corresponding output" |
|
Back to top
|
|
 |
DrJustice

Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Mon Nov 17, 2008 8:33 pm Post subject:
|
 |
|
wetterberg wrote: | Re: using a PIC for this task... what's the feasibility of getting someone technically adept to do a humble system like this?
"1 input, 8 or more outputs, 8 or more control inputs. Send it a pulse to a control input to open the corresponding output" |
That's not many lines of code, in any chosen language. If you want to get a PIC incorporated into the hardware design, I'm sure you'll get help with both picking an appropriate PIC chip and the code in the Microcontrollers and Programmable Logic forum. I'm an AVR man myself, so I'm not so familiar with the PIC family, but lots of our members use PICs. If the code is done in a high level language, like C, the difference between microcontroller families comes down to just a few details on how you use the IO pins, timers etc. - the main application logic will be the same.
By getting to grips with microcontrollers a whole new world of opportunities will open up! BTW, perhaps you can even skip the 4029 and do the counting right there in the PIC... It depends a bit on exactly what you want to do, but it usually makes sense to do as much as possible in the microcontroller, so if you take that route you may want to rethink the design(?).
DJ
-- |
|
Back to top
|
|
 |
DrJustice

Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Tue Nov 18, 2008 10:45 am Post subject:
|
 |
|
wetterberg wrote: | What I need is an electronic switching system that would take incoming pulses or gates to switch to an stage. I think I may go back to doing the lo-fi thing of rigging an LM3914 to do this -
|
Sorry, I was a bit tired when I wrote the previous posting so I forgot to mention that for selecting 'stages', e.g. in an analogue sequencer, the most used IC is probably the 4051 - it's an analogue multiplexer/demultiplexer that takes a 3 bit binary word and passes an analogue signal through to the seleceted 1 of 8 pins. It's hooks right up to a binary counter, and it's easy to cascade these for more than 8 channels. Most hybrid synthesizers and sequencers use lots of these chips.
Quote: | - the methods suggested seem VERY high-tech compared to what I want to hack together. Priority encoding I get, and would solve part of the problem, but it would need to latch instead of return to the 0000 position.
|
Well, it may seem a bit much at first, but they really are simpler solutions in most respects. Once you get used to compile the code and download it to the chips, you'll probably find it very easy and convenient, not to mention powerful, flexible and fun
DJ
-- |
|
Back to top
|
|
 |
|