GPIO.0, GPIO.1, etc, for I/O-pins, and TRISIO for TRIS regs. Here's a sample
I/O-pin setup header from an old 683 test program..
Code:
@ DEVICE PIC12F683,MCLR_OFF,INTRC_OSC_NOCLKOUT,WDT_OFF,BOD_ON, PWRT_ON
OSCCON = %01100000 ' Internal 4MHz osc
ADCON0 = 0 ' A/D off
CMCON0 = 7 ' Comparators off
ANSEL = 0 ' Set all digital
WPU = 0 ' Internal pull-ups = off
OPTION_REG = %10000000 ' Pull-ups = off, GPIO.2 = I/O, prescaler to Timer1
GPIO = %00000000 ' All outputs = 0 on boot
TRISIO = %00111101 ' GPIO,0=data in, GPIO,1=IRLED out, GPIO,2,3,4,5 unused
Bookmarks