A rant about port configurations


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: A rant about port configurations

    Hi,
    The ADCON register controls the the actual converter, not the input buffers of the pins. For the 27J53, check the ANCON0 and ANCON1 registers, page 371 in the datasheet.
    The ANCON0 and ANCON1 registers are used to configure the operation of the I/O pin associated with each analog channel. Setting any one of the PCFG bits configures the corresponding pin to operate as a digital
    only I/O. Clearing a bit configures the pin to operate as an analog input for either the A/D Converter or the comparator module. All digital peripherals are disabled and digital inputs read as ‘0’. As a rule, I/O pins that are multiplexed with analog inputs default to analog operation on device Resets.
    Looking up ANCON0 and ANCON1 in table 5.1 (page 76) shows that they default to all zeros at POR meaning that when the chip powers up all analog pins are analog.

    /Henrik.

  2. #2
    Join Date
    Mar 2005
    Location
    Cocoa, Florida
    Posts
    43


    Did you find this post helpful? Yes | No

    Default Re: A rant about port configurations

    Thanks, Henrik, that did it.
    I'll be back on this project in a couple of days and you saved a lot of brain hurt.
    Ken

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