No longer a NOOB but no flowcode guru either. I have been having alot of problems with the timer0 interrupt properties. Also the portB interrupt icon has not got any properties available. I have downloaded a new fcd file from another post about timer1 on this chip which helped tmr1 but not the port enable. Any help would be greatly appreciated. I did modify the fcd file to change the portb option see before and after below (compiled with no errors) I tried setting the the individual pin bit (IOCAN register) by c code window with no effect.
Code: Select all
//C Code
//C Code:
{
st_bit(iocan,IOCAN1);
}
[PORTB]
Name="PORT"
FlagReg=
FlagBit=
HandlerCode="#ifndef MX_INTHANDLER_intcon_RAIF\n#define MX_INTHANDLER_intcon_RAIF\nchar mxtmp;\nif (ts_bit(intcon, RAIF) && ts_bit(intcon, RAIE))\n{\n\t#ifdef USE_FLOWCODE_ICD\n\t\textern char ICD_Interrupt_Enable = 1;\n\t#endif\t\n\tFCM_%n();\n\tmxtmp=porta;\n\tcr_bit(intcon, RAIF);\n\t#ifdef USE_FLOWCODE_ICD\n\t\textern char ICD_Interrupt_Enable = 0;\n\t#endif\t\n}\n#else\n#warning "This interrupt has previously been enabled, so the macro <%n> may never get called."\n#endif\n"
UseExplicitHandlerCode=1
UseExplicitEnableCode=1
EnReg=
EnBit=
EnableCode="st_bit(intcon, RAIE);\n"
DisableCode="cr_bit(intcon, RAIE);\n"
OptCnt=0
TO
[PORTB]
Name="PORT"
FlagReg=
FlagBit=
HandlerCode="#ifndef MX_INTHANDLER_intcon_IOCIF\n#define MX_INTHANDLER_intcon_IOCIF\nchar mxtmp;\nif (ts_bit(intcon, IOCIF) && ts_bit(intcon, IOCIE))\n{\n\t#ifdef USE_FLOWCODE_ICD\n\t\textern char ICD_Interrupt_Enable = 1;\n\t#endif\t\n\tFCM_%n();\n\tmxtmp=porta;\n\tcr_bit(intcon, IOCIF);\n\t#ifdef USE_FLOWCODE_ICD\n\t\textern char ICD_Interrupt_Enable = 0;\n\t#endif\t\n}\n#else\n#warning "This interrupt has previously been enabled, so the macro <%n> may never get called."\n#endif\n"
UseExplicitHandlerCode=1
UseExplicitEnableCode=1
EnReg=
EnBit=
EnableCode="st_bit(intcon, IOCIE);\n"
DisableCode="cr_bit(intcon, IOCIE);\n"
OptCnt=0
Im using flowcode version v4.5.18.74 Thanks in advance.
Cheers
Christian