Has anyone know why I have this error only for pin RB6, although the pin is listed in the data sheet as CN24?
enable_interrupts(INTR_CN_PIN | PIN_B6);
Error#27 Expression must evaluate to a constant :: Not a CN pin
All other pins seem to work.
thanks
Ttelmah
Joined: 11 Mar 2010 Posts: 19540
Posted: Sun Jun 17, 2018 9:10 am
You need to talk to CCS. Looks as if whoever was typing in the database for the chip managed to omit CN24.
You can potentially cheat by enabling it on another pin, and relocating it yourself, with something like:
Code:
#bit CN24IE = getenv("BIT:CN24IE")
#bit CN23IE = getenv("BIT:CN23IE")
//define the bits to access the CN interrupts.
enable_interrupts(INTR_CN_PIN | PIN_C12); //enable the interrupt on CN23
CN23IE=FALSE; //turn off CN23
CN24IE=TRUE; //Now connect to CN24
A 'bodge', but ought to make it work till they come back.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum