> In something realtime like this you just need to count cycles and make > sure there won't be any surprises Agreed. If some temporary jitter is acceptable then a DDS like you describe would be fine and time spent in the ISR could be minimised. With multiple interrupts or mainline code demanding attention then a more complex isochronous approach might be necessary to avoid excessive jitter. So, again, it comes back to time management and a clear idea of what needs to be accomplished in the ISR, what needs to be accomplished in the mainline code, how those two could affect each other and so on Which way Cristiano does it depends very much on what his specs and expectations are wbr -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist