How to address I/O pins on 12F509?


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    11

    Question How to address I/O pins on 12F509?

    Hi,
    I'm trying to use a 12F509 for the first time. I don't even know how to address the I/O pins. It appeared from the datasheet that they were addressed as 'GPIO', or possibly even PORTB.

    I just want to set the TRIS register but PicBasic Pro barfs at both of these:

    TRISGPIO=%111111

    (or)

    TRISB=%111111

    Thanks for the point in the right direction!!

    Len

  2. #2
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Default

    On all 8-pin pics(that i know of) it's called TRISIO. The port itself is called GPIO.

  3. #3
    Join Date
    Jan 2004
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    So, to set up an I/O in my variable list, what should it look like?

    SERIAL VAR PORTIO.3 ?

  4. #4
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    No,
    SERIAL VAR GPIO.3
    You can read all of this in the datasheet of your processor you want to use.

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  2. Aliasing a port with arbitrary I/O pins?
    By Jayhovah in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 19th May 2008, 15:09
  3. RF Transmitter
    By et_Fong in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th October 2005, 16:34
  4. PIC12F629, useing all I/O pins
    By Jcee324 in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 7th December 2004, 11:05
  5. 18f452 internal eprom help
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 13th July 2004, 15:50

Members who have read this thread : 2

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