PDA

View Full Version : 12C508 I/O ports Issue



gixman
- 10th September 2010, 15:53
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

mackrackit
- 10th September 2010, 16:18
I think maybe you should ask here.
http://www.protonbasic.co.uk/forum.php