I always find it good practice to set the config bits in the code..
The following turns on an LED on GPIO.0 when GPIO.1 is grounded (external 10K pullup) - Hope it helps
Code:@ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON ANSEL = 0 CMCON=7 TRISIO = %101010 LED var GPIO.0 main: IF GPIO.1=0 THEN LED=1 ELSE LED=0 ENDIF goto main:
Bookmarks