<root>
<document scada='0' schema='103' license='1,65920724,Y1F9MT' title='' description='' fcversion='590593' target='ARD.ATMEGA.Arduino Uno R3 PDIP' >
	<config data='' clkspd='16000000' simspd='0' usewdt='0' constif='0' commport='8' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='RX' />
		<watch expr='st' />
	</debug>
	<traces >
		<trace digital='1' displayname='$PORTD.7' portdata='117571587' scopetype='1' showtrace='1' autonamed='1' channel='0' />
		<trace digital='1' displayname='$PORTD.0' portdata='131075' scopetype='1' showtrace='1' autonamed='1' channel='1' />
		<trace digital='1' displayname='$PORTD.1' portdata='16908291' scopetype='0' showtrace='1' autonamed='0' channel='-1' />
	</traces>
	<ghost >
		<FK2 >
			<data name='FK2D0' port='4294967295' pin='4294967295' />
			<data name='FK2D1' port='4294967295' pin='4294967295' />
			<data name='FK2D2' port='4294967295' pin='4294967295' />
			<data name='FK2D3' port='4294967295' pin='4294967295' />
			<data name='FK2D4' port='4294967295' pin='4294967295' />
			<data name='FK2D5' port='4294967295' pin='4294967295' />
			<data name='FK2D6' port='4294967295' pin='4294967295' />
			<data name='FK2D7' port='4294967295' pin='4294967295' />
			<data name='FK2D8' port='4294967295' pin='4294967295' />
			<data name='FK2D9' port='4294967295' pin='4294967295' />
			<data name='FK2D10' port='4294967295' pin='4294967295' />
			<data name='FK2D11' port='4294967295' pin='4294967295' />
			<data name='FK2D12' port='4294967295' pin='4294967295' />
			<data name='FK2D13' port='4294967295' pin='4294967295' />
			<data name='FK2D14' port='4294967295' pin='4294967295' />
			<data name='FK2D15' port='4294967295' pin='4294967295' />
			<data name='FK2A0' port='4294967295' pin='4294967295' />
			<data name='FK2A1' port='4294967295' pin='4294967295' />
			<data name='FK2A2' port='4294967295' pin='4294967295' />
			<data name='FK2A3' port='4294967295' pin='4294967295' />
			<data name='FK2A4' port='4294967295' pin='4294967295' />
			<data name='FK2A5' port='4294967295' pin='4294967295' />
		</FK2>
		<ICD >
			<data name='AnalogPrescaleValue' value='19' />
			<data name='DigitalSampleRate' value='100000' />
			<data name='BreakpointCount' value='8' />
			<data name='CallStackDepthCount' value='8' />
			<data name='ClockPort' value='3' />
			<data name='ClockPin' value='1' />
			<data name='DataPort' value='3' />
			<data name='DataPin' value='0' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='11' />
			<data name='CalculatedCommsDelay' value='11' />
			<data name='AnalogEB2PrescaleValue' value='2' />
			<data name='DigitalEB2SampleRate' value='100000' />
		</ICD>
		<pins >
			<digital A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
			<analog A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
		</pins>
	</ghost>
	<components >
		<settings autoimg='0' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='36a6fe71-0986-41a0-ad19-bb757ec94ca5' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' category2='' category3='' bIs2dOnly='0' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='1' scadaCompatible='0' embeddedCompatible='1' iconpath='' />
		<gdiopts FullContainer='1' FullTransparency='1' ShowGdi='1' ShowOpengl='1' />
		<component class_type='root' codename='panel' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='0' poslock='0' comp2dType='0' >
			<resources />
			<properties >
				<property name='Receive Buffer Size' target='UartSoftwareTimer1::RXBufferSize' typeid='21' hidden='0' locked='0' info='Number of bytes that can be stored in the incoming receive buffer' />
			</properties>
			<values >
				<value target='UartSoftwareTimer1::RXBufferSize' data='50' />
			</values>
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='a' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Data' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='15' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='p' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='l' type='b1' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isHidden='0' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='tmr0' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='UartSoftwareTimer1' macro='UART_Timer_Process' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='To set up.
Determine the microseconds of baud rate = 1/baud rate. e.g., for 38400 = 1/38400 = 26uS. Send an upper-case U every 100ms.
Measure width of a single bit on hardware, Adjust the time period of Timer interval until width of one bit is correct.' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='UartSoftwareTimer1' macro='Initialise' />
						<command class_type='call' title='Set up for 38400 baud on the Arduino Uno' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='TimedInterval1' macro='StartTimerInterval' />
						<command class_type='loop' title='Loop' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' type='0' exp='1' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='p = p + 1' />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='p &gt; 50000' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
											<exp exp='p = 0' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='Data = ToString$ (p)' />
									<exp exp='Data = Data + &quot;\n\r&quot;' />
								</command>
								<command class_type='call' title='Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='UartSoftwareTimer1' macro='SendString' >
									<argument exp='Data' />
								</command>
								<command class_type='call' title='Component Macro' disable='1' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='UartSoftwareTimer1' macro='SendString' >
									<argument exp='&quot;U&quot;' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='100' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='743ea495-34e7-47ee-bd79-3bfdc067b01c' vmin='0' vmaj='1' codename='UartSoftwareTimer1' x='32' y='34' z='0' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='DataBits' data='008' />
					<value target='StopBits' data='001' />
					<value target='MaxStates' data='10' />
					<value target='UseTx' data='1' />
					<value target='UseRx' data='1' />
					<value target='TXPin' data='$PORTD.1' />
					<value target='TXBufferSize' data='50' />
					<value target='RXPin' data='$PORTD.0' />
					<value target='RXBufferSize' data='50' />
					<value target='Injector' data='' />
					<value target='InjectorHandle' data='0' />
					<value target='InjectorChannel' data='0' />
					<value target='APIUseDDR' data='0' />
					<value target='APIDDRPin' data='0' />
					<value target='APIUseFC' data='' />
					<value target='APICTSPin' data='0' />
					<value target='APIRTSPin' data='' />
					<value target='APIDDRRXState' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='d7633558-54a4-47ff-8c00-95170632c57e' vmin='1' vmaj='1' codename='TimedInterval1' x='-26' y='32' z='0' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='TimeUnit' data='005' />
					<value target='TimePeriod' data='15' />
					<value target='EstBestPeriod' data='15.000000' />
					<value target='MaxTimeMeasurement' data='17592186044416.000000' />
					<value target='CallbackMacro' data='tmr0' />
					<value target='Timer' data='001' />
					<value target='BitDepth' data='16' />
					<value target='PrescalerFilter' data='000' />
					<value target='Prescaler' data='1' />
					<value target='PostscalerFilter' data='000' />
					<value target='PostScaler' data='1' />
					<value target='InstructionRate' data='16000000' />
					<value target='InstructionTime' data='0.000063' />
					<value target='RolloverFreq' data='244.140625' />
					<value target='RolloverTime' data='0.004096' />
					<value target='RegHighUsed' data='1' />
					<value target='WholePeriods' data='0' />
					<value target='UseSubPeriod' data='1' />
					<value target='SubInstCount' data='240' />
					<value target='SubPeriodOverflow' data='65296' />
					<value target='Instance' data='1' />
					<value target='DeviceBits' data='8' />
					<value target='CountRegLow' data='TCNT1L' />
					<value target='CountRegHigh' data='TCNT1H' />
					<value target='EnableCode' data='sei(); TIMSK1 |= (1 &lt;&lt; TOIE1);  TCCR1B &amp;= 0xf8; TCCR1B |= 0x01; ' />
					<value target='DisableCode' data='TIMSK1 &amp;= ~(1 &lt;&lt; TOIE1); ' />
					<value target='HandlerCodeStart' data='ISR(TIMER1_OVF_vect) {  ' />
					<value target='HandlerCodeEnd' data=' }' />
					<value target='Family' data='ARD' />
					<value target='TimerDelay' data='50' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='7292207' img='' style='0' />
		<camera xe='-5.65062' ye='9.36132' ze='162.369' xt='-5.65062' yt='9.36132' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='462' dy='431' zoom='344.291' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='7360576' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='0' />
		<camera xe='0' ye='0' ze='781.66' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAUgIAAGsCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='tmr0' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAUgIAAGsCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
