Is it possible to use the I2C pins on a FEZ Mini for other things if you aren't using them for I2C?

I have a FEZ Mini and am using all the pins on the right side and both serial on the left, the only pins i have remaining are one analog in and the I2C. Can I use the I2C pins as digitals? I need to light an LED when something happens in the code but those are the only pins I have left. Anybody have something that they have tried?

Don’t think so. They have pull-up resistors built-in. Of course, if you really need to light up that LED you could make it an I2C slave :wink:

They are general digital IO pins, so you can reuse them how you like. You do need to take into account that they have pull up resistors fitted.

ok, so how would I wire it if I know that it has a pull up resistor? Is is possible to disable that resistor? I feel like I have seen something to turn the pull-up resistors off would that be a possible solution?

All you can do is sink your LED through the pin. In otherwords, connect the cathode end to the pin and bring it low when you want to light it.

and I wont need a resistor on the LED since it already has one as the pullup?

You should still use a resistor on your LED. The pullup will be bypassed when you bring low.

You can connect a led directly between GND and the I2C pin. No resistor. But only on the I2C pins!

If you set the pin low then the pin will pull low and the led will be off. If you set the pin high then the pin will release and the resistor will pull the pin high, lighing the led while limiting the current…

1 Like

ok now im confused, it seems like you guys are saying 2 different things, am I wiring the LED to GND and the I2C pin or 5+ and the I2C pin? do i use a resistor or not?

Sorry, listen to GMod. You can get by without it.

actually I think you are saying the same thing just using different values of the pin to light the LED. GMod I think has a slightly better way since it is using the internal pull up resistor to act as the resistance on the LED since he is wiring to the other LED pin GND. Both should work, but Gmod uses extra less parts.

Agreed. He’s the pro :wink:

Not at all…