Hi,
I had a play with this. Just a counter variable pointing into the lookup table which outputs the value to PortB where a R2R ladder and 2nd order low-pass filter with a cutoff at ~6kHz is waiting.
Here's a scopeshot, raw signal on Ch1, filtered on Ch2 (as if that wasn't obvious):
To get ~5kHz output I had to index the table in steps of 20 but then I'm only running at 8Mhz. At 32Mhz you should be able to get pretty good performance and signal "quality". Of course, everything is relative...
I did (or do) have a weird problem though with the PIC resetting that I can't figure out but I'll post that in a separate thread.
/Henrik.
Bookmarks