11 years, 1 month ago.

problem in reading from ADC and printing to file

Hi, I am reading from pin 20 and then storing the read value into a file! This is being done in an ISR. The interrupt is generated every 1ms. The time taken for ISR is less than 1ms its coming around 65 micro seconds. After every write I am changing the pin10 state. (Thats how I measured the time taken for ISR routine to execute)

Problem: I expect it to record continously! However the adc read and file write is not happening uniformly. After every x ADC reads and file writes (where x is near 20) the pin 10 stays fixed for nearly 10ms and then again resumes. this pattern is repeating instead of normal uniform adc sampling and writing to file!

The link to access code is http://mbed.org/users/manants/code/adc_dac_rx_mar19/ Regards, Manas

source code? (copy it here with <<code>>)

posted by David Golz 19 Mar 2013
Be the first to answer this question.