R
Ricky
Guest
On Thursday, June 29, 2023 at 12:17:14â¯PM UTC-4, Lasse Langwadt Christensen wrote:
So, you think FPGAs have significant frequency limitations? What sample rates are you thinking of? My impression was that usually the limitation is in the DAC, both sample rate and resolution.
Some time ago, I learned that insufficient phase accumulator resolution would generate spurs close to the frequency being generated, which makes them very hard to filter. This is not an intuitive outcome. So the resolution of the phase word needs to be large and the sine generator needs to accommodate this added resolution. As such, a simple lookup table is often not adequate, but other sine generation techniques need to be used to limit these close in spurs.
--
Rick C.
---- Get 1,000 miles of free Supercharging
---- Tesla referral code - https://ts.la/richard11209
torsdag den 29. juni 2023 kl. 16.14.25 UTC+2 skrev John Larkin:
On Thu, 29 Jun 2023 05:16:41 GMT, Jan Panteltje <al...@comet.invalid
wrote:
On a sunny day (Wed, 28 Jun 2023 14:58:33 -0700) it happened John Larkin
jla...@highlandSNIPMEtechnology.com> wrote in
moap9i94f8h96d3di...@4ax.com>:
On Wed, 28 Jun 2023 14:01:13 -0700 (PDT), Lasse Langwadt Christensen
lang...@fonz.dk> wrote:
onsdag den 28. juni 2023 kl. 16.40.32 UTC+2 skrev John Larkin:
On Wed, 28 Jun 2023 14:58:05 +0200, Klaus Vestergaard Kragelund
klau...@hotmail.com> wrote:
On 26-06-2023 16:20, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017
and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something
to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.
I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know
there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t
find information on which signals to combine.
A STM32 micro, so you can program whatever frequency you want to pass on.
Software DDS is fun too. Lots of micros have a 10 or 12-bit DAC which
can be lowpass filtered into a nearly perfect sine. Interrupting at a
few hundred KHz is easy nowadays.
A Pi Pico would make a cool general-purpose signal generator. There
are a zillion possibilities for a product there, and would just need a
bit of code.
I\'m guessing that a 1 MHz interrupt rate could be supported on the DDS
core. Covering the audio range would be easy.
I\'ll architect it if someone will code it.
this does 400Hz sin/cos DDS on the two DACs on a 168MHz STM32F407
https://github.com/langwadt/singen
at 500ksps it spends about 50% cpu time in the interrupt calculating each sin/cos using ARMs fixed point lib
using a simple table lookup is uses ~25%
Table lookup is great for DDS, where not many MSBs of the phase
accumulator are used. I\'ve brute-forced a 16 bit sine function the
dumbest possible way, a lookup table with 65536 entries.
On a Pico, one would copy the sine table into RAM, maybe unfold it
from flash at powerup.
I wonder if a Pi Pico can run code, the DDS ISR, out of ram. That
would avoid cache misses.
I once build an audio sine generator with a 4040 counter driving an EPROM with sine table into an R2R DAC
The oscillator was a 4046, wide frequency range,
Everybody here has done that!
Who needs processors....
Well, they do all sorts of stuff and are crazy cheap. The RP2040 chip
is $1 and has two ARM cores. One core can run code out of RAM at 133
MHz, so could replace an FPGA in a lot of situations.
Software DDS in a cheap uP is cool. Only ADI still makes DDS chips and
they are expensive and a nuisance to interface. May as well use a uP
or a cheap FPGA and do a lot of other stuff.
sure, at low frequencies
So, you think FPGAs have significant frequency limitations? What sample rates are you thinking of? My impression was that usually the limitation is in the DAC, both sample rate and resolution.
Some time ago, I learned that insufficient phase accumulator resolution would generate spurs close to the frequency being generated, which makes them very hard to filter. This is not an intuitive outcome. So the resolution of the phase word needs to be large and the sine generator needs to accommodate this added resolution. As such, a simple lookup table is often not adequate, but other sine generation techniques need to be used to limit these close in spurs.
--
Rick C.
---- Get 1,000 miles of free Supercharging
---- Tesla referral code - https://ts.la/richard11209