Port pin identification


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305

    Default Port pin identification

    I've seen two ways of identifying the same pin......

    PORTA.5 = pin 5 Physically
    PORTA.5 = RA 5.


    Both are in the PBP manual or on links to PBP examples out on the web.
    Error in the users manual? As the first statment is used as an example.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Your first exaple is correct usage for PBP. For example...

    High PortA.5 ' Make pin go High (Output)

    or

    MyBitVariable=PortA.5 ' Transfer status of pin to Variable (Input)

    or

    MyFavouritePin var PortA.5 ' alias the pin

    High MyFavouritePin ' Make pin go High (Output)

    Your second example (as RA5) is the preferred designation in Microchips' Datasheets and is a quick way of referring to that pin although NOT a correct way to PROGRAM unless you first alias that prin as so...

    RA5 var PortA.5

    Now you can refer to RA5 within your program.

  3. #3
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    I might be missunderstanding your reply, but im talking about the actual physical pin itself.

    Is PORTA.5 RA5 or is it the physical pin 5 of the chip? It has to be PORTA.5 = RA5, as PORTA.0 cant be pin 0 as pin 0 does not exist.
    What Im saying is both examples of how to identify the physical pin number are shown in the manual, so one of them has to be wrong, and I believe its the first example.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Go to the Microchip website and download the Datasheet for your PIC. Look at the pin layout for your chosen package and all will be revealed!

Similar Threads

  1. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 13:55
  2. DS1820 with 16f688
    By jessey in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 23rd May 2009, 05:07
  3. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  4. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 17:07
  5. port/ pin explanation 16F877
    By emmett brown in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th August 2006, 01:07

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