Back to the beginning


Closed Thread
Results 1 to 40 of 49

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Hi,
    The PIC12F509 doesn't have a PortA and therefor no TRISA or PortA registers, so you get an error when you try to access things which are not available.

    /Henrik.

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Thanks Henrik,

    How does PBP3 address the single port of the 12F509?

    Andy

    I, probably wrongly, assumed that it would use TRISA.

    I did try to edit the sample program for the 18F452 just to change the outputs but nothing changed. We'll leave that problem again until later.
    Last edited by AndyFreestone; - 6th April 2013 at 17:42.

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    As it does with any other register - by the registers name, which on the 12F509 is either PortB or GPIO for the actual port and TRISB or TRISGPIO for the "direction".
    You know, assumption is the mother of all f**k-ups so never assume anything - a simple look at the datasheet for the device would have told you that there is no PortA.

    /Henrik.

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Quote Originally Posted by HenrikOlsson View Post
    As it does with any other register - by the registers name, which on the 12F509 is either PortB or GPIO for the actual port and TRISB or TRISGPIO for the "direction".
    You know, assumption is the mother of all f**k-ups so never assume anything - a simple look at the datasheet for the device would have told you that there is no PortA.

    /Henrik.
    Again way over my current knowledge. How do I address THE PORT in PBP3 ?

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Like I said, on the 12F509 THE PORT is named PortB or GPIO not PortA.
    Otherwise you had it right - HIGH PortB.0 or HIGH GPIO.0 instead of HIGH PortA.0

    EDIT: I'm sorry, make that GPIO.0 only, PortB was for the 12F605 only which share the same datasheet.
    Last edited by HenrikOlsson; - 6th April 2013 at 18:56.

Similar Threads

  1. Beginning USB How to/Whats needed to use it.
    By wdmagic in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 11th April 2013, 22:11
  2. Missing chars at beginning of LCD display
    By jimbostlawrence in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 20th November 2009, 01:13
  3. 12F629 beginning
    By Davidpower in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 1st October 2007, 23:37
  4. Program returns to beginning at interupt
    By BGreen in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 25th April 2005, 12:20

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