<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE>@font-face {
        font-family: MS Mincho;
}
@font-face {
        font-family: @MS Mincho;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Fredrik,</FONT></DIV>
<DIV><FONT face=Arial size=2>Damn you for stealing an idea I had that wasn't 
really my idea to begin with! ;-) Heh-heh...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'm all for the square-to-sawtooth conversion idea 
and have discussed it off-list with a few folks. Well, guess what? I found the 
same concept in Hal Chamberlin's "Musical Applications of Microprocessors" (MAM) 
book, starting on page 598 of the 2nd edition. As this book is still available, 
I don't want to post schematics of the 2 relevant circuits. But I'll talk about 
them...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Chamberlin's circuits are different from yours, and 
h</FONT><FONT face=Arial size=2>e suggests the use of a multiplying DAC (MDAC) 
in the feedback path of an op amp. The MDAC is controlled by "the [10] most 
significant frequency control bits."</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Maybe you'd get better results by using a 
conventional op amp instead of a 3080, although it would require an additional 
DAC.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Now, you lost me -- which isn't too hard to do -- 
with your hard sync talk. The sawtooth's frequency is normally determined by the 
square wave, so it's not clear how you would turn this around to take a sync 
signal from the sawtooth. I see how it would work electrically, but I can't 
figure out what the resulting frequency (pitch) would be when used in this 
way. "What's the frequency, Kenneth?"</FONT></DIV>
<DIV>--<BR>john</DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
face=Arial size=2></FONT><BR> </DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=ifrc@iar.se href="mailto:ifrc@iar.se">Fredrik Carlqvist</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=synth-diy@dropmix.xs4all.nl 
  href="mailto:synth-diy@dropmix.xs4all.nl">synth-diy@dropmix.xs4all.nl</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, October 06, 2004 4:34 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [sdiy] Saw DCO</DIV>
  <DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
  face=Arial size=2></FONT><FONT face=Arial size=2></FONT><BR></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=SV 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi 
  all!<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=SV 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have had great luck implementing 
  a saw DCO and I thought I should tell you about it. Only one problem remains. 
  The story is this: I like DCOs. No tempcos, no octave drift, no trimming. I 
  had a perfectly good square/pulse DCO but I found it lacked a nice edge. I 
  needed a saw output. Since the DCO had the timing right, I thought I should 
  implement it using a simple ramp generator that the DCO would reset. You can 
  find a schematic here: <A 
  href="http://www.minod.com/saw_generator.gif">http://www.minod.com/saw_generator.gif</A>. 
  I also like simple circuits. It has a trim to adjust the amplitude. 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The hard thing then is to apply a 
  proper control voltage so that the ramp gets the same amplitude regardless of 
  the DCO frequency. I already had a 16-bit DAC hooked up to the MCU, I just 
  added another channel to it. I measured a couple of slopes and had some luck 
  in finding an interpolation polynome that was cheap to compute (about 150 
  cycles or 15us on my MCU). It worked well above my expectations. The amplitude 
  is within 2% from 20Hz to 5kHz (which is as high as the DCO goes) at room 
  temperature. <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Now, there is only one problem: 
  Temperature drift. The ramp slope changes noticeably when I warm up the CA3080 
  with my finger tip. Observe that this only affects the amplitude, not the 
  frequency! So I would like to put in some kind of compensation. Since the MCU 
  running the DCO already has a lot of 10-bit A/D channels, I could put a 
  forward biased base-emitter diode and measure the voltage drop. As it drifts, 
  I could change a factor in my interpolation and compensate. What do you all 
  think? It’s not critical, so there is no need for a precision circuit. 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">One nice added feature is that the 
  MCU has a built in comparator. I use this to trigger an extra reset pulse when 
  the saw slope reaches 3.6 volts. So, if I increase the saw slope, the ramp is 
  reset both when reaching 3.6V and by the DCO. This way, I get ‘hard sync’ 
  waveforms with only one DCO! Observe also that there is no qualitative 
  difference between the saw output of this DCO and a proper VCO. Especially 
  since I have added the bass jitter I measured up during the summer. 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Fredrik 
C</SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>