Why this PBP code will blink PortB LED's but not the one on PortC?


Results 1 to 11 of 11

Threaded View

  1. #6
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Re: How to replace 18F2550 with function/pin equivalent that still provides I2C?

    OK guys...one more question that I hope you will help me answer. I have been looking for a replacement MCU that has all the functions of the 18F2550 that I have been using except the USB module, and that is pin compatible to the 28 pin version of the 18F2550. The closest I have so far been able to find is the 16F886, which appears to be pin compatible and has all the functions. However, one difference I can't quite resolve:
    1) The 18F2550 in my application is wired on my PCB to use its SDA pin 21 and its SCL pin 22 in an I2C interface to control two peripheral devices.
    2) Since I am looking to replace the 18F2550 on an existing PCB that is already routed that way, I need to confirm I can still use the 16F886 pins 21/22 as SDA/SCL signals to control the I2C devices.
    3) The data sheet on the 16F886 says it supports I2C interface, but requires use of RC3(pin15)/RC4(pin16) as SCL and SCD respectively, which pins I already have routed on my PCB for other functions.

    Somewhere I seem to remember someone on this forum saying that the SCL and SCD pins on MCUs only have to be used in an I2C interface when the MCU is operating as a slave and if it is the Master controller for other devices operating as slaves, that any I/O pins can be used as the outputs for the I2C control bus. Is that true? If so, how do I set up other PortB pins 21/22 as the I2C bus interface to control my peripherals?? Would really appreciate your advice on this!
    Last edited by jellis00; - 24th September 2011 at 00:15.

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