Change DEFINE DEBUG_Bit 1 to DEFINE DEBUG_BIT 1 and it should work.
Having the last 2 characters in lower case was making pin RA0 an output VS RA1.
At least is was in MPSIM. I don't have a 737 to test, but this works fine in MPSIM once
I change Bit to BIT.
There's a section in the library that sets up default values, and if something isn'tCode:@ __config _CONFIG1, _INTRC_IO & _MCLR_OFF & _DEBUG_OFF & _WDT_OFF & _CP_OFF ' Defines DEFINE OSC 8 DEFINE DEBUG_REG PORTA DEFINE DEBUG_BIT 1 ' note it's all UPPER CASE DEFINE DEBUG_BAUD 9600 DEFINE DEBUG_MODE 1 ' 1 = inverted ' System Constants OSCCON = $F0 ' set 8MHz internal ADCON1 = $0F ' all digital CMCON = 7 ' comparators disabled ' Code start Init: PAUSE 100 ' let things settle DEBUG "Start",10,13 GOTO Init END
DEFINED, the value will be whatever the default is. In this case it's 0.
ifndef DEBUG_BIT ; Debug pin bit
DEBUG_BIT EQU 0
If wasn't seeing DEBUG_Bit as DEBUG_BIT so the default was RA0.




Bookmarks