Driver to drive?

Jamie wrote:
Joerg wrote:

Spehro Pefhany wrote:

On Sun, 03 Mar 2013 09:48:31 -0800, the renowned Joerg
invalid@invalid.invalid> wrote:


If I wanted to do that I'd probably just get a uC with ADC and a big
fat
flash area, then use it just for this job. Its ADC reads my PID output,
points to the corresponding LUT address, shoves data to the DDS.
That is
how I'd do the final system, or let it calculate (depending how easy it
is to avoid birdies and stuff).

Have you considered just buying something like my Rigol DG4062 and
using it for proof-of-concept? For $795 it might be worth it, and it's
generally useful afterward with the USB and Ethernet interfaces etc.



I have, and the price isn't so important. I've got a Mastech arb gen
that would work just fine and is under $400. But I need something that
isn't so large.

Probably the old XR2206 will work ok. I was just surprised that no
company seems to have pick up this chip after it went lalaland.

Well lets see, I remember years ago a bunch of those chips got out there
and used for kits or what ever that actually didn't pass QC in the
sine wave shaper section. Guess some one found a market for them in any
case.
Ouch. How did they get those QC rejects? Those aren't supposed to be
chucked into an accessible dumpster.


I see that TAYDA Electronics has them for $2.99 and Mouser has a couple
in stock for only $87.00 bucks, most likely those past QC, chump change.
Yeah, that has me concerned as well. But ... if the distortion is 2%
instead of 1% it's not a major problem.

--
Regards, Joerg

http://www.analogconsultants.com/
 
George Herold wrote:
On Mar 3, 10:16 am, Joerg <inva...@invalid.invalid> wrote:
Jamie wrote:
Joerg wrote:
Joerg wrote:
Hi Folks,
Long story short, none of the DDS modules I've found so far has the
ability to be sweeped or FM-modulated. This one has a signal input
terminal block "SIN" but I received a response from the manufacturer
that it connects to nowhere, it has no function:
http://imall.iteadstudio.com/tools-and-equipment/im120723003.html
What I need in my case is DC-100Hz of sweep or FM bandwidth. Operating
frequency under 10kHz and sweep range up to 2kHz. Of course I can whip
up an analog solution but it won't be as precise and most of all not
really programmable.
Is there anything better? Cost is not a big issue but should be somewhat
small and a display would be nice.
In case someone else is in a similar situation, I've just discovered two
interesting alternatives if no suitable DDS module can be found. The 1st
is ye olde XR2206 which I thought had gone unobtanium:
http://electronics-diy.com/product_details.php?pid=537&name=1Hz%20-%2...
The 2nd solution is rather ugly. I could take these DDS modules and
replace the oscillator with a LTC resistor-set silicon oscillator. Those
can be current steered. Of course then the digital frequency display of
the module would become fairly meaningless but could still sort of
signal if my PID loop has locked or not.
If you want to get that crude, you could always turn to an old stand by..
LM566 :)
That has a square out that you can use to monitor in a counter for
example and a triangle out that you can wave shape into a sine wave.
That also includes a modulation input pin and it just happens
to be in your range.
But it puts out a square wave which I really can't use here. Has to be
sine and the potential range is too wide to cover that with a lowpass.
Else I could use a LTC resistor-controlled oscillaator by itself and
call it a day.

--
Regards, Joerg

http://www.analogconsultants.com/- Hide quoted text -

- Show quoted text -

What sort of range do you need? (Did you say already?)

Essentially up to 10KHz base frequency and the sweep could be +/-50% of
base. So any old digital register will do.


With the 4046->4017->R's
Harmonics start with the 9th...(The lower harmonics are less than 55db
with 0.1% R's.) So depending on what sort of lowpass you can get
maybe factor of three range.
True, but slowly this one section is turning into a little monster with
lots of parts :)

--
Regards, Joerg

http://www.analogconsultants.com/
 
On Mar 3, 4:27 am, Jan Panteltje <pNaonStpealm...@yahoo.com> wrote:
On a sunny day (Sat, 02 Mar 2013 15:47:46 -0800) it happened Joerg
inva...@invalid.invalid> wrote in <apfhdaF874...@mid.individual.net>:

If necessary I could do it that way. But I am not really a good
programmer. Ideall would be a module that has FM modulation or sweep. It
doesn't have to be DDS, just stable and not too large. Ripping it out of
a function generator is ok as well, as long as it's not much more than
two cigarette packs or so in size.

74HC4046 is a good VCO.

If you need sinewave out,  could a 4046 be used as clock for a DDS?
Never tried it.
I was thinking of a 4046, but certanly Joerg knows about it.
I did a VCO with a 4046 driving a 4017 with different R's into
an opamp summing junction. (A few threads here on SED.)
The harmonics start with the 9th and 11th.

George H.
 
On Mar 3, 10:16 am, Joerg <inva...@invalid.invalid> wrote:
Jamie wrote:
Joerg wrote:

Joerg wrote:

Hi Folks,

Long story short, none of the DDS modules I've found so far has the
ability to be sweeped or FM-modulated. This one has a signal input
terminal block "SIN" but I received a response from the manufacturer
that it connects to nowhere, it has no function:

http://imall.iteadstudio.com/tools-and-equipment/im120723003.html

What I need in my case is DC-100Hz of sweep or FM bandwidth. Operating
frequency under 10kHz and sweep range up to 2kHz. Of course I can whip
up an analog solution but it won't be as precise and most of all not
really programmable.

Is there anything better? Cost is not a big issue but should be somewhat
small and a display would be nice.

In case someone else is in a similar situation, I've just discovered two
interesting alternatives if no suitable DDS module can be found. The 1st
is ye olde XR2206 which I thought had gone unobtanium:

http://electronics-diy.com/product_details.php?pid=537&name=1Hz%20-%2...

The 2nd solution is rather ugly. I could take these DDS modules and
replace the oscillator with a LTC resistor-set silicon oscillator. Those
can be current steered. Of course then the digital frequency display of
the module would become fairly meaningless but could still sort of
signal if my PID loop has locked or not.

 If you want to get that crude, you could always turn to an old stand by..
 LM566 :)

  That has a square out that you can use to monitor in a counter for
example and a triangle out that you can wave shape into a sine wave.

 That also includes a modulation input pin and it just happens
to be in your range.

But it puts out a square wave which I really can't use here. Has to be
sine and the potential range is too wide to cover that with a lowpass.
Else I could use a LTC resistor-controlled oscillaator by itself and
call it a day.

--
Regards, Joerg

http://www.analogconsultants.com/- Hide quoted text -

- Show quoted text -
What sort of range do you need? (Did you say already?)
With the 4046->4017->R's
Harmonics start with the 9th...(The lower harmonics are less than 55db
with 0.1% R's.) So depending on what sort of lowpass you can get
maybe factor of three range.

George H.
 
George Herold wrote:
On Mar 3, 6:42 pm, Joerg <inva...@invalid.invalid> wrote:
George Herold wrote:
On Mar 3, 10:16 am, Joerg <inva...@invalid.invalid> wrote:
Jamie wrote:
Joerg wrote:
Joerg wrote:
Hi Folks,
Long story short, none of the DDS modules I've found so far has the
ability to be sweeped or FM-modulated. This one has a signal input
terminal block "SIN" but I received a response from the manufacturer
that it connects to nowhere, it has no function:
http://imall.iteadstudio.com/tools-and-equipment/im120723003.html
What I need in my case is DC-100Hz of sweep or FM bandwidth. Operating
frequency under 10kHz and sweep range up to 2kHz. Of course I can whip
up an analog solution but it won't be as precise and most of all not
really programmable.
Is there anything better? Cost is not a big issue but should be somewhat
small and a display would be nice.
In case someone else is in a similar situation, I've just discovered two
interesting alternatives if no suitable DDS module can be found. The 1st
is ye olde XR2206 which I thought had gone unobtanium:
http://electronics-diy.com/product_details.php?pid=537&name=1Hz%20-%2...
The 2nd solution is rather ugly. I could take these DDS modules and
replace the oscillator with a LTC resistor-set silicon oscillator. Those
can be current steered. Of course then the digital frequency display of
the module would become fairly meaningless but could still sort of
signal if my PID loop has locked or not.
If you want to get that crude, you could always turn to an old stand by..
LM566 :)
That has a square out that you can use to monitor in a counter for
example and a triangle out that you can wave shape into a sine wave.
That also includes a modulation input pin and it just happens
to be in your range.
But it puts out a square wave which I really can't use here. Has to be
sine and the potential range is too wide to cover that with a lowpass.
Else I could use a LTC resistor-controlled oscillaator by itself and
call it a day.
--
Regards, Joerg
http://www.analogconsultants.com/-Hide quoted text -
- Show quoted text -
What sort of range do you need? (Did you say already?)
Essentially up to 10KHz base frequency and the sweep could be +/-50% of
base. So any old digital register will do.

With the 4046->4017->R's
Harmonics start with the 9th...(The lower harmonics are less than 55db
with 0.1% R's.) So depending on what sort of lowpass you can get
maybe factor of three range.
True, but slowly this one section is turning into a little monster with
lots of parts :)

Ja, Ja, lotsa parts!
(maybe 5 different R's)

And a 4017. And some capacitors for the Bessel. And some inductors :)

But it sure is an idea that would work.

--
Regards, Joerg

http://www.analogconsultants.com/
 
On Mar 3, 6:12 pm, George Herold <gher...@teachspin.com> wrote:
On Mar 3, 10:16 am, Joerg <inva...@invalid.invalid> wrote:





Jamie wrote:
Joerg wrote:

Joerg wrote:

Hi Folks,

Long story short, none of the DDS modules I've found so far has the
ability to be sweeped or FM-modulated. This one has a signal input
terminal block "SIN" but I received a response from the manufacturer
that it connects to nowhere, it has no function:

http://imall.iteadstudio.com/tools-and-equipment/im120723003.html

What I need in my case is DC-100Hz of sweep or FM bandwidth. Operating
frequency under 10kHz and sweep range up to 2kHz. Of course I can whip
up an analog solution but it won't be as precise and most of all not
really programmable.

Is there anything better? Cost is not a big issue but should be somewhat
small and a display would be nice.

In case someone else is in a similar situation, I've just discovered two
interesting alternatives if no suitable DDS module can be found. The 1st
is ye olde XR2206 which I thought had gone unobtanium:

http://electronics-diy.com/product_details.php?pid=537&name=1Hz%20-%2...

