The ATmega32M1 has a current source peripheral that can output a constant 100uA current from its ISRC pin. It also has a dedicated ADC channel for reading the voltage at the ISRC pin.
I was looking into hooking up the ISRC output to a potentiometer, and then using the ADC to read the position of the pot. I was planning on using a 47K pot, getting me a max voltage of 4.7V. However, the thought occurred that of course following V=IR, if a resistive load greater than 50K is attached to the ISRC pin, can the voltage at the pin go higher than 5V?
I'm guessing... probably not? Because the supply for the current source is AVCC, which like the supply to the entire chip, is no more than 5V?
There's little detail in the ATmega32M1 datasheet regarding this, save for the following snippet:
To protect the device against big value [resistors], the ADC must be configured with AVCC as internal reference to perform the first measurement. Afterwards, another internal reference can be chosen according to the previous measured value to refine the result.
I'm not sure what exactly they mean by "protect the device"?
If the current source's pin voltage is incapable of going above AVCC, why would they say that? To my knowledge, it's fine for an input voltage to an AVR's ADC to be > AREF, so long as it is <= VCC. On the other hand, if it
can exceed AVCC, how is changing the AREF going to protect anything?
Adding further confusion, later in the ISRC section (where they give an example of using an external resistor to set a LIN bus address according to the ADC reading) there is a table giving typical voltages for various external resistor values with this note following it:
Note: 5V range: Max. Rload 30K?. 3V range: Max. Rload 15K?.
Why would they say max 30K? That's only 3V input to the ADC...
So I don't know if I what I plan to do is okay or not, or if I need to protect the ISRC ADC input from excess resistance/voltages or not. If I did need to, I suppose a diode would do? Either a schottky to VCC, or a 5.1V zener to ground?