Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: D/A noise

2006-01-20 by Magnus Lundin

Hi

Another way to remove jitter is to read the timer in the interrupt 
routine and loop on this until a predefined value, the number of 
clock ticks when there is maximal latency at this point in the
interrupt routine, has passed since the timer rollover.  
This can be done just before outputing the samples or at the beginning.

This uses the interrupt to place the clock at almost the right time
and the a wait loop on the timer counter for precise adjustment.

Magnus

--- In lpc2000@yahoogroups.com, "brendanmurphy37"
<brendan.murphy@i...> wrote:
> To get rid of jitter, you should code your o/p interrupt so that the 
> code from the start of the interrupt through to where the sample is 
> o/p has no "if" statements or similar (i.e. it must execute the same 
> number of instructions for each interrupt). You then have to try and 
> ensure that the program being interrupted is always on an instruction 
> that takes the same number of cycles to execute. One way of doing 
> this is to set up a timer interrupt to happen just before the o/p 
> time. We use this approach, and jump to a (lot of "nops"). Karrl's 
> suggestion (go to idle mode) is probably better than this, as it 
> saves code space). The "real" interrupt can then be used to knock you 
> out of this to o/p the sample. This will not remove jitter entireley, 
> but it makes a significant difference.
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.