G
G
Gigasetnet2019-08-20 15:15:50
Microcontrollers
Gigasetnet, 2019-08-20 15:15:50

How to capture data from multiple analog pins quickly and accurately?

STM32F0 controller.
device - electronic drums.
There are several piezo sensors from which you need to take readings with as high a resolution as possible.
at present, the controller refuses to catch intermediate values ​​​​of piezo sensors readings (the controller understands only the maximum, sometimes the average and the smallest) and as a result, the output is a maximum of three "velocity" values ​​- the force of impact on the sensor (the sensor is in good condition and has the property to give out the entire range of velocity in microcontroller) there are also other discrepancies with the desired one)))
the code was copied from a similar device, but on buttons and converted to piezo sensors without experience and at random and is currently unavailable.
tell me the key points for the implementation of fast, accurate, simultaneous signal pickup from several pins from the STM32F0 ADC

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lorc, 2019-08-20
@Gigasetnet

STM32F0 has DMA for ADC. Accordingly, all you need is to properly configure this bundle and run ADC in continuous mode. ADC will take measurements as quickly as possible, and DMA will add these measurements to memory. It may turn out that it will even be too fast for you, because ADC in 12-bit mode can output data with a frequency up to megahertz.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question