I2C and internal Pullups

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hi all,

I have a questions regarding I2C. I googled a little bit and I think I already found my answer, but just to be sure I ask here again: I thought that no external pullups for I2C are necessary because every MC have their own internal pullups. The recent years my focus was programming Xilinx FPGAs and there it is common for every pin to have pullups and pulldowns.

By using Dave Apps it seems to me there are no pullups configurable for I2C. Am I right? So far it is not a problem for me, because I have external pullups but I would like to use internal pullups for the next schematic if possible.

Thanks for your replies!
Sebastian
0 Likes
3 Replies
Not applicable
Hi Sebastian,

I don`t know how you can set it in Dave but manually you can read bellow.

You can find in manual(page 2528) register IOCRX. This reg allow you to set pull up/down or open-drain.

For example(Port 2 pin 3):

PORT2->IOCR0 &= ~0xf8000000UL; //clear last mode
PORT2->IOCR0 |= mode << 24; // set new mode


Mode is on page 2531.

Best Regards,
Blackom
0 Likes
chismo
Employee
Employee
First like received
Hello,

I think Sebastian is asking if the internal pull device can be enabled while in open drain output mode.
This is not possible as IOCR only allows the enabling of the pull device in input mode. For the output modes, the pull device is always disabled.

Therefore for I2C where the open drain output mode is used, external pull-ups are still required.

Regards,
Min Wei
0 Likes
Not applicable
Blackom and Min Wei, thank you for your answers.

Min Wei, you are right. This is exactly what I wanted to know. I regret that this is not a supported feature. But ok, I will use external pullups.

Best regards,
Sebastian
0 Likes