[Device] Pins=14 Ports=3 ADCPins=8 ADCBits=10 ADCType=26 MaxClock=32000000 PrescalerBits=3 ClockDivider=4 ConfigAddress=0x8007 ConfigCount=1 PWMCount=1 UARTCount=1 EepromSize=256 HasAltPWM=0 Pwm2IsD4=0 FlowcodeProduct=PIC UsesGpio=0 DefaultPackageType=0 FlashSize=3584 RamSize=128 [ICD] ClockPort=0 ClockPin=1 DataPort=0 DataPin=0 [Pins] Pin1 = "VDD" Pin2 = "RA5/OSC1/CLKIN" Pin3 = "RA4/AN3/OSC2/CLKOUT" Pin4 = "RA3/MCLR/VPP" Pin5 = "RC5/RX/T0CKI" Pin6 = "RC4/TX" Pin7 = "RC3/AN7" Pin8 = "RC2/AN6/SDO" Pin9 = "RC1/AN5/SDA/SDI" Pin10 = "RC0/AN4/SCL/SCK" Pin11 = "RA2/AN2/T0CKI" Pin12 = "RA1/AN1/VREF/ICSPCLK" Pin13 = "RA0/AN0/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="void main()\n{\n" MainEnd="\tmainendloop: goto mainendloop;\n}\n\n" IntStart="void MX_INTERRUPT_MACRO(void)\n{\n" IntEnd="}\n\n" Initialise="ansela=0x00;\nanselc=0x00;\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 P16F1823 Define2=#define MX_EE Define3=#define MX_EE_TYPE3 Define4=#define MX_EE_SIZE 256 Define5=#define MX_UART Define6=#define MX_UART_C Define7=#define MX_UART_TX 4 Define8=#define MX_UART_RX 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=3 1=TMR0 2=RA2INT 3=PORTA [TMR0] Name="TMR0" FlagReg= FlagBit= 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" UseExplicitHandlerCode=1 UseExplicitEnableCode=1 EnReg= EnBit= 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" [RA2INT] Name="INT" FlagReg= FlagBit= 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" UseExplicitHandlerCode=1 UseExplicitEnableCode=1 EnReg= EnBit= 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" 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