The 2nd solution is rather ugly. I could take these DDS modules and
replace the oscillator with a LTC resistor-set silicon oscillator. Those
can be current steered. Of course then the digital frequency display of
the module would become fairly meaningless but could still sort of
signal if my PID loop has locked or not.

 If you want to get that crude, you could always turn to an old stand by..
 LM566 :)

  That has a square out that you can use to monitor in a counter for
example and a triangle out that you can wave shape into a sine wave.

 That also includes a modulation input pin and it just happens
to be in your range.

But it puts out a square wave which I really can't use here. Has to be
sine and the potential range is too wide to cover that with a lowpass.
Else I could use a LTC resistor-controlled oscillaator by itself and
call it a day.

--
Regards, Joerg

http://www.analogconsultants.com/-Hide quoted text -

- Show quoted text -

What sort of range do you need? (Did you say already?)
With the 4046->4017->R's
Harmonics start with the 9th...(The lower harmonics are less than 55db
with 0.1% R's.)  So depending on what sort of lowpass you can get
maybe factor of three range.

George H.- Hide quoted text -

- Show quoted text -
Joerg, This trick looks perfect for you. I'm hoping you'll show me
how to to get the lower harmonics down below 60dB. :^)
The only bit I wanted to add is that I first used a 6-pole Butterworth
LP, but it looked like crap in the time domain at the edges, and I
switched to a Bessel.

George H.
 
Joerg wrote:

Jamie wrote:

Joerg wrote:


Spehro Pefhany wrote:


On Sun, 03 Mar 2013 09:48:31 -0800, the renowned Joerg
invalid@invalid.invalid> wrote:



If I wanted to do that I'd probably just get a uC with ADC and a big
fat
flash area, then use it just for this job. Its ADC reads my PID output,
points to the corresponding LUT address, shoves data to the DDS.
That is
how I'd do the final system, or let it calculate (depending how easy it
is to avoid birdies and stuff).

Have you considered just buying something like my Rigol DG4062 and
using it for proof-of-concept? For $795 it might be worth it, and it's
generally useful afterward with the USB and Ethernet interfaces etc.



I have, and the price isn't so important. I've got a Mastech arb gen
that would work just fine and is under $400. But I need something that
isn't so large.

Probably the old XR2206 will work ok. I was just surprised that no
company seems to have pick up this chip after it went lalaland.


Well lets see, I remember years ago a bunch of those chips got out there
and used for kits or what ever that actually didn't pass QC in the
sine wave shaper section. Guess some one found a market for them in any
case.



Ouch. How did they get those QC rejects? Those aren't supposed to be
chucked into an accessible dumpster.



I see that TAYDA Electronics has them for $2.99 and Mouser has a couple
in stock for only $87.00 bucks, most likely those past QC, chump change.



Yeah, that has me concerned as well. But ... if the distortion is 2%
instead of 1% it's not a major problem.
Oh yeah, we had a bunch that came in kits best suited for starter
electronic people from a particular source that were packaging them.
..
Also, back then surplus centers were very popular and you could find
these chips there and more than likely they were seconds but they
made their way out there in equipment where they didn't belong..

These days things are laser trimmed and that isn't such an issue any
more.

With today's methods of fabbing chips, I would bet a chip like that
could be reproduce with a much better yield and precision.

Jamie
 
On Sun, 03 Mar 2013 22:35:28 GMT, nico@puntnl.niks (Nico Coesel) wrote:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 20:38:07 GMT, nico@puntnl.niks (Nico Coesel) wrote:

Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> wrote:

On Sun, 03 Mar 2013 18:49:31 GMT, the renowned nico@puntnl.niks (Nico
Coesel) wrote:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 09:48:31 -0800, Joerg <invalid@invalid.invalid> wrote:

Spehro Pefhany wrote:
On Sun, 03 Mar 2013 07:55:07 -0800, the renowned Joerg
invalid@invalid.invalid> wrote:

Jan Panteltje wrote:
On a sunny day (Sun, 03 Mar 2013 07:16:30 -0800) it happened Joerg
invalid@invalid.invalid> wrote in <aph7qmFj5hdU2@mid.individual.net>:

But it puts out a square wave which I really can't use here. Has to be
sine and the potential range is too wide to cover that with a lowpass.
Else I could use a LTC resistor-controlled oscillaator by itself and
call it a day.
Very long time a go I made a sine wave sweep generator for testing active audio filters
by using a 4046 VCO (linear f versus V), a 4040 counter, a 4k EPROM with a sine wave table,
and a 8 bit DAC.
Also had some opamp and integrator and 2 comparators, so it could sweep from f1 to f2.
That sort of thing can make a reasonable pure sinewave.
But you would need to be able to program an EPROM.
Not much that can go wrong with it, if you need more than 8 bits use 2 EPROMS.

Believe it or not, I don't even have an EPROM burner anymore. Could get
one though. The table would be generated with Excel. For UV-erasing I
could just place the EPROM on the roof, the sun is pretty intense here.

Flash memory 70ns 256K x 16 is $1.10 one-off, but you wouldn't be able
to use even one cent worth of it.


If I wanted to do that I'd probably just get a uC with ADC and a big fat
flash area, then use it just for this job. Its ADC reads my PID output,
points to the corresponding LUT address, shoves data to the DDS. That is
how I'd do the final system, or let it calculate (depending how easy it
is to avoid birdies and stuff).

Something like an LPC1754 would do all that for about $4. If you can find a C
programmer person who can code and flash the chip, I could write the pseudocode.
It would need some startup code (set up CPU junk, configure the ADC and DAC) and
an IRQ routine to read the ADC, do the DDS stuff, and load the DAC. The ADC
could cause the IRQ at a couple hundred KHz, and the IRQ code would be short and
sweet.

I wouldn't be surprised you don't the DDS stuff at all.

?????

need

Just use
floating point. The chip is probably fast enough to emulate. After all
its one sin() and some additions to get the output. Some fast float to
integer conversion magic and its all done.

LPC43xx should be fast enough- it's got hardware floating point.

Floats don't help implementing the DDS core; they actually make it harder.

How come? IMHO generating a sine wave is a matter of output=sin(angle)
* amplitude. Angle is incremented by a step which depends on the
sample rate and frequency. From memory: Say your samplerate is 10kHz
and your output frequency is 105.3Hz then the size of each increment
is (2pi / 10kHz) * 105.3Hz radians. That is very easy to program.
Ofcourse it will need some tweaks to make it fast but the basics are
simple.
DDS uses a long (typically around 48 bits) integer phase accumulator which
conveniently overflows every 2pi radians with no additional code. The top N bits
(say, 10 or 12) are mapped through a sine table and drives the DAC. It's very
simple, just a few lines of code. You'd need double floats, overflow tests, some
sort of sine algorithm, and a float-to-fix conversion for the DAC. That would
require hardware floats, and probably woundn't work as well as the integer
version.

I think that spitting out floating-point transcendentals in < 10usec
on a Cortex M3 running at only 100MHz is asking too much of the
standard library functions.

Sine is easily, and usually, done with a lookup table in DDS apps. That will
take a few tens of nanoseconds on a 100 MHz ARM.


Who said you'd need a sampling frequency of 100kHz? Or at least
calculate samples that fast...

100 or 200KHz IRQ rate (5 to 10x Nyquist) would be easy on an LPC1754. The
advantage of a higher rate is that you'd need a less demanding lowpass filter
after the DAC.

For that purpose you can upsample before sending the data to the DAC.
I often sample at unrealistic rates and then downsample before doing
the actual processing to avoid (too much) filtering. A 4th order fixed
point IIR filter is almost free when it comes to CPU cycles on an ARM.
The IIR would take longer to execute than the DDS algorithm.


--

John Larkin Highland Technology Inc
www.highlandtechnology.com jlarkin at highlandtechnology dot com

Precision electronic instrumentation
Picosecond-resolution Digital Delay and Pulse generators
Custom timing and laser controllers
Photonics and fiberoptic TTL data links
VME analog, thermocouple, LVDT, synchro, tachometer
Multichannel arbitrary waveform generators
 
On Mar 3, 9:43 pm, qrk <SpamT...@spam.net> wrote:
On Sat, 02 Mar 2013 12:37:10 -0800, Joerg <inva...@invalid.invalid
wrote:









Hi Folks,

Long story short, none of the DDS modules I've found so far has the
ability to be sweeped or FM-modulated. This one has a signal input
terminal block "SIN" but I received a response from the manufacturer
that it connects to nowhere, it has no function:

http://imall.iteadstudio.com/tools-and-equipment/im120723003.html

What I need in my case is DC-100Hz of sweep or FM bandwidth. Operating
frequency under 10kHz and sweep range up to 2kHz. Of course I can whip
up an analog solution but it won't be as precise and most of all not
really programmable.

Is there anything better? Cost is not a big issue but should be somewhat
small and a display would be nice.

If you have an FPGA in your project, stick it in there. DDS is easy to
implement in an FPGA.
at the frequencies needed it is also easy in an MCU, but he wants
display
and buttons so you'll need to find some hardware with that and afair
he also
needed 2Vrms in 50R so also needs an output buffer

and while it wouldn't take long for someone with experience with an
MCU
it would take some time if you need to start from scratch

if he could do with a user interface via usb or serial port and an
unbuffered
DAC output it could be whipped up in few hours on almost any of the
cheap cortex
boards

one of stm32 discovery boards has a headphone amplifier so maybe that
could work
but it still leaves the user interface

-Lasse
 
On Mar 3, 6:42 pm, Joerg <inva...@invalid.invalid> wrote:
George Herold wrote:
On Mar 3, 10:16 am, Joerg <inva...@invalid.invalid> wrote:
Jamie wrote:
Joerg wrote:
Joerg wrote:
Hi Folks,
Long story short, none of the DDS modules I've found so far has the
ability to be sweeped or FM-modulated. This one has a signal input
terminal block "SIN" but I received a response from the manufacturer
that it connects to nowhere, it has no function:
http://imall.iteadstudio.com/tools-and-equipment/im120723003.html
What I need in my case is DC-100Hz of sweep or FM bandwidth. Operating
frequency under 10kHz and sweep range up to 2kHz. Of course I can whip
up an analog solution but it won't be as precise and most of all not
really programmable.
Is there anything better? Cost is not a big issue but should be somewhat
small and a display would be nice.
In case someone else is in a similar situation, I've just discovered two
interesting alternatives if no suitable DDS module can be found. The 1st
is ye olde XR2206 which I thought had gone unobtanium:
http://electronics-diy.com/product_details.php?pid=537&name=1Hz%20-%2...
The 2nd solution is rather ugly. I could take these DDS modules and
replace the oscillator with a LTC resistor-set silicon oscillator. Those
can be current steered. Of course then the digital frequency display of
the module would become fairly meaningless but could still sort of
signal if my PID loop has locked or not.
 If you want to get that crude, you could always turn to an old stand by..
 LM566 :)
  That has a square out that you can use to monitor in a counter for
