[Device] Pins=14 Ports=3 ADCPins=8 ADCBits=10 MaxClock=20000000 PrescalerBits=3 ClockDivider=4 ConfigAddress=0x2007 ConfigCount=1 PortBits=8 PWMCount=0 UARTCount=1 SPICount=0 I2CCount=0 CANCount=0 ComparatorCount=2 TimerCount8=1 TimerCount16=1 EepromSize=256 HasAltPWM=0 FlowcodeProduct=PIC UsesGpio=0 DefaultPackageType=0 FlashSize=7168 RamSize=256 [ICD] ClockPort=0 ClockPin=1 DataPort=0 DataPin=0 [Pins] Pin1="VDD" Pin2="RA5/T1CKI/OSC1/CLKIN" Pin3="RA4/T1G/AN3/OSC2/CLKOUT" Pin4="RA3/MCLR/VPP" Pin5="RC5" Pin6="RC4" Pin7="RC3/AN7" Pin8="RC2/AN6" Pin9="RC1/AN5" Pin10="RC0/AN4" Pin11="RA2/AN2/C1OUT/T0CKI/INT" Pin12="RA1/AN1/CIN-/ICSPCLK" Pin13="RA0/AN0/CIN+/ICSPDAT" Pin14="VSS" [Ports] PortPin2=0x0005 PortPin3=0x0004 PortPin4=0x0003 PortPin5=0x0205 PortPin6=0x0204 PortPin7=0x0203 PortPin8=0x0202 PortPin9=0x0201 PortPin10=0x0200 PortPin11=0x0002 PortPin12=0x0001 PortPin13=0x0000 [PortMasks] PortMask0=0x3F PortMask1=0x00 PortMask2=0x3F [ADCPins] ADC0=13 ADC1=12 ADC2=11 ADC3=3 ADC4=10 ADC5=9 ADC6=8 ADC7=7 [Code] ;Substitute macros ;%c Clock Speed ;%o Operand ;%s Prescaler ;%p PortID ;%m MaskBits ;%i Inverse Mask ;%a ADC channel ;%a Config Address ;%v Config Value ;%r Interrupt Flag Register ;%b Interrupt Flag Bit ;%n Interrupt Macro Name Directives="#define MX_CLK_SPEED %c\n#ifdef _BOOSTC\n#include \n#endif\n#ifdef HI_TECH_C\n#include \n#endif\n" MainStart="\nvoid main()\n{\n" MainEnd="\tmainendloop: goto mainendloop;\n}\n\n" IntStart="void MX_INTERRUPT_MACRO(void)\n{\n" IntEnd="}\n\n" Initialise="ansel = 0x00;\ncmcon0 = 0x07;\n" IntInit="option_reg = 0xC0;\n\n" InputCmdFull="tris%p = tris%p | %m;\n%o = port%p;\n" InputCmdOneBit="tris%p = tris%p | %m;\n%o = ((port%p & %m) == %m);\n" InputCmdMask="tris%p = tris%p | %m;\n%o = port%p & %m;\n" OutputCmdFull="tris%p = 0x00;\nport%p = %o;\n" OutputCmdOneBit="tris%p = tris%p & %i;\nif (%o)\n\tport%p = (port%p & %i) | %m;\nelse\n\tport%p = port%p & %i;\n" OutputCmdMask="tris%p = tris%p & %i;\nport%p = (port%p & %i) | (%o & %m);\n" DelayCmdS="delay_s(%o);\n" DelayCmdMs="delay_ms(%o);\n" DelayCmdUs="delay_us(%o);\n" WdtDelayCmdS="Wdt_Delay_S(%o);\n" WdtDelayCmdMs="Wdt_Delay_Ms(%o);\n" InitialPortLetter="a" ConfigData="#ifdef _BOOSTC\n#pragma DATA %a, %v\n#endif\n#ifdef HI_TECH_C\n__CONFIG(%v);\n#endif\n" IntHandler="#ifndef MX_INTHANDLER_%r_%b\n#define MX_INTHANDLER_%r_%b\nif (ts_bit(%r, %b))\n{\n\tFCM_%n();\n\tcr_bit(%r, %b);\n}\n#else\n#warning "This interrupt has previously been enabled, so the macro <%n> may never get called."\n#endif" [Defines] Define1=#define P16F688 Define2=#define FC_CAL_PIC Define3=#define MX_ADC Define4=#define MX_ADC_TYPE_3 Define5=#define MX_ADC_BITS_10 Define6=#define MX_EE Define7=#define MX_EE_SIZE 256 Define8=#define MX_UART_1 Define9=#define MX_UART_1_TX_PORT portc Define10=#define MX_UART_1_TX_TRIS trisc Define11=#define MX_UART_1_TX_PIN 4 Define12=#define MX_UART_1_RX_PORT portc Define13=#define MX_UART_1_RX_TRIS trisc Define14=#define MX_UART_1_RX_PIN 5 [Interrupts] ;first 3 should always be 1=TMR0, 2=RB0INT, 3=PORTB ;any other interrupts need to also have this set: "st_bit(intcon,PEIE);\n" GeneralInit="st_bit(intcon,GIE);\n" Count=5 1=TMR0 2=RB0INT 3=PORTA 4=TMR1 5=RXINT [TMR0] Name="TMR0" HandlerCode="#ifndef MX_INTHANDLER_intcon_T0IF\n#define MX_INTHANDLER_intcon_T0IF\nif (ts_bit(intcon, T0IF) && ts_bit(intcon, T0IE))\n{\n\t#ifdef USE_FLOWCODE_ICD\n\t\textern char ICD_Interrupt_Enable = 1;\n\t#endif\t\n\tFCM_%n();\n\tcr_bit(intcon, T0IF);\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" EnableCode="st_bit(intcon, T0IE);\n" DisableCode="cr_bit(intcon, T0IE);\n" OptCnt=3 PrescaleOpt=3 MaxTimerOverflow=256 Opt1="Clock Source Select" Opt1Cnt=2 Opt1_1="Transition on T0CKI pin" Opt1_1Val="st_bit(option_reg,T0CS);\n" Opt1_2="Internal clock (CLKO)" Opt1_2Val="cr_bit(option_reg,T0CS);\n" Opt2="Source Edge Select" Opt2Cnt=2 Opt2_1="high-to-low transition on TMR0 Clock" Opt2_1Val="st_bit(option_reg,T0SE);\n" Opt2_2="low-to-high transition on TMR0 Clock" Opt2_2Val="cr_bit(option_reg,T0SE);\n" Opt3="Prescaler Rate" Opt3Cnt=9 Opt3_1="1:1" Opt3_1Val="option_reg = (option_reg & 0xF0) | 0x08;\n" Opt3_2="1:2" Opt3_2Val="option_reg = (option_reg & 0xF0) | 0x00;\n" Opt3_3="1:4" Opt3_3Val="option_reg = (option_reg & 0xF0) | 0x01;\n" Opt3_4="1:8" Opt3_4Val="option_reg = (option_reg & 0xF0) | 0x02;\n" Opt3_5="1:16" Opt3_5Val="option_reg = (option_reg & 0xF0) | 0x03;\n" Opt3_6="1:32" Opt3_6Val="option_reg = (option_reg & 0xF0) | 0x04;\n" Opt3_7="1:64" Opt3_7Val="option_reg = (option_reg & 0xF0) | 0x05;\n" Opt3_8="1:128" Opt3_8Val="option_reg = (option_reg & 0xF0) | 0x06;\n" Opt3_9="1:256" Opt3_9Val="option_reg = (option_reg & 0xF0) | 0x07;\n" [RB0INT] Name="INT" REMask=0x00,0x01 FEMask=0x00,0x01 ConfOpt=0x03 EdgeOpt=0x01 HandlerCode="#ifndef MX_INTHANDLER_intcon_INTF\n#define MX_INTHANDLER_intcon_INTF\nif (ts_bit(intcon, INTF) && ts_bit(intcon, INTE))\n{\n\t#ifdef USE_FLOWCODE_ICD\n\t\textern char ICD_Interrupt_Enable = 1;\n\t#endif\t\n\tFCM_%n();\n\tcr_bit(intcon, INTF);\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" EnableCode="st_bit(intcon, INTE);\n" DisableCode="cr_bit(intcon, INTE);\n" OptCnt=1 Opt1="Interrupt Edge Select" Opt1Cnt=2 Opt1_1="rising edge of INT" Opt1_1Val="st_bit(option_reg,INTEDG);\n" Opt1_2="falling edge of INT" Opt1_2Val="cr_bit(option_reg,INTEDG);\n" [PORTA] Name="PORT" REMask=0x3F FEMask=0x3F ConfOpt=0x0C 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" EnableCode="ioca=%pA0v;\nst_bit(intcon, RAIE);\n" DisableCode="cr_bit(intcon, RAIE);\n" OptCnt=0 [TMR1] ;NOTE: this osc is enabled and turned on as part of the Opt1 code Name="TMR1" HandlerCode="#ifndef MX_INTHANDLER_pir1_TMR1IF\n#define MX_INTHANDLER_pir1_TMR1IF\nif (ts_bit(pir1, TMR1IF) && ts_bit(pie1, TMR1IE))\n{\n\t#ifdef USE_FLOWCODE_ICD\n\t\textern char ICD_Interrupt_Enable = 1;\n\t#endif\t\n\tFCM_%n();\n\tcr_bit(pir1, TMR1IF);\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" EnableCode="st_bit(pie1, TMR1IE);\n" DisableCode="cr_bit(pie1, TMR1IE);\n" OptCnt=2 PrescaleOpt=2 MaxTimerOverflow=65536 Opt1="Clock Source Select" Opt1Cnt=2 Opt1_1="Transition on T1CKI pin" Opt1_1Val="st_bit(intcon,PEIE);\nst_bit(t1con,T1OSCEN);\nst_bit(t1con,TMR1ON);\nst_bit(t1con,TMR1CS);\n" Opt1_2="Internal clock (Fosc/4)" Opt1_2Val="st_bit(intcon,PEIE);\nst_bit(t1con,T1OSCEN);\nst_bit(t1con,TMR1ON);\ncr_bit(t1con,TMR1CS);\n" Opt2="Prescaler Rate" Opt2Cnt=4 Opt2_1="1:1" Opt2_1Val="t1con = t1con & 0x0F;\n" Opt2_2="1:2" Opt2_2Val="t1con = (t1con & 0x0F) | 0x10;\n" Opt2_3="1:4" Opt2_3Val="t1con = (t1con & 0x0F) | 0x20;\n" Opt2_4="1:8" Opt2_4Val="t1con = (t1con & 0x0F) | 0x30;\n" [RXINT] Name="RXINT" HandlerCode="#ifndef MX_INTHANDLER_pir1_RCIF\n#define MX_INTHANDLER_pir1_RCIF\nif (ts_bit(pir1, RCIF) && ts_bit(pie1, RCIE))\n{\n\t#ifdef USE_FLOWCODE_ICD\n\t\textern char ICD_Interrupt_Enable = 1;\n\t#endif\t\n\tFCM_%n();\n\tcr_bit(pir1, RCIF);\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" EnableCode="st_bit(pie1, RCIE);\nst_bit(intcon, PEIE);\n" DisableCode="cr_bit(pie1, RCIE);\n" OptCnt=0