I2C pins as GPIO (ItsyBitsy M4)

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
nickwest
 
Posts: 8
Joined: Tue Dec 06, 2011 10:41 pm

I2C pins as GPIO (ItsyBitsy M4)

Post by nickwest »

Hi, I was hoping to use the I2C pins on the ItsyBitsy M4 as "normal" digital inputs/outputs. According to this thread viewtopic.php?f=62&t=166319, these pins work as GPIO but don't have internal pullups. But according to this thread viewtopic.php?f=62&t=160957, I _can_ use the internal pullups (maybe just not when I'm using these pins in I2C mode?) and the pin numbers when programming for Arduino are 21 for SDA and 22 for SCL.

So I can I please confirm that:
1. I really can just use these pins for simple digitalRead() and digitalWrite() and call them 21 and 22 in my sketches.
2. I really can use input pullups when doing simple digital I/O.

Thank you.

User avatar
adafruit_support_carter
 
Posts: 29170
Joined: Tue Nov 29, 2016 2:45 pm

Re: I2C pins as GPIO (ItsyBitsy M4)

Post by adafruit_support_carter »

1. I really can just use these pins for simple digitalRead() and digitalWrite() and call them 21 and 22 in my sketches.
Yes.
2. I really can use input pullups when doing simple digital I/O.
Yes.

The comments about pullups in the other posts may be referring to external pullups.
https://learn.adafruit.com/introducing- ... -2991171-7
SDA and SCL - these are the I2C hardware interface pins. There's no pull up on this pin by default so when using with I2C, you may need a 2.2K-10K pullup on each to 3.3V.
This comment is referring to external pullups.

User avatar
nickwest
 
Posts: 8
Joined: Tue Dec 06, 2011 10:41 pm

Re: I2C pins as GPIO (ItsyBitsy M4)

Post by nickwest »

That's great, thanks for the confirmation :-)

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”