CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Problem with Digital Pot MCP4017 driving
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ttelmah



Joined: 11 Mar 2010
Posts: 19215

View user's profile Send private message

PostPosted: Mon Nov 01, 2021 7:15 am     Reply with quote

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.
gaugeguy



Joined: 05 Apr 2011
Posts: 288

View user's profile Send private message

PostPosted: Mon Nov 01, 2021 7:35 am     Reply with quote

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
Ttelmah



Joined: 11 Mar 2010
Posts: 19215

View user's profile Send private message

PostPosted: Mon Nov 01, 2021 7:52 am     Reply with quote

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'...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
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