Choosing the right chip for timing resolution, SPI and SSI
2009-08-27 by Cat C
Hi there, I am in a bit of a dilemma here, trying to choose the right chip for an application. One requirement is that I need to be able to generate some microsecond (let's say between 1 - 100us) length pulses, the timing between them about the same... kind of like this: - a 40us pulse on one output - a pause of 2 us - a pulse of 2s on another output The good thing is that the uC doesn't need to do anything else in the mean time. One problem is that the us timing needs to be ideally 25ns resolution and that pushed me towards the dsPIC33 family, but I'd rather try to stick with what I am more familiar with (AVR) so 50ns resolution might be acceptable which makes me think that using a 20MHz ATMega (644p) might be enough. Hoping here that I could move to the XMega for slightly higher resolution if needed, but my Dragon might not work there. My plan is to setup some timer/counter to generate an INT after the first interval, which ISR would set up the nex one and so on. I think that would work because the minimum period is not lower than 2us so that should give me 40 clocks for whatever I need to do inside the ISR to setup for the next one... that's tight but I hope do-able. Any thoughts on this, before we get to the SPI, please? Regarding the SPI, I need to talk to an AD9874 and it's implementation... looks a bit different, so the question is: is it do-able? I prefer to not have to bit-bang. Regarding the SSI, it's again about the AD987, reading data from it. My plan is to use a USART for this, but I've never done synchronous with a framing line... should that work if properly setting up the USART? So finally, is there anything wrong with my plans? :-) I'd prefer to stick with the AVR because I have the tools and it's pretty easy to prototype with, but if needed I think the dsPIC33FJ128GP802 might do better... however I'm worried about the learning curve... Does anybody here swing both ways and can give some input? Thanks, Cat [Non-text portions of this message have been removed]