16F877A Correct set up for port a


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

    Default 16F877A Correct set up for port a

    Hi all

    I`ve just migrated a program over from a 16F648A to a 16F877 and it now refuses to serial in on porta.0. I`m sure this has to be a register not set, I know on the 648A is CMCON=7 for all digital on port A but for the life of me I cant find the relevent info for this device. Does anyone know this offhand?

    Cheers Pete

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


    Did you find this post helpful? Yes | No

    Default

    Do you have
    ADCON1 = 7
    someplace in your code. ( I think that is correct for your chip, might be ANSEL )
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Hi Dave

    I think its still cmcon = 7 which I`m sure is wrong, I`ll try ACCON1 = 1 and see. Its certainly that because the setup works if I apply the serial to portb and recode.


    Cheers Pete

    Do you have
    ADCON1 = 7
    someplace in your code. ( I think that is correct for your chip, might be ANSEL )
    __________________
    Dave

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


    Did you find this post helpful? Yes | No

    Default

    What I was getting at is the 877A has analog also.

    http://www.picbasic.co.uk/forum/showthread.php?t=561
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Hi Dave

    Thanks ADCON1 did it, I had a feeling it was coming up in Analog mode I just couldnt find the correct register to set.

    Many thanks, Pete

Similar Threads

  1. Pin won't stay high during Repeat...Until loop??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th August 2009, 23:57
  2. Interruptus Frustratus
    By Byte_Butcher in forum General
    Replies: 16
    Last Post: - 17th April 2009, 20:36
  3. 16F628A - Stops if release power switch.
    By dene12 in forum General
    Replies: 16
    Last Post: - 14th February 2009, 07:57
  4. UberNewbie can't set his clock...
    By Byte_Butcher in forum General
    Replies: 19
    Last Post: - 7th January 2009, 04:22
  5. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 14:31

Members who have read this thread : 1

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