View Single Post
Old 01-15-2009, 03:52 PM   #204 (permalink)
MPaulHolmes's Avatar
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,119 Times in 734 Posts
Originally Posted by MazdaMatt View Post
Are you using an RTOS (i'm guessing not) or a tick timer make decisions, or just full-speed main looping it?
I'm just using a full-speed main loop. No operating system. Each A/D conversion takes about 0.25 microseconds. The main loop is basically 4 if..thens, 2 sums, 1 shift, a bitwise and, a bitwise or, and a loop of less than or equal to 8 iterations (normally 1 or 2 iterations) which has an A/D conversion, 2 if..thens, a shift, and an addition. All are 8 bit operations.

Each instruction takes about 0.125 microseconds. I need to do a real time measurement, though.
kits and boards

Last edited by MPaulHolmes; 01-15-2009 at 04:10 PM..
  Reply With Quote