• AVR Freaks

I2C code migration from PIC16F1503 to PIC16F1508

Author
razmicgee
New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2014/12/18 11:42:08
  • Location: 0
  • Status: offline
2015/03/13 10:48:12 (permalink)
0

I2C code migration from PIC16F1503 to PIC16F1508

My I2C code works on PIC16F1503 in MASTER mode. I have a new design where simultaneous 4 PWM outputs and I2C communication is desired. Hence, I ported the code from the PIC16F1503 to the new controller, PIC16F1508.
The I2C pins are changing between the two controllers, other than that I can not find anything else. However, I can not get to output I2C on the new PIC16F1508.  I use the internal oscillator (16MHz), in MASTER mode and 7 bit addressing.
Any ideas where else I should look at?
 
Thanks
David
#1

4 Replies Related Threads

    DavidBLit
    Super Member
    • Total Posts : 1574
    • Reward points : 0
    • Joined: 2012/02/18 13:08:48
    • Location: The Land of Confusion
    • Status: offline
    Re: I2C code migration from PIC16F1503 to PIC16F1508 2015/03/13 11:29:57 (permalink)
    +2 (2)
    ANSELB?
    #2
    ric
    Super Member
    • Total Posts : 22677
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: I2C code migration from PIC16F1503 to PIC16F1508 2015/03/13 15:35:41 (permalink)
    +2 (1)
    DavidBLit
    ANSELB?


    +1

    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!
    #3
    razmicgee
    New Member
    • Total Posts : 5
    • Reward points : 0
    • Joined: 2014/12/18 11:42:08
    • Location: 0
    • Status: offline
    Re: I2C code migration from PIC16F1503 to PIC16F1508 2015/03/16 10:04:42 (permalink)
    0
    ANSELB =0; did the job. How can I miss this?
    Thank you.
    David
     
    #4
    DavidBLit
    Super Member
    • Total Posts : 1574
    • Reward points : 0
    • Joined: 2012/02/18 13:08:48
    • Location: The Land of Confusion
    • Status: offline
    Re: I2C code migration from PIC16F1503 to PIC16F1508 2015/03/16 10:53:42 (permalink)
    0
    Certainly.  It's an extremely common oversight that we all trip over from time to time, even those who have been working with these devices for years.
    #5
    Jump to:
    © 2019 APG vNext Commercial Version 4.5