I2C Pins Assignment


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Posts
    67

    Default I2C Pins Assignment

    Hi,

    Do you have to use the assigned ports on a PIC to I2C ie SCLK and SDAT or can you define them ?

    Peter
    Pete

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    If you play with the PIC internal MSSP, you have to use the default pins... same for PWM and USART.

    If you use I2CREAD/I2CWRITE, you can use almost any i/o as it's a software solution. Like SERIN/SEROUT against HSERIN/HSEROUT
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    Really? I assumed that if you were using I2CRead/I2CWrite you had to use the pins in the datasheet, much like HSERIN/HSEROUT.

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    IMHO the H mean that a PIC Hardware module is used
    Hserout ---> Serout
    Hpwm ---> PWM

    If one day Melabs decide to do something that use the internal MMSP, they will probably call it HI2CREAD, HI2CWRITE, HSPIREAD...

    Another point, if I2CREAD/I2CWRITE had used the internal MSSP, it will'nt give you the choice to specify the SDA and SCL pins... same for Serout, .. ,..

    I2CREAD/I2CWRITE allow to create as much I2C Bus as you have capable I/O on your PIC. That's a good point when you need it. Sure slower than what the MSSP can provide but if it's just for some simple EEPROM, DAC, ADC, I/O expander... it's fast enough in most case.
    Last edited by mister_e; - 3rd June 2006 at 21:57.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    Hmm interesting. I guess I really never thought it through. Well this will help me a little when commiting the design to a board.

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  3. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  4. Please help with i2cslave i2c slave
    By cycle_girl in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st December 2005, 13:55
  5. I2C Effects on other PortA pins
    By kenmac in forum General
    Replies: 2
    Last Post: - 11th July 2005, 05:36

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts