ADC Resolution for single PINs

Status
Not open for further replies.

jacko91

Active member
Good day,

in all examples the analogReadResolution() is called in the setup() and chaning the Resolution for all ADC Pins. Is there a way to only change Resolution for specific pins? The same for the analogReadAveraging().?


Thanks
 
Yes and no. Most Teensys have 2 internal ADCs and the different analog pins are multiplexed each to one of these. Some pins can only be routed to one specific ADC, for others, the MUX is more flexible.
That means that you can basically have 2 different resolutions and 2 corresponding average settings. But not with the simplified Arduino compatible functions. You‘d either have to write the MUX and ADC registers directly or you use the adc library which comes with the Teensyduino installation.
 
Status
Not open for further replies.
Back
Top