• AVR Freaks

Hot![SOLVED] PIC16LF15345 datasheet SDA/SCL apparent contradiction

Author
danw
Starting Member
  • Total Posts : 47
  • Reward points : 0
  • Joined: 2008/09/03 12:48:47
  • Location: 0
  • Status: offline
2019/06/25 05:00:53 (permalink)
0

[SOLVED] PIC16LF15345 datasheet SDA/SCL apparent contradiction

Hi,  looking at page 9 of the PIC16LF15325/45 datasheet, 20-pin allocation table, it says that RB4 is configurable as SCL and RB6 is configurable as SDA (I2C);  but if you go down to page 196, in the PPS options table, it says that SDA1 is configurable as RB4 and SCL1 is configurable as RB6,  the exact opposite...
I looked at the errata I found on Digikey and it does mention RB4 and RB6 in I2C mode, but only to say that SMB bus voltage levels are not available in that port;  --which, by the way, I have no idea how important that is--, but does not clarify the allocation's seeming contradiction.
T.I.A.
post edited by danw - 2019/06/25 12:22:28
#1

6 Replies Related Threads

    ric
    Super Member
    • Total Posts : 24638
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: PIC16LF15345 datasheet SDA/SCL apparent contradiction 2019/06/25 05:11:21 (permalink)
    0
    You keep saying "is configurable as", when you should be saying "defaults to".
    The functions can be configured to almost any pin, but only observe true I2C/SMBUS voltages if assigned to RB4, RB6, RC0 or RC1.
    As you state, the "default" input assignment on power up is different in the two tables.
    But, who cares? To use it, you have to assign the output function too, so just assign both input and output, then it is totally irrelevant what the power on default is.
    Just assign them yourself, and move on to a real 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
    danw
    Starting Member
    • Total Posts : 47
    • Reward points : 0
    • Joined: 2008/09/03 12:48:47
    • Location: 0
    • Status: offline
    Re: PIC16LF15345 datasheet SDA/SCL apparent contradiction 2019/06/25 05:54:14 (permalink)
    0
    I kept on saying "configurable as" because that's what I thought the datasheet was saying.
    Well, on page 9 it says "These signals may be mapped to output onto one of several PORTx
    pin options";  but trying to find out exactly what those options are, I don't find it easy.
    For example, page 23 says "RB6/ANB6/SDA1(1,4)/SDI1(1)/IOCB6";  there is no mention at
    all of it being configurable as SCL.
    The name of table 15 is "PPS INPUT SIGNAL ROUTING OPTIONS";  no mention of it being a
    table of power-up defaults.
    Microchip products keep getting more and more complicated;  --I had never seen this PPS stuff,
    and I'm having a hard time trying to understand it.  The documentation seems to get more
    inscrutable with every passing year.
    Thanks.
    #3
    ric
    Super Member
    • Total Posts : 24638
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: PIC16LF15345 datasheet SDA/SCL apparent contradiction 2019/06/25 06:18:14 (permalink)
    +1 (1)
    Read the PPS chapter from start to end.
    It is an extremely powerful new feature, so naturally requires some study to understand.
    You can connect almost any function to any pin.
    Table 15-2 is saying that (in this PIC) there are NO restrictions on where you can connect the signals. There is a dot in every box in the three right hand columns.
    The third column just tells you the "Default Location at POR". (POR = Power On Reset)
     
    PPS often has default INPUT assignment. It does NOT have default OUTPUT assignments.

    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
    ric
    Super Member
    • Total Posts : 24638
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: PIC16LF15345 datasheet SDA/SCL apparent contradiction 2019/06/25 06:18:15 (permalink)
    0
    ---- removed double post
    post edited by ric - 2019/06/25 12:59:26

    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!
    #5
    mbrowning
    USNA79
    • Total Posts : 1565
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: offline
    Re: PIC16LF15345 datasheet SDA/SCL apparent contradiction 2019/06/25 06:26:11 (permalink)
    +1 (1)
    danw
    Well, on page 9 it says "These signals may be mapped to output onto one of several PORTx
    pin options";  but trying to find out exactly what those options are, I don't find it easy.

    Inputs are mapped by signal register - SSP1CLKPPS = 0x0e maps RB6 as input pin for SCK. (tables 15-2 and 15-3)
    Outputs are mapped by pin register - RB4PPS = 0x16 maps RB4 as output pin for SDA (table 15-5)
    danw
    For example, page 23 says "RB6/ANB6/SDA1(1,4)/SDI1(1)/IOCB6";  there is no mention at
    all of it being configurable as SCL.

    except for notes 1, 2, and 4.
    danw
    The name of table 15 is "PPS INPUT SIGNAL ROUTING OPTIONS";  no mention of it being a
    table of power-up defaults.

    Except for the columns "Default Location at POR" and "Reset Value".
    There are not defaults for output, only inputs. I don't rely on such defaults and always fully specify any PPS assignments.
    PPS assignments can be locked (section 15.4/15.5) but I believe default to unlocked. I always unlock then lock after setup. If PPS1WAY configuration bit is enabled, PPS can't be unlocked after being locked (until reset).
     

    Go Navy! Beat Army!
    #6
    danw
    Starting Member
    • Total Posts : 47
    • Reward points : 0
    • Joined: 2008/09/03 12:48:47
    • Location: 0
    • Status: offline
    Re: PIC16LF15345 datasheet SDA/SCL apparent contradiction 2019/06/25 12:21:39 (permalink)
    0
    Thanks gentlemen,  this is actually starting to make sense now ;-)
     
    #7
    Jump to:
    © 2019 APG vNext Commercial Version 4.5