Hi Bert,
Agreed...even though I'm using a 16f1828 to practise with, my favourite low chip end of the moment is an 8 pin 12f1822. So a simple DDS program + servicing an odd interrupt (for frequency change)...should be a walk in the park. I also think even a low end 12f chip is going to be much more capable of outputting more than 5Khz...but I mentioned that frequency, only because it's all I need.
Correct, I would add, granularity to 0.01Hz or better (this is perhaps the most important requirement for me). That's where the larger accumulator is needed
(see my other post - http://www.picbasic.co.uk/forum/show...887#post106887 )
Without want to teach granny to suck eggs, the output frequency granularity is established from this formula...
interrupt frequency/ accumulator
So for an interrupt rate of say 20khz & a 16 bit accumulator, it'd be
20,000/65536 = 0.30Hz granularity which is insufficient for my needs, which means either making the accumulator larger, or the sample rate smaller....I don't want to do the latter, hence wanting to make the accumulator larger, but I then start hitting my knowledge boundary dealing in 17 bit+ numbers witin the confines of picbasic.
Also, there's likely to be a fair degree of floating point...which I'll have to work around. For example to set the required freqency, it's
(required frequency/sinterrupt rate)*accumulator , so for 1500Hz
(1500Hz/20,000) * 65536 ........clearly the first part of that equation is going to result in a decimal, so quite a few things impeding me at the moment!
re no passive devices ...well, ideally no reactive passive devices (on account they alter the amplitude as the frequency changes)....using an R2R ladder would be cool, except the take up a lot of space & that's something I always try to avoid (I can't seem to locate anyone that sells prefabbed R2R ladders here in the UK)





Bookmarks