• AVR Freaks

PIC16F19197, SMBus pin output issue

Author
Mildly Clueless
New Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2019/06/05 23:27:10
  • Location: 0
  • Status: offline
2019/07/09 04:01:01 (permalink)
0

PIC16F19197, SMBus pin output issue

I am using the PIC16F19197 on a project that needs to communicate to to a sMBus (ti bq40z50 to be precise). This is a second generation board and we are having a communication breakdown. Logic analyzer shows clearly the problem is low voltage. The BQ chip talks well with the associated setup software at 3.5V or even our gen 1 board at about 3. 3V.
Unfortunately we are currently only getting about 2. 3V out of Pins 32 and 33. Which are the same pins we used before.
The circuit design is quite simple with only a 47 ohm resistors between the chips.
I have tried to find in the manual how the output voltage is set. The basics I have covered.
- GPIO output
- NOT open drain
- no pull up resistors
- analog left unchecked
All set to what I would expect and previous.
I am wondering if other changes on MCU are affecting the voltage reference and thus the pin output.
Pardon for not posting the code but I am away from my desk.
Any feedback on where to look for clues would much appreciated.
#1

12 Replies Related Threads

    ric
    Super Member
    • Total Posts : 22652
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: PIC16F19197, SMBus pin output issue 2019/07/09 04:03:29 (permalink)
    +1 (1)
    SMBUS is basically I2C, which uses open drain drivers with pullup resistors.
    If the voltage is low, it's the pullup resistors, not the chip output causing the problem.

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    Mildly Clueless
    New Member
    • Total Posts : 16
    • Reward points : 0
    • Joined: 2019/06/05 23:27:10
    • Location: 0
    • Status: offline
    Re: PIC16F19197, SMBus pin output issue 2019/07/09 04:24:06 (permalink)
    0
    Interesting.
    This sounds like an issue. I used MCC for the initial setup but indicating it was for SMbus on MISS I believe, and it appears to have gone non-IC with no pull up.
    I will search engine the issue and check. Would it be advisable to simply click OC and WOULD, while leaving analog unchecked?
    #3
    ric
    Super Member
    • Total Posts : 22652
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: PIC16F19197, SMBus pin output issue 2019/07/09 04:30:59 (permalink)
    0
    but do you actually have physical pullup resistors?
    That is NOT a software option.

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #4
    Mildly Clueless
    New Member
    • Total Posts : 16
    • Reward points : 0
    • Joined: 2019/06/05 23:27:10
    • Location: 0
    • Status: offline
    Re: PIC16F19197, SMBus pin output issue 2019/07/09 04:54:57 (permalink)
    0
    We followed the TI reference design and it only shows 100 ohm resistors between the pins, with a couple of small capacitors for EMI filtering. Is there a microchip reference design for SMBus?
    #5
    ric
    Super Member
    • Total Posts : 22652
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: PIC16F19197, SMBus pin output issue 2019/07/09 05:07:52 (permalink)
    0
    What reference design are you referring to specifically? Do you have a link?
    Pullup resistors are a requirement of every I2C/SMBUS system.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #6
    NKurzman
    A Guy on the Net
    • Total Posts : 17485
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: PIC16F19197, SMBus pin output issue 2019/07/09 05:40:38 (permalink)
    0
    What does the first generation board have? I assume those work.
    #7
    Mildly Clueless
    New Member
    • Total Posts : 16
    • Reward points : 0
    • Joined: 2019/06/05 23:27:10
    • Location: 0
    • Status: offline
    Re: PIC16F19197, SMBus pin output issue 2019/07/09 05:58:50 (permalink)
    0

    Posting images was a bit trickier than I expected.
    #8
    Mildly Clueless
    New Member
    • Total Posts : 16
    • Reward points : 0
    • Joined: 2019/06/05 23:27:10
    • Location: 0
    • Status: offline
    Re: PIC16F19197, SMBus pin output issue 2019/07/09 06:02:35 (permalink)
    0
    As for last time it was the same.  That engineer has a habit of changing components and then forgetting to update the documentation, but I believe it was the same 100 ohm resistors.
     
    #9
    Mildly Clueless
    New Member
    • Total Posts : 16
    • Reward points : 0
    • Joined: 2019/06/05 23:27:10
    • Location: 0
    • Status: offline
    Re: PIC16F19197, SMBus pin output issue 2019/07/09 06:08:41 (permalink)
    0

    It would seem that something along these lines is what you would expect.
    #10
    ric
    Super Member
    • Total Posts : 22652
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: PIC16F19197, SMBus pin output issue 2019/07/09 06:23:16 (permalink)
    0
    The diagram in post#9 is just from the bq datasheet, and does not show an entire system, just what is inside the battery. Plainly it assumes external resistors.
    Yes, I would expect about 4k7 pullups on both SDA and SCL.
    If your first design didn't have them, it was dumb luck that let it work.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #11
    NKurzman
    A Guy on the Net
    • Total Posts : 17485
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: PIC16F19197, SMBus pin output issue 2019/07/09 06:45:54 (permalink)
    0
    The battery would not have pull-ups. Only The host system has them.
    post edited by NKurzman - 2019/07/12 15:55:05
    #12
    Equinoxin
    New Users
    • Total Posts : 47
    • Reward points : 0
    • Status: offline
    Re: PIC16F19197, SMBus pin output issue 2019/07/12 14:20:54 (permalink)
    0
    External pull-up resistors are necessary for correct communications. For calculating the correct pull up values, please read  chapter  9. External Pull-up Resistor Selection in the tech brief : http://ww1.microchip.com/downloads/en/AppNotes/I2C-Master-Mode-30003191A.pdf
     
     
    #13
    Jump to:
    © 2019 APG vNext Commercial Version 4.5