Can analog input pins be set to digital pins using pinMode or other means?

Status
Not open for further replies.

bringfire

Active member
Quick question:

Can analog input pins be set to digital pins using pinMode or other means? Either as digital input or output...

Don't have my Teensy 3.2 with me to test this, just curious...


Thanks,
Aaron
 
You can use analog pins A0..A9 and A15-A20 (on pads underneath the Teensy 3.2) as digital pins using pinMode on the Teensy 3.2. You cannot use pins A10-A14 as digitial pins (A10-A11 are on the inside row of pins, A12-A13 are on the underneath pads, and A14 is on the back row). Basically if you look at the pinout card, and it has a digital pin number in gray, it can be used in a digital context. On the Teensy 3.1/3.2, the digital pins are 5v tolerant, but the analog only pins are not 5v tolerant.

On the LC, A10-A12 can be used as digital pins (the LC does not have pads underneath for more pins, and the pin that is A14 in the Teensy 3.1/3.2 is A12 in the LC). On the LC, no pin is 5v tolerant. There is a special pin (A3 or 17) that is level shifted to 5v for an output pin, but you can't attach a 5v source to it.

If you still have the original Teensy 3.0, it did not have analog inputs A14-A20 (those pads were just digital inputs), and the 3.0 was not 5v tolerant.
 
Status
Not open for further replies.
Back
Top