do you want to offset input or output of DFB? The output will be always centered around 0 no matter whether input is positive or centered around 0.
You could use A/D EOC to trigger ISR that does the offset and place the
sample in memory, then trigger the DMA to move the sample. Or delay
EOC to DMA trigger, to allow ISR time to do the correction.
Or use filter ISR output to use the following ISR -
/* Convert the 2's complement value to an unsigned 8-bit value
* The VDAC expects an unsigned 8-bit value as input.
VDAC8_SetValue(Filter_Read8(Filter_CHANNEL_A) + 128u);
I would like for both if possible, it would make my life easier in the long run, but I could live with just the output being centered around 0. I do not think it is centered around zero by default. When I look at the output of the filter it is definitely offset like the input. Is there something I may be missing?
I like your second idea, although if I'm thinking right, an unsigned value would still be offset. My functions take in signed values so a it wouldn't work anyway (at least I don't think so).
I guess I could flip the msb and I think that would give me a signed (although inverted) input?
scarlson, something is wrong, the output of DFB always had DC offset removed by default. Long ago I asked Tech Support to add (optional) DC offset for direct DMA transfer to DAC, but I would be surprized if they hey did it without a notice.
Thats surely not what I am seeing. Can anyone else confirm this? I am using creator 3.2. I suppose you could easily just filter out the DC offset.. but thats not exactly what I'm looking for and I would obviously lose lots of other valuable data close to 0 as a result.