16F1847 Usart and I2C


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343

    Default Re: 16F1847 Usart and I2C

    Seahound,
    Take a look at the table (Table 1) on page 4 of the datasheet.
    From what I can see, you can move the RX pin for the USART from RB1 to RB2. The SDA1 for I2C can not be moved, and is on RB1. SCL1 for I2C is on RB4. And TX fro the USART can be moved between RB2 and RB5. So here is how it should fall out:
    I2C:
    RB1 SDA1
    RB4 SCL1
    USART
    RB2 RX
    RB5 TX

    So the APFCONx registers should be
    APFCON0 = %10000000
    APFCON1 = %00000001
    and the pin assignments:
    DPIN var portb.1 ' I2C data pin
    CPIN var Portb.4 ' I2C clock pin

    HTH
    Last edited by SteveB; - 17th December 2012 at 21:11.

Similar Threads

  1. Interfacing with Arduino I2C LCD
    By norohs in forum Documentation
    Replies: 47
    Last Post: - 30th May 2017, 18:53
  2. Problem with PICto PIC I2C MASTER-SLAVE
    By juanen19 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th June 2013, 02:58
  3. Strange I2C and serial behaviour.......
    By jimbostlawrence in forum General
    Replies: 4
    Last Post: - 30th October 2012, 01:02
  4. USART to PC
    By tonyfelloni in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th October 2008, 00:09
  5. Usart
    By lew247 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 2nd June 2008, 23:41

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