![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
Ttelmah
Joined: 11 Mar 2010 Posts: 19658
|
|
Posted: Mon Nov 01, 2021 7:15 am |
|
|
PICmodule wrote: | In the i2c in theory we do not need to care about that. This is because we have open drain I/O ins SDA and SCL, and that is the reason we are using pull up resistors that must be pulled up to "other side" interface voltage. This what I
done. But this is theory, in practice not :-)
BR |
Very much 'no'.
I2C, cares about the high level voltage, just as much (in fact in many case
'more'), than any other interface.
You cannot mix 3.3v and 5v I2C busses without level shifting.
You can do it by using pins on the PIC that support TTL input levels, and
software I2C. This then sees 3.3v, as a reliable 'high' level. |
|
![](templates/subSilver/images/spacer.gif) |
gaugeguy
Joined: 05 Apr 2011 Posts: 318
|
|
Posted: Mon Nov 01, 2021 7:35 am |
|
|
From MCP4017 data sheet:
Quote: | Schmitt Trigger
High Input
Threshold
VIH 0.7 VDD — — V 1.8V ≤ VDD ≤ 5.5V |
5.0 * .7 = 3.5V
5V5 : 5.5 * .7 = 3.85V
Most I/O pins on the PIC will not allow the pin to be pulled up past its VDD |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19658
|
|
Posted: Mon Nov 01, 2021 7:52 am |
|
|
That is where the '5v tolerant' inputs come in. If you have
these the bus can be made to work (using pull ups to 5v).
RB5, 6, 7, 8, 10 & 11. RC6, 7 8 & 9.
Not the pins he was trying to use.
Reading the data sheet and understanding the implications of voltages
needed at both end of the bus is 'critical'... |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|