Hello Industruino users,
I would like to make high speed acquisition of analog sensors (20 kHz). I dug on the web some information about the clock frequency of the ADC that could be change thanks to the bits ADPS0, ADPS1 and ADPS2 (prescaler) of the ADCSRA register on Atmega 2560. The CTRLB register has the same features for the SAMD21G. The problem is that I cannot access the PRESCALER0, PRESCALER1 and PRESCALER2 bits of the CTRLB register (error: 'CTRLB' was not declared in this scope). So my question is : how can I access this register and change the prescale bits ? Does anyone already performed high frequency acquisitions with the Industruino ?
Thnaks for the help
In fact the problem is due to the analogRead which takes a lot of time: 5 ms. How is this possible ? Registers manipulations do not seem to work, how can I speed that up ? Thanks for your reply. This is an important matter, I'm stuck here with this issue. I tried with a basic arduino Uno and analogRead can be reduced to 50 µs with registers manipulations. This is quite a gap between the Industruino ADC and the Uno ADC...
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!