example and a triangle out that you can wave shape into a sine wave.
 That also includes a modulation input pin and it just happens
to be in your range.
But it puts out a square wave which I really can't use here. Has to be
sine and the potential range is too wide to cover that with a lowpass.
Else I could use a LTC resistor-controlled oscillaator by itself and
call it a day.

--
Regards, Joerg

http://www.analogconsultants.com/-Hide quoted text -

- Show quoted text -

What sort of range do you need? (Did you say already?)

Essentially up to 10KHz base frequency and the sweep could be +/-50% of
base. So any old digital register will do.

With the 4046->4017->R's
Harmonics start with the 9th...(The lower harmonics are less than 55db
with 0.1% R's.)  So depending on what sort of lowpass you can get
maybe factor of three range.

True, but slowly this one section is turning into a little monster with
lots of parts :)
Ja, Ja, lotsa parts!
(maybe 5 different R's)
George H.
--
Regards, Joerg

http://www.analogconsultants.com/- Hide quoted text -

- Show quoted text -
 
bloggs.fredbloggs.fred@gmail.com wrote:

On Saturday, March 2, 2013 12:01:37 PM UTC-5, John Larkin wrote:

http://www.theregister.co.uk/2013/03/01/wikihouse_architect_pitches_print_your_own_house_project/


The panelized housing industry already does this, they ship everything to
you in pieces, and you assemble it, seems to be their idea.

Yup, I live in a panelized house, built in 1975. We had an energy survey
done a few years ago, they found a few air leaks where the panels are
joined, otherwise it went very well. The only problem is it is a TOTAL
BEAR to run wires in the walls, etc.

Jon
 
On Sunday, March 3, 2013 10:31:39 PM UTC-5, Jon Elson wrote:
bloggs.fredbloggs.fred@gmail.com wrote:



On Saturday, March 2, 2013 12:01:37 PM UTC-5, John Larkin wrote:



http://www.theregister.co.uk/2013/03/01/wikihouse_architect_pitches_print_your_own_house_project/





The panelized housing industry already does this, they ship everything to

you in pieces, and you assemble it, seems to be their idea.





Yup, I live in a panelized house, built in 1975. We had an energy survey

done a few years ago, they found a few air leaks where the panels are

joined, otherwise it went very well. The only problem is it is a TOTAL

BEAR to run wires in the walls, etc.



Jon
They've made significant inroads in the past 37 years. I'm pretty sure they now have raceways in the panels to accommodate the wiring.
http://www.youtube.com/watch?v=EUkt3gJ1Lig
They're showing block masonry there, but for just a little more you can go with custom prefabbed concrete, delivered cured to 5000 psi, doubly reinforced, insulated, immune to shrink swell, no footings required (goes on tamped gravel base), gets craned in place to laser accuracy in a few hours, nationwide availability, and their field engineers /know/ concrete. http://www.superiorwalls.com/
 
John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 22:35:28 GMT, nico@puntnl.niks (Nico Coesel) wrote:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 20:38:07 GMT, nico@puntnl.niks (Nico Coesel) wrote:

Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> wrote:

On Sun, 03 Mar 2013 18:49:31 GMT, the renowned nico@puntnl.niks (Nico
Coesel) wrote:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 09:48:31 -0800, Joerg <invalid@invalid.invalid> wrote:


Just use
floating point. The chip is probably fast enough to emulate. After all
its one sin() and some additions to get the output. Some fast float to
integer conversion magic and its all done.

LPC43xx should be fast enough- it's got hardware floating point.

Floats don't help implementing the DDS core; they actually make it harder.

How come? IMHO generating a sine wave is a matter of output=sin(angle)
* amplitude. Angle is incremented by a step which depends on the
sample rate and frequency. From memory: Say your samplerate is 10kHz
and your output frequency is 105.3Hz then the size of each increment
is (2pi / 10kHz) * 105.3Hz radians. That is very easy to program.
Ofcourse it will need some tweaks to make it fast but the basics are
simple.

DDS uses a long (typically around 48 bits) integer phase accumulator which
conveniently overflows every 2pi radians with no additional code. The top N bits
(say, 10 or 12) are mapped through a sine table and drives the DAC. It's very
simple, just a few lines of code. You'd need double floats, overflow tests, some
sort of sine algorithm, and a float-to-fix conversion for the DAC. That would
require hardware floats, and probably woundn't work as well as the integer
version.
If you assume emulated floating point is infinitely slow but usually
it isn't. I have used emulated floating point in a signal processing
application on ARM before and I know it does have its advantages.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico@nctdevpuntnl (punt=.)
--------------------------------------------------------------
 
nico@puntnl.niks (Nico Coesel) writes:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 22:35:28 GMT, nico@puntnl.niks (Nico Coesel) wrote:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 20:38:07 GMT, nico@puntnl.niks (Nico Coesel) wrote:

Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> wrote:

On Sun, 03 Mar 2013 18:49:31 GMT, the renowned nico@puntnl.niks (Nico
Coesel) wrote:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 09:48:31 -0800, Joerg <invalid@invalid.invalid> wrote:


Just use
floating point. The chip is probably fast enough to emulate. After all
its one sin() and some additions to get the output. Some fast float to
integer conversion magic and its all done.

LPC43xx should be fast enough- it's got hardware floating point.

Floats don't help implementing the DDS core; they actually make it harder.

How come? IMHO generating a sine wave is a matter of output=sin(angle)
* amplitude. Angle is incremented by a step which depends on the
sample rate and frequency. From memory: Say your samplerate is 10kHz
and your output frequency is 105.3Hz then the size of each increment
is (2pi / 10kHz) * 105.3Hz radians. That is very easy to program.
Ofcourse it will need some tweaks to make it fast but the basics are
simple.

DDS uses a long (typically around 48 bits) integer phase accumulator which
conveniently overflows every 2pi radians with no additional code. The top N bits
(say, 10 or 12) are mapped through a sine table and drives the DAC. It's very
simple, just a few lines of code. You'd need double floats, overflow tests, some
sort of sine algorithm, and a float-to-fix conversion for the DAC. That would
require hardware floats, and probably woundn't work as well as the integer
version.

If you assume emulated floating point is infinitely slow but usually
it isn't. I have used emulated floating point in a signal processing
application on ARM before and I know it does have its advantages.
I made some crude measurements on a 120MHz STM32F2, emulated floating
point and gcc:

Double Precision:
0.415us / 49.852 cycles /multiply
0.378us / 45.403 cycles /add
2.414us / 289.702 cycles /divide

Single Precision:
0.194us / 23.350 cycles /multiply
0.250us / 30.052 cycles /add
0.610us / 73.202 cycles / divide

Pretty respectable I thought.


--

John Devereux
 
On Mar 4, 1:05 pm, n...@puntnl.niks (Nico Coesel) wrote:
John Larkin <jjlar...@highNOTlandTHIStechnologyPART.com> wrote:
On Sun, 03 Mar 2013 22:35:28 GMT, n...@puntnl.niks (Nico Coesel) wrote:

John Larkin <jjlar...@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 20:38:07 GMT, n...@puntnl.niks (Nico Coesel) wrote:

Spehro Pefhany <speffS...@interlogDOTyou.knowwhat> wrote:

On Sun, 03 Mar 2013 18:49:31 GMT, the renowned n...@puntnl.niks (Nico
Coesel) wrote:

John Larkin <jjlar...@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 09:48:31 -0800, Joerg <inva...@invalid.invalid> wrote:

Just use
floating point. The chip is probably fast enough to emulate. After all
its one sin() and some additions to get the output. Some fast float to
integer conversion magic and its all done.

LPC43xx should be fast enough- it's got hardware floating point.

Floats don't help implementing the DDS core; they actually make it harder.

How come? IMHO generating a sine wave is a matter of output=sin(angle)
* amplitude. Angle is incremented by a step which depends on the
sample rate and frequency. From memory: Say your samplerate is 10kHz
and your output frequency is 105.3Hz then the size of each increment
is (2pi / 10kHz) * 105.3Hz radians. That is very easy to program.
Ofcourse it will need some tweaks to make it fast but the basics are
simple.

DDS uses a long (typically around 48 bits) integer phase accumulator which
conveniently overflows every 2pi radians with no additional code. The top N bits
(say, 10 or 12) are mapped through a sine table and drives the DAC. It's very
simple, just a few lines of code. You'd need double floats, overflow tests, some
sort of sine algorithm, and a float-to-fix conversion for the DAC. That would
require hardware floats, and probably woundn't work as well as the integer
version.

If you assume emulated floating point is infinitely slow but usually
it isn't. I have used emulated floating point in a signal processing
application on ARM before and I know it does have its advantages.
using the usual fixed point phase accumulator and then doing sin()
in float makes sense

but doing the phase accumutation in floats I'm not so sure about,
forever doing an accumulation modulo 2*pi sounds iffy

with fixed point it is exact since 2^n is defined to be 2*pi

-Lasse
 
On Mon, 04 Mar 2013 13:22:16 +0000, John Devereux <john@devereux.me.uk> wrote:

nico@puntnl.niks (Nico Coesel) writes:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 22:35:28 GMT, nico@puntnl.niks (Nico Coesel) wrote:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 20:38:07 GMT, nico@puntnl.niks (Nico Coesel) wrote:

Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> wrote:

On Sun, 03 Mar 2013 18:49:31 GMT, the renowned nico@puntnl.niks (Nico
Coesel) wrote:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 09:48:31 -0800, Joerg <invalid@invalid.invalid> wrote:


Just use
floating point. The chip is probably fast enough to emulate. After all
its one sin() and some additions to get the output. Some fast float to
integer conversion magic and its all done.

LPC43xx should be fast enough- it's got hardware floating point.

Floats don't help implementing the DDS core; they actually make it harder.

How come? IMHO generating a sine wave is a matter of output=sin(angle)
* amplitude. Angle is incremented by a step which depends on the
sample rate and frequency. From memory: Say your samplerate is 10kHz
and your output frequency is 105.3Hz then the size of each increment
is (2pi / 10kHz) * 105.3Hz radians. That is very easy to program.
Ofcourse it will need some tweaks to make it fast but the basics are
simple.

DDS uses a long (typically around 48 bits) integer phase accumulator which
conveniently overflows every 2pi radians with no additional code. The top N bits
(say, 10 or 12) are mapped through a sine table and drives the DAC. It's very
simple, just a few lines of code. You'd need double floats, overflow tests, some
sort of sine algorithm, and a float-to-fix conversion for the DAC. That would
require hardware floats, and probably woundn't work as well as the integer
version.

If you assume emulated floating point is infinitely slow but usually
it isn't. I have used emulated floating point in a signal processing
application on ARM before and I know it does have its advantages.

I made some crude measurements on a 120MHz STM32F2, emulated floating
point and gcc:

Double Precision:
0.415us / 49.852 cycles /multiply
0.378us / 45.403 cycles /add
2.414us / 289.702 cycles /divide

Single Precision:
0.194us / 23.350 cycles /multiply
0.250us / 30.052 cycles /add
0.610us / 73.202 cycles / divide

Pretty respectable I thought.
As compared to 1 cycle for add/sub/shift/mul on an ARM.

There's no reason to use any floats in a DDS sinewave generator.


--

John Larkin Highland Technology Inc
www.highlandtechnology.com jlarkin at highlandtechnology dot com

Precision electronic instrumentation
Picosecond-resolution Digital Delay and Pulse generators
Custom timing and laser controllers
Photonics and fiberoptic TTL data links
VME analog, thermocouple, LVDT, synchro, tachometer
Multichannel arbitrary waveform generators
 
John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> writes:

On Mon, 04 Mar 2013 13:22:16 +0000, John Devereux <john@devereux.me.uk> wrote:

nico@puntnl.niks (Nico Coesel) writes:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 22:35:28 GMT, nico@puntnl.niks (Nico Coesel) wrote:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 20:38:07 GMT, nico@puntnl.niks (Nico Coesel) wrote:

Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> wrote:

On Sun, 03 Mar 2013 18:49:31 GMT, the renowned nico@puntnl.niks (Nico
Coesel) wrote:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 09:48:31 -0800, Joerg <invalid@invalid.invalid> wrote:


Just use
floating point. The chip is probably fast enough to emulate. After all
its one sin() and some additions to get the output. Some fast float to
integer conversion magic and its all done.

LPC43xx should be fast enough- it's got hardware floating point.

Floats don't help implementing the DDS core; they actually make it harder.

How come? IMHO generating a sine wave is a matter of output=sin(angle)
* amplitude. Angle is incremented by a step which depends on the
sample rate and frequency. From memory: Say your samplerate is 10kHz
and your output frequency is 105.3Hz then the size of each increment
is (2pi / 10kHz) * 105.3Hz radians. That is very easy to program.
Ofcourse it will need some tweaks to make it fast but the basics are
simple.

DDS uses a long (typically around 48 bits) integer phase accumulator which
conveniently overflows every 2pi radians with no additional code. The top N bits
(say, 10 or 12) are mapped through a sine table and drives the DAC. It's very
simple, just a few lines of code. You'd need double floats, overflow tests, some
sort of sine algorithm, and a float-to-fix conversion for the DAC. That would
require hardware floats, and probably woundn't work as well as the integer
version.

If you assume emulated floating point is infinitely slow but usually
it isn't. I have used emulated floating point in a signal processing
application on ARM before and I know it does have its advantages.

I made some crude measurements on a 120MHz STM32F2, emulated floating
point and gcc:

Double Precision:
0.415us / 49.852 cycles /multiply
0.378us / 45.403 cycles /add
2.414us / 289.702 cycles /divide

Single Precision:
0.194us / 23.350 cycles /multiply
0.250us / 30.052 cycles /add
0.610us / 73.202 cycles / divide

Pretty respectable I thought.

As compared to 1 cycle for add/sub/shift/mul on an ARM.

There's no reason to use any floats in a DDS sinewave generator.
Well no, was just responding to point about floats needing to be in
hardware, if they *were* used.


--

John Devereux
 
On Mon, 04 Mar 2013 15:05:29 +0000, John Devereux <john@devereux.me.uk> wrote:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> writes:

On Mon, 04 Mar 2013 13:22:16 +0000, John Devereux <john@devereux.me.uk> wrote:

nico@puntnl.niks (Nico Coesel) writes:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 22:35:28 GMT, nico@puntnl.niks (Nico Coesel) wrote:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 20:38:07 GMT, nico@puntnl.niks (Nico Coesel) wrote:

Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> wrote:

On Sun, 03 Mar 2013 18:49:31 GMT, the renowned nico@puntnl.niks (Nico
Coesel) wrote:

John Larkin <jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 09:48:31 -0800, Joerg <invalid@invalid.invalid> wrote:


Just use
floating point. The chip is probably fast enough to emulate. After all
its one sin() and some additions to get the output. Some fast float to
integer conversion magic and its all done.

LPC43xx should be fast enough- it's got hardware floating point.

Floats don't help implementing the DDS core; they actually make it harder.

How come? IMHO generating a sine wave is a matter of output=sin(angle)
* amplitude. Angle is incremented by a step which depends on the
sample rate and frequency. From memory: Say your samplerate is 10kHz
and your output frequency is 105.3Hz then the size of each increment
is (2pi / 10kHz) * 105.3Hz radians. That is very easy to program.
Ofcourse it will need some tweaks to make it fast but the basics are
simple.

DDS uses a long (typically around 48 bits) integer phase accumulator which
conveniently overflows every 2pi radians with no additional code. The top N bits
(say, 10 or 12) are mapped through a sine table and drives the DAC. It's very
simple, just a few lines of code. You'd need double floats, overflow tests, some
sort of sine algorithm, and a float-to-fix conversion for the DAC. That would
require hardware floats, and probably woundn't work as well as the integer
version.

If you assume emulated floating point is infinitely slow but usually
it isn't. I have used emulated floating point in a signal processing
application on ARM before and I know it does have its advantages.

I made some crude measurements on a 120MHz STM32F2, emulated floating
point and gcc:

Double Precision:
0.415us / 49.852 cycles /multiply
0.378us / 45.403 cycles /add
2.414us / 289.702 cycles /divide

Single Precision:
0.194us / 23.350 cycles /multiply
0.250us / 30.052 cycles /add
0.610us / 73.202 cycles / divide

Pretty respectable I thought.

As compared to 1 cycle for add/sub/shift/mul on an ARM.

There's no reason to use any floats in a DDS sinewave generator.

Well no, was just responding to point about floats needing to be in
hardware, if they *were* used.
That's true, but you'd pay another dollar or so for hardware floats, and Joerg
wouldn't like that.


--

John Larkin Highland Technology Inc
www.highlandtechnology.com jlarkin at highlandtechnology dot com

Precision electronic instrumentation
Picosecond-resolution Digital Delay and Pulse generators
Custom timing and laser controllers
Photonics and fiberoptic TTL data links
VME analog, thermocouple, LVDT, synchro, tachometer
Multichannel arbitrary waveform generators
 
"langwadt@fonz.dk" <langwadt@fonz.dk> wrote:

On Mar 4, 1:05=A0pm, n...@puntnl.niks (Nico Coesel) wrote:
John Larkin <jjlar...@highNOTlandTHIStechnologyPART.com> wrote:
On Sun, 03 Mar 2013 22:35:28 GMT, n...@puntnl.niks (Nico Coesel) wrote:

John Larkin <jjlar...@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 20:38:07 GMT, n...@puntnl.niks (Nico Coesel) wrote=
:

Spehro Pefhany <speffS...@interlogDOTyou.knowwhat> wrote:

On Sun, 03 Mar 2013 18:49:31 GMT, the renowned n...@puntnl.niks (Nic=
o
Coesel) wrote:

John Larkin <jjlar...@highNOTlandTHIStechnologyPART.com> wrote:

On Sun, 03 Mar 2013 09:48:31 -0800, Joerg <inva...@invalid.invalid=
wrote:

Just use
floating point. The chip is probably fast enough to emulate. After =
all
its one sin() and some additions to get the output. Some fast float=
to
integer conversion magic and its all done.

LPC43xx should be fast enough- it's got hardware floating point.

Floats don't help implementing the DDS core; they actually make it har=
der.

How come? IMHO generating a sine wave is a matter of output=3Dsin(angle=
)
* amplitude. Angle is incremented by a step which depends on the
sample rate and frequency. From memory: Say your samplerate is 10kHz
and your output frequency is 105.3Hz then the size of each increment
is (2pi / 10kHz) * 105.3Hz radians. That is very easy to program.
Ofcourse it will need some tweaks to make it fast but the basics are
simple.

DDS uses a long (typically around 48 bits) integer phase accumulator whi=
ch
conveniently overflows every 2pi radians with no additional code. The to=
p N bits
(say, 10 or 12) are mapped through a sine table and drives the DAC. It's=
very
simple, just a few lines of code. You'd need double floats, overflow tes=
ts, some
sort of sine algorithm, and a float-to-fix conversion for the DAC. That =
would
require hardware floats, and probably woundn't work as well as the integ=
er
version.

If you assume emulated floating point is infinitely slow but usually
it isn't. I have used emulated floating point in a signal processing
application on ARM before and I know it does have its advantages.


using the usual fixed point phase accumulator and then doing sin()
in float makes sense

but doing the phase accumutation in floats I'm not so sure about,
forever doing an accumulation modulo 2*pi sounds iffy

with fixed point it is exact since 2^n is defined to be 2*pi
Floating point is always an approximation just like a fixed point
integer. In this case top few bits of a float will vary between 0 and
2pi. The top bits of an integer phase accumulator will vary between 0
and the length of the lookup table.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico@nctdevpuntnl (punt=.)
--------------------------------------------------------------
 
On Sun, 03 Mar 2013 21:31:39 -0600, Jon Elson <elson@pico-systems.com>
wrote:

bloggs.fredbloggs.fred@gmail.com wrote:

On Saturday, March 2, 2013 12:01:37 PM UTC-5, John Larkin wrote:

http://www.theregister.co.uk/2013/03/01/wikihouse_architect_pitches_print_your_own_house_project/


The panelized housing industry already does this, they ship everything to
you in pieces, and you assemble it, seems to be their idea.


Yup, I live in a panelized house, built in 1975. We had an energy survey
done a few years ago, they found a few air leaks where the panels are
joined, otherwise it went very well. The only problem is it is a TOTAL
BEAR to run wires in the walls, etc.

Jon
For wiring, I still like the idea of surface (baseboard) mounted
conduit that looks like molding I have also seen furring strips and
drywall installed over the panels to provide wiring space behind the
drywall...
 

Welcome to EDABoard.com

Sponsor

Back
Top