Hi. I'm working in a graduate school for a project. I just do ADC and write it at SD card memory with teensy 3.6 board. And, there is something i must consider. There is part of few step in our program.
First, I open the file as write mode.
Then, it write a data on the SD Card about 50000 material (measure and write time interval is 1/ 50000sec for 1sec) and re-open the file as read mode and read it for 1 sec(if i divide 1 sec with 50000, i read a txt file in SD Card and calculate with ADC data and txt file data in the same timing. 1/50000 sec ADC data subtract with 1/50000sec read data from txt file). And, analogwrite it at pin. (PWM).
I think there is some time delay(eg. propagation delay or something). How can i deal with time delay? and it is possible to making 2nd step of our program? (read data and subtract it at same moment ADC data.)
First, I open the file as write mode.
Then, it write a data on the SD Card about 50000 material (measure and write time interval is 1/ 50000sec for 1sec) and re-open the file as read mode and read it for 1 sec(if i divide 1 sec with 50000, i read a txt file in SD Card and calculate with ADC data and txt file data in the same timing. 1/50000 sec ADC data subtract with 1/50000sec read data from txt file). And, analogwrite it at pin. (PWM).
I think there is some time delay(eg. propagation delay or something). How can i deal with time delay? and it is possible to making 2nd step of our program? (read data and subtract it at same moment ADC data.)