first ...
Code:
#config
__CONFIG _CP_OFF & _WDT_OFF & _BODEN_ON & _PWRTE_ON & _INTRC_OSC_NOCLKOUT & _MCLRE_OFF & _CPD_OFF
#endconfig
LED Con 0 'Alias GPIO.0 to LED
LED2 con 1 'Alias GPIO.1 to LED2
LED3 con 4 'Alias GPIO.4 to LED3
LED4 con 5 'Alias GPIO.5 to LED4
changed to
Code:
#config
__CONFIG _CP_OFF & _WDT_ON & _BODEN_ON & _PWRTE_ON & _INTRC_OSC_NOCLKOUT & _MCLRE_OFF & _CPD_OFF
#endconfig
LED VAR GPIO.0 'Alias GPIO.0 to LED
LED2 VAR GPIO.1 'Alias GPIO.1 to LED2
LED3 VAR GPIO.4 'Alias GPIO.4 to LED3
LED4 VAR GPIO.5 'Alias GPIO.5 to LED4
to be sure ...
now ... your sketch looks somewhat ... surprising, and not obvious at all.
could you post a scheme and a description ( in words ) of what you intend to have like a functionning scheme ???
Alain
Bookmarks