12c508 Gpio


Closed Thread
Results 1 to 2 of 2

Thread: 12c508 Gpio

  1. #1
    oki_one's Avatar
    oki_one Guest

    Default 12c508 Gpio

    Hi,
    I like to use 12C508 and assign GPIO 0-2 pins input GPIO 3-5 output. What's PBP code for this operation.

    I Know i use 16F84 TRISA or TRISB but I don't know GPIO?
    Please help.

    Oki

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


    Did you find this post helpful? Yes | No

    Default

    The baby PIC's use TRISIO in place of TRISA, TRISB etc... (it is in the PBP manual section 2.5.1 PICmicro MCU Specific Issues).

    By the way, check the PIC's Datasheet too... you'll discover you can't have GPIO.3 as Output... it's an input ONLY pin.

    So, setting GPIO 0, 1 and 2 as OUTPUT and 3,4 and 5 as INPUT (which is the other way around to your request) you execute...

    TRISIO=%111000

    Melanie

Similar Threads

  1. Convert code 12C508 to 12F508
    By Olivier in forum General
    Replies: 2
    Last Post: - 25th October 2009, 16:19
  2. Gpio ? Trisio ?
    By ultiblade in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 15th October 2008, 14:38
  3. 12F675 A/D and GPIO sleep interrupt
    By macinug in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th September 2008, 14:39
  4. rfPIC Serin problem
    By gavo in forum mel PIC BASIC Pro
    Replies: 52
    Last Post: - 11th March 2008, 17:52
  5. Difference between 12C508 & 12F629
    By charudatt in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 23rd February 2004, 06:53

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