16f887 to 18f4685 transition


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: 16f887 to 18f4685 transition

    Poking around the datasheet a bit I notice that the setting for TRISC.6 is opposite for the 18F4685 compared to the 18F4550. I do not have an 18F4685 so I can not test.

    I wonder if PBP is setting these correctly, not often but sometimes things are over looked, but this chip has been around for awhile....

    Anyways, it can not hut to set this manually in your code.
    From the datasheet, section 18:
    The pins of the Enhanced USART are multiplexed
    with PORTC. In order to configure RC6/TX/CK and
    RC7/RX/DT as an EUSART:
    • bit SPEN (RCSTA<7>) must be set (= 1)
    • bit TRISC<7> must be set (= 1)
    • bit TRISC<6> must be cleared (= 0) for
    Asynchronous and Synchronous Master modes,
    or set (= 1) for Synchronous Slave mode
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Dec 2010
    Posts
    48


    Did you find this post helpful? Yes | No

    Default Re: 16f887 to 18f4685 transition

    Good eye. I'll try that and get back to you later.

  3. #3
    Join Date
    Dec 2010
    Posts
    48


    Did you find this post helpful? Yes | No

    Default Re: 16f887 to 18f4685 transition

    I added this to my code but yet again nothing has happened. I also have tried it without TXSTA and BAUDCON.

    Code:
    TXSTA = %10100000
    RCSTA = %10110000
    BAUDCON = %10000010
    trisc.6 = 0
    trisc.7 = 1

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