If there will be plenty of time for everything else, I'd like to slow down the A/D clock, because the LEM current transducer has pretty poor resolution for its output. For example, on the LEM 300, a current from 0 to 300 amps corresponds to an output of 2.5v to 2.5v + 0.625v. All the smooth driving is based on current being proportional to throttle position. If I get 32 possible values for outputs in the range 0 to 300 amps... Wait! That's when the circular buffer probably comes in handy. I get a much larger range of currents that way. Maybe I could do 500 kHz sample rate if there's time. (A/D prescaler of 32 instead of 16)
P.S.: Sorry about the nonstandard way of setting A/D channel for conversion. It's sort of like I was on a desert island, and was just programming as if there were no standards at all, just reading the ridiculous 308 page documentation and making stuff up as I went.
|