16F877A to 16F887 Migration


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Location
    Lancashire
    Posts
    50

    Default 16F877A to 16F887 Migration

    Hi All

    I`m sure I`ve missed something here, What do i need to set up on an 887 thats different to a 877A?. I`ve set ADCON1=7 but I have a feeling there is something else I need to set for the B port for that to also be digital?. Are there any other registers I`ve missed, there seem to be an awful lot on this chip

    Cheers Pete

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    ADCON1=7 has no affect on the 887's analog pins.

    And for PORTB to be digital, you need to disable the analog functions on those pins.

    16F887 Datasheet
    http://ww1.microchip.com/downloads/e...Doc/41291E.pdf

    Look for ANSELH.
    <br>
    DT

  3. #3
    Join Date
    Jul 2003
    Location
    Lancashire
    Posts
    50


    Did you find this post helpful? Yes | No

    Default

    Hi Darrel

    I had a feeling it was something simple. I had put in ANSEL = 0 for the A port but quite missed the fact that the B port also comes up in Analog too, ANSELH = 0 seems to have cured it as it was the RTC on port b that was causing the problem, many thanks!. Assuming you have had some experience on this chip do you happen to know if the internal osc on its default 8MHz is stable enough for 9600 serial transmission?

    Cheers Pete
    Last edited by enigma; - 10th May 2008 at 22:30. Reason: Missed a line out

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    The 8mhz internal oscillators are better than the older 4mhz ones, usually they are +/-1%.
    At room temperature they work great for serial rates even higher than 9600.

    But, if there are large temperature swings involved, it can go up to +/-2.5% which is too high for reliable serial comms.
    <br>
    DT

Similar Threads

  1. Problem driving lcd from PIckit2 and 16F887
    By Davidmarks in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 31st January 2010, 18:28
  2. 16f887 and hserin/out
    By Dennis in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 19th December 2009, 23:44
  3. help my bluetooth and PIC 16F877A?
    By slimpeng in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th March 2008, 06:52
  4. Clock connection to DS1802 from 16F877A
    By coyotegd in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd January 2006, 18:52
  5. 1st 16F877A program in PICBasic
    By Borisw37 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th January 2005, 04:46

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