Author |
Message |
loss1234
Joined: Jul 24, 2007 Posts: 1536 Location: nyc
Audio files: 41
|
Posted: Mon Sep 08, 2008 12:54 pm Post subject:
USING cmos dividers for NON-integers? |
|
|
I know i have asked similar questions before but can someone explain how to get NON integer divisions with dividers or shift registers? the last time i asked how to get non EVEN divisions (7, 3, etc) but now i would love to know how to get 3.5 or 7.2 (non pure tones)
In Electronotes there is an article that mentions a way to do so with a 7497 TTL chip but it is vague and brushes over it.
thanks so much _________________ -------------------------------------------- check out various dan music at: http://www.myspace.com/lossnyc
http://www.myspace.com/snazelle
http://www.soundclick.com/lossnyc.htm http://www.indie911.com/dan-snazelle |
|
Back to top
|
|
|
voks
Joined: Sep 09, 2008 Posts: 6 Location: Copenhagen
|
Posted: Wed Sep 10, 2008 5:34 am Post subject:
|
|
|
Hello Loss
I am currently working on making just intonation with CMOS. I am completely new to electronics so i might not be the best one to help you out but i have already tried what you ask about.
As i understand the only way to do this kind of divisions is by doing both multiplication and division. For example if you want to divide a frequency by 3.5 you can do this by multiplying by 7 and dividing by 2.
This weekend i have tried making a frequency multiplier using a 4046 and a 4017 following a schematic i found in a thread here. I didnt get it to work but yesterday i tried a different approach using the 4089 rate multiplier and it seems to work fine. I have a breadboard set up with a 4089 and two cascaded 4017 where i can multiply and divide with up to 16. With this i can make 40 unique pitches per octave amongst others most of the 12 tones in the chromatic scale:
1/1 16/15 9/8 6/5 5/4 4/3 45/32 3/2 8/5 5/3 9/5 15/8 2/1
Are you trying the same thing? |
|
Back to top
|
|
|
loss1234
Joined: Jul 24, 2007 Posts: 1536 Location: nyc
Audio files: 41
|
|
Back to top
|
|
|
voks
Joined: Sep 09, 2008 Posts: 6 Location: Copenhagen
|
Posted: Wed Sep 10, 2008 11:17 am Post subject:
|
|
|
Hi. I wil try to explain.
I use a very fast clock to make the putput from 4089 stable. 4089 divide the incoming clock by 16. With the A B C D input you can decide if you want 1/16 the clock x1 x 2 x 3...x 16 on the output. 1/16 x 1 is my root note, 1/16 x 2 the octave above, 1/16 x 3 one octave and a fifth above etc. This way i can multiply a frequency and send it to 4017 to do the division. Last i use a 4040 to make the tones audible.
voks |
|
Back to top
|
|
|
loss1234
Joined: Jul 24, 2007 Posts: 1536 Location: nyc
Audio files: 41
|
|
Back to top
|
|
|
loss1234
Joined: Jul 24, 2007 Posts: 1536 Location: nyc
Audio files: 41
|
Posted: Wed Sep 10, 2008 3:53 pm Post subject:
|
|
|
ONE THING THAT ISNT CLEAR TO ME:
what is the formula for figuring out HOW MUCH to multiply and then divide by.
in the example you used (3.5) you said you had to FIRST multiply by X (7) and then divide by Z (2). BUT did you know that before hand or did you just mess around?
i am wondering if there is a simple formula. thanks so much!!
also, i assume that with the 4089 having 4 data ins, you have to figure out the number it will multiply by in Binary? or decimal? i need to get out my cmos cookbooks and get this figured out
thanks _________________ -------------------------------------------- check out various dan music at: http://www.myspace.com/lossnyc
http://www.myspace.com/snazelle
http://www.soundclick.com/lossnyc.htm http://www.indie911.com/dan-snazelle |
|
Back to top
|
|
|
loss1234
Joined: Jul 24, 2007 Posts: 1536 Location: nyc
Audio files: 41
|
Posted: Wed Sep 10, 2008 4:26 pm Post subject:
|
|
|
WITH 4 INPUTS abcd
are the binary words from 1-16??
in the truth table there are 16 combos
the first is all 0's the last is all 1's/
i am assuming (maybe wrongly) that all O's equals 1 all the way up to all 1's being 16.
this WORD is what the 1/16 of the input gets multiplied by so if i knew what each WORD combo translated to, this would be much easier.
if this is true than 4 would be a=0
b=0
c=1
d=1
i need to learn binary
there is also a decimal multiplier (the 4527) but i dont know if its any better
thanks _________________ -------------------------------------------- check out various dan music at: http://www.myspace.com/lossnyc
http://www.myspace.com/snazelle
http://www.soundclick.com/lossnyc.htm http://www.indie911.com/dan-snazelle |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Wed Sep 10, 2008 5:07 pm Post subject:
|
|
|
loss1234 wrote: | i am assuming (maybe wrongly) that all O's equals 1 all the way up to all 1's being 16. |
all 0's -> 0 and all 1's means 15
Quote: | this WORD is what the 1/16 of the input gets multiplied by |
Yes so actually all 0's -> 0/16 and all 1's -> `15/16
Quote: | if this is true than 4 would be a=0
b=0
c=1
d=1 |
4 would be 0100 - the web page you linked to in the other thread gives the right values, and it sort of explains it too.
Quote: | there is also a decimal multiplier (the 4527) but i dont know if its any better |
I didn't look it up, but likely it's the same except that the control word can't be over 1001 (9) which makes it easier for BCD calculations - the other one would be called binary. for your purpose binary is easier I think than BCD, even when it may seem a bit odd at first.
In BCD each decimal digit is converted into four binary digits, so that
23 would first be split up as 2 3 and then each digit is converted to binary separately as 0010 0011
(BCD = Binary Coded Decimal. This is not used too often BTW)
in binary however 23 would not be split up first but it would be converted as a whole: 23 = 1*16 + 0*8 + 1*4 + 1*2 + 1*1 -> 10111 _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
voks
Joined: Sep 09, 2008 Posts: 6 Location: Copenhagen
|
Posted: Thu Sep 11, 2008 1:45 am Post subject:
|
|
|
loss1234 wrote: | ONE THING THAT ISNT CLEAR TO ME:
what is the formula for figuring out HOW MUCH to multiply and then divide by.
in the example you used (3.5) you said you had to FIRST multiply by X (7) and then divide by Z (2). BUT did you know that before hand or did you just mess around?
i am wondering if there is a simple formula. thanks so much!!
thanks |
Sorry i was saying it the wrong way around. I get a bit confused about numbers. To divide by 3.5 you should actually multiply by 2 and divide by 7.
And to divide by 7.2 you should multiply by 5 and divide by 36 (because 7.2 x 5 = 36).
But in just intonation 5/36 and 5/18 and 5/9 is the same tone in different octaves so you dont have to be able to divide by 36.
There is a nice article about just intonation here:
http://www.kylegann.com/tuning.html |
|
Back to top
|
|
|
voks
Joined: Sep 09, 2008 Posts: 6 Location: Copenhagen
|
|
Back to top
|
|
|
loss1234
Joined: Jul 24, 2007 Posts: 1536 Location: nyc
Audio files: 41
|
|
Back to top
|
|
|
loss1234
Joined: Jul 24, 2007 Posts: 1536 Location: nyc
Audio files: 41
|
|
Back to top
|
|
|
voks
Joined: Sep 09, 2008 Posts: 6 Location: Copenhagen
|
Posted: Sun Sep 14, 2008 9:10 am Post subject:
|
|
|
Heh i really enjoy being able to help. I have learned so much on this forum!!
I will check your schematic..
loss1234 wrote: | let me ask
do the 4 switches on the 4051 use the same code as the switches on the 4089? (is it binary?)
thanks so much...i am sure in the lunetta spirit, all 8 switch points could also just be turned into jacks.
this is going to be heavy! |
Yes it is the same. On both 4051 and 4089 is A=1 B=2 C=4.
I would like to figure out a better way to select ratios than this but so far this has been good for experimenting. |
|
Back to top
|
|
|
loss1234
Joined: Jul 24, 2007 Posts: 1536 Location: nyc
Audio files: 41
|
Posted: Sun Sep 14, 2008 10:24 am Post subject:
help with mismatch clocks |
|
|
Ok
i built it and i am having some problems.
I am powering it off of a 9v battery which is the closet thing i have to 5v right now.
does pin 7 on the 4051 need to be grounded too?
when i hook it up to my vco square waves (for the clock) some of my vco's or lfo's WILL NOT drive it and some of them will pass a tone through without allowing the switches to divide it.
i have a 9v battery powered clock i used and it worked ok though.
is this because one system is on a different VOLTAGE than the other?
do i need to put buffers before and after the unit?
does it need to be powered by a special kind of clock? (do i need to put the clock through an inverter first or something?)
when it DID work it was really cool. but its odd, on some of my modules (like my home-made negative slew which has an LED which flashes in time with the LFO) it not only did not work, it stopped the LED from working, which makes me think it was sucking current from my module.
scary.
so what do i need to do to get this working? power it from +/- 15volts?
this is going to be a really great module though.
we should design a press n peel pcb!
amazing
thanks so much _________________ -------------------------------------------- check out various dan music at: http://www.myspace.com/lossnyc
http://www.myspace.com/snazelle
http://www.soundclick.com/lossnyc.htm http://www.indie911.com/dan-snazelle |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18197 Location: Durham, NC
Audio files: 212
G2 patch files: 60
|
Posted: Sun Sep 14, 2008 10:34 am Post subject:
|
|
|
voks
Great to have you here. _________________ --Howard
my music and other stuff |
|
Back to top
|
|
|
loss1234
Joined: Jul 24, 2007 Posts: 1536 Location: nyc
Audio files: 41
|
Posted: Sun Sep 14, 2008 11:02 am Post subject:
|
|
|
well i stuck a 40106 in front of the clock in on the 4089 and that seemed to help a lot. i wonder though if there is some bounce from the toggles because sometimes when i make a switch, i get all this messed up sounding jitter.
but this is amazing. i am clocking it with my vco...i am putting one out of the vco through just a regular 4040 to get it to a lower octave...and mixing that with the output from this thing. making sure the vco is at a high frequency and then just messing with the switches (with a sample and hold coming into the cv of the vco)
and wow!
NOW CAN ANYONE HERE explain to me HOW THIS WORKS?
i know what all of these chips do ON THEIR OWN..but how is it working as a whole? why is the 4051 plugged into the reset of the 4017? and what is the 4051 doing?
this is just such a useful block-i need to make pcbs of this.
i can imagine making chords by having 2 or 3 of these going at once with the original vco.
wow.
thanks so much _________________ -------------------------------------------- check out various dan music at: http://www.myspace.com/lossnyc
http://www.myspace.com/snazelle
http://www.soundclick.com/lossnyc.htm http://www.indie911.com/dan-snazelle |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Sun Sep 14, 2008 12:04 pm Post subject:
|
|
|
The 4051 selects one of its lines x0 .. x7 and connects that one to the line x, which one it will be is determined by the switch combination 000 selects x0, 001 selects x1, etc. So what happens is that one selectable output of the 4017 will be connected to the reset input of itself. Now the 4017 shifts a signal from its q0 output to q1, then to q2 etc. on each incoming clock. and when you reset it it will start anew. So effectively the switches on the 4051 will determine the amount of pause, or silence, between the pulses coming out of the 4017's q0, making a controllable divider.
You will indeed get glitches due to contact bounce when you change the switches. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
|