[Device] FlowcodeProduct=AVR ChipName=at90s2343 AltChipName=2343 Pins=8 Ports=2 ADCPins=0 ADCBits=0 MaxClock=20000000 PrescalerBits=3 ClockDivider=1 TimerOverflow=256 ConfigAddress=0x0000 ConfigCount=1 PWMCount=0 [Pins] Pin1="RESET" Pin2="(CLOCK) PB3" Pin3="PB4" Pin4="Gnd" Pin5="PB0 (MOSI)" Pin6="PB1 (MISO/INT0)" Pin7="PB2 (SCK/T0)" Pin8="Vcc" [Ports] PortPin2=0x0103 PortPin3=0x0104 PortPin5=0x0100 PortPin6=0x0101 PortPin7=0x0102 [PortMasks] PortMask0=0x00 PortMask1=0x1f [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 F_CPU %cUL\n#include \n#include \n#include \n#include \n#include \n" MainStart="int main()\n{\n" MainEnd="\tmainendloop: goto mainendloop;\n}\n\n" IntStart="" IntEnd="" Initialise="MCUCR=0x0a;\n\tWDTCR=0x10;\n" IntInit="GIMSK=0x00;\n\n" InputCmdFull="DDR%p = DDR%p & %i;\n%o = PIN%p;\n" InputCmdOneBit="DDR%p = DDR%p & %i;\n%o = ((PIN%p & %m) == %m);\n" InputCmdMask="DDR%p = DDR%p & %i;\n%o = PIN%p & %m;\n" OutputCmdFull="DDR%p = 0xFF;\nPORT%p = %o;\n" OutputCmdOneBit="DDR%p = DDR%p | %m;\nif (%o)\n\tPORT%p = (PORT%p & %i) | %m;\nelse\n\tPORT%p = PORT%p & %i;\n" OutputCmdMask="DDR%p = DDR%p | %m;\nPORT%p = (PORT%p & %i) | %o;\n" DelayCmdS="delay_s(%o);\n" DelayCmdMs="delay_ms(%o);\n" InitialPortLetter="A" ConfigData="#pragma DATA %a, %v\n" IntHandler= [Defines] Define1=#define MX_AVR Define2=#define MX_EE Define3=#define MX_EE_SIZE 128 [Interrupts] GeneralInit="sei();\n" Count=2 1=TMR0 2=INT0 [TMR0] ;it is vital that this section remains exactly as-is (for all chips?) Name=(this is retrieved from the resource file) UseExplicitHandlerCode=1 FlagReg= FlagBit= HandlerCode="ISR(TIMER0_OVF_vect)\n{\n\tFCM_%n();\n}\n" UseExplicitEnableCode=1 EnReg= EnBit= EnableCode="TIMSK |= (1 << TOIE0);\n" DisableCode="TIMSK &= ~(1 << TOIE0);\n" OptCnt=1 TmrOpt=1 Opt1="Clock Source & Prescaler Select" Opt1Cnt=8 Opt1_1="no clock" Opt1_1Val="TCCR0 &= 0xf8;\n" Opt1_2="1:1" Opt1_2Val="TCCR0 &= 0xf8;\nTCCR0 |= 0x01;\n" Opt1_3="1:8" Opt1_3Val="TCCR0 &= 0xf8;\nTCCR0 |= 0x02;\n" Opt1_4="1:64" Opt1_4Val="TCCR0 &= 0xf8;\nTCCR0 |= 0x03;\n" Opt1_5="1:256" Opt1_5Val="TCCR0 &= 0xf8;\nTCCR0 |= 0x04;\n" Opt1_6="1:1024" Opt1_6Val="TCCR0 &= 0xf8;\nTCCR0 |= 0x05;\n" Opt1_7="T0 pin, -ve edge" Opt1_7Val="TCCR0 &= 0xf8;\nTCCR0 |= 0x06;\n" Opt1_8="T0 pin, +ve edge" Opt1_8Val="TCCR0 &= 0xf8;\nTCCR0 |= 0x07;\n" [INT0] Name="INT0 Input" UseExplicitHandlerCode=1 FlagReg= FlagBit= HandlerCode="ISR(INT0_vect)\n{\n\tFCM_%n();\n}\n" UseExplicitEnableCode=1 EnReg= EnBit= EnableCode="GIMSK |= (1 << INT0);\n" DisableCode="GIMSK &= ~(1 << INT0);\n" IntPort=3 IntPin=2 OptCnt=1 TmrOpt=0 Opt1="Interrupt Edge Select" Opt1Cnt=2 Opt1_1="rising edge of INT0" Opt1_1Val="MCUCR |= (1 << ISC01) | (1 << ISC00);\n" Opt1_2="falling edge of INT0" Opt1_2Val="MCUCR |= (1 << ISC01);\nMCUCR &= ~(1 << ISC00);\n"