Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I am planning to use PIC18F26K83 and communicate with a smart battery that uses SMBus ver 1.1. So from the datasheet of PIC it says I need to choose appropriate input threshhold for SMBus from RxyI2C register. Bit 0 and 1 are being used for choosing that threshold but there is no information for SMBus ver 1.1 (See below.).

TH<1:0>: I2C Input Threshold Selection bits

11 = SMBus 3.0 (1.35 V) input threshold

10 = SMBus 2.0 (2.1 V) input threshold

01 = I2C specific input thresholds

00 = Standard GPIO Input pull-up, enabled via INLVLxy registers

And over the internet I couldn't find input threshold for SMBus v1.1. So my question is:

What is the input threshold voltage for SMBus v1.1? Or how should I set related bits in order to use SMBus v1.1 from RxyI2C register?

Yes, I hesitated before commenting - it’s a shame we don’t have en embedded StackExchange for questions like this with a mix of electronics and programming. Paul R Mar 26, 2019 at 9:16

The datasheet of the IC PIC18F26K83 . States that the IC supports SMBus v2.0 and v3.0. Comparing SMBus v2.0 and v1.1, there are some differences regarding voltage's, but the electrical differences on SMBus v1.1 and v2.0 should be close enough to work together. As for backwardscompatibility, pay attention to the pull-up resistance for SMBus v1.1. Recommended Pull-up restitance of SMBus v2.0 is close to standard I2C and will therefore not work on SMBus v1.1.

Using the Microcontroller in configuration for SMBus 2.0 with pull-up resistance compatible with SMBus v1.1 should therefore work fine.

Following you have Link's to the documentation I've used to implement SMBus v1.1.

Smart batteryData

SMBus datasheet for each version of SMBus

ReadThis <- Implementing the SMBus Interface

Thank you, yes I use RB1I2C = 0x02; which is 2.1 V input threshold. I also use SMBus v1.1, do you think 20 K pull up resistors fine for it? Günkut Ağabeyoğlu Apr 8, 2019 at 7:50 My experience regarding SMBus has proven that the different batteries on SMBus v1.1 have different tolerances. Most host's (Master devices) can work fine in a much broader span of both high-state and lov-state voltages. So my best recommendation is to use two potentiometers to start off at 12-20k ohm. 20k ohm can work fine, but fine tuning the resistance will likely provide better performance. "15k might be enough". (Also, keep in mind that ~50cm is maximum distance from master->slave device) H.N Apr 8, 2019 at 7:57 but in that case I wouldn't get any data in receive buffer right? Or I would not get an ACK for my transmission. Günkut Ağabeyoğlu Apr 8, 2019 at 8:09 well. This is where SMBus can be tricky. Wrong pull-up will mean you don't get an ACK'nowledge from the battery. Or worse your message to the battery won't be correct. Either the battery wont see the message at all, or worse.. With data Corruption returning wrong data. If you haven't worked with i2c and/or SMBus before I strongly recommend you to read up on "SmartBatteryDataSpesification". aswell as System Management Bus spesification and "ReadThis" (Bren-Tronics "Implementing the SMBus interface".) I work with multiple "BB-2590/u" batteries. "70791BK, at the moment". H.N Apr 8, 2019 at 8:25

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .