I'm porting some stuff currently reading an analog accelerometer and gyro using arduino libs on an avr 328P. The bulk of time in my processing loop is calls to analogRead.
I timed a single call of analogRead(A0) on 3 boards, (nothing attached to pin) here are the results:
bare bones board (328p) 116us
chipkit uno32 6us
teensy 3.0 398us
Any examples for using the ADC options available on the arm m4 to do a faster analogRead would be much appreciated. Of course adding the extra functionality to the teensy3.0 analog.c library would be great.
I timed a single call of analogRead(A0) on 3 boards, (nothing attached to pin) here are the results:
bare bones board (328p) 116us
chipkit uno32 6us
teensy 3.0 398us
Any examples for using the ADC options available on the arm m4 to do a faster analogRead would be much appreciated. Of course adding the extra functionality to the teensy3.0 analog.c library would be great.