Skip to content
Discussion options

You must be logged in to vote

The ADC unit can be owned by either DMA or the CPU, not both. Doing analogReads while the DMA is set up is going to produce some very "interesting" results, none of which will be correct...

When you use ADCInput it goes to DMA control and is set up with a HW timer that automatically samples the channels set in the bitmask w/o any intervention, stuffing their values in a FIFO for DMA to deposit to RAM.

So, if you want to use another ADC input while doing ADCInput you'll just have to add that extra pin and use the ADCInput stream to look at it (i.e. 1st read() would be the mike, 2nd read() would be the pot, 3rd read() would be the mike, 4th read() the pot, etc.).

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@baritonomarchetto
Comment options

@earlephilhower
Comment options

Answer selected by baritonomarchetto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants