12C508 I/O ports Issue


Closed Thread
Results 1 to 2 of 2
  1. #1
    gixman's Avatar
    gixman Guest

    Default 12C508 I/O ports Issue

    I need for a very redundacy and protection purposes to make all I/O pins as OUTPUT.

    I have a very simple program where GP0,GP1 and GP2 works ok, but I can't make GP4 and GP5, work as OUTPUT, here the program.

    Please can you help me to make GP4 and GP5 to work as output. Thanks.

    Device = 12C508A
    Declare Watchdog = no
    #define _MCLRE_OFF
    #define _IntRC_OSC
    #define PORTB_PULLUPS = OFF
    #define INTRC_OSC_NOCLKOUT
    #define ALL_DIGITAL = True
    Dim i As Byte
    OPTION_REG.5 = 0 'gp2 as exit

    TRISIO =%00000000
    GPIO =%00000000

    Loop:

    For i=1 To 6
    GPIO= %11111111

    PAUSE 50
    GPIO=%00000000
    PAUSE 50
    Next i

    GPIO=%00000000
    PAUSE 350

    GoTo Loop
    End
    Last edited by gixman; - 10th September 2010 at 15:56.

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I think maybe you should ask here.
    http://www.protonbasic.co.uk/forum.php
    Dave
    Always wear safety glasses while programming.

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts