<root>
<document schema='101' license='1,MARK-LEE-23,C1D7WZ' title='' description='' target='AVR.ATMEGA.Arduino Uno R3 PDIP' >
	<config data='' clkspd='16000000' simspd='7' usewdt='0' constif='0' />
	<plugins >
		<dll_dbg_icd enabled='0' >
			<data name='debug' value='1' />
			<data name='userpins' value='0' />
			<data name='speed' value='0' />
			<data name='usev9' value='0' />
			<data name='breaks' value='8' />
			<data name='stacks' value='8' />
			<data name='clkport' value='1' />
			<data name='clkbit' value='6' />
			<data name='dataport' value='1' />
			<data name='databit' value='7' />
			<data name='ghostype' value='0' />
			<data name='monitor' value='1' />
			<data name='ictloop' value='0' />
			<data name='ictrate' value='20000' />
			<data name='ictmask' value='0' />
			<data name='anlpres' value='255' />
			<data name='digmask1' value='-1' />
			<data name='digmask2' value='-1' />
		</dll_dbg_icd>
		<dll_models enabled='1' />
		<dll_upgrader enabled='1' />
		<dll_webhelp enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug />
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='760a5142-6f2c-41f0-bd8a-6f0faa684127' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='0' iconpath='' />
		<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' interactive='1' solid='1' layer='0' poslock='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='delay' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='dig4' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='dig3' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='dig2' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='alldigits' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='dig1' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='b9' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='b8' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='b7' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='digit_to_enable' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='b6' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='b5' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='b4' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='b3' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='b2' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='b1' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='b0' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='count' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Macro' macro='zero' />
						<command class_type='delay' title='Delay' exp='delay' type='1' />
						<command class_type='call' title='Call Macro' macro='one' />
						<command class_type='delay' title='Delay' exp='delay' type='1' />
						<command class_type='call' title='Call Macro' macro='two' />
						<command class_type='delay' title='Delay' exp='delay' type='1' />
						<command class_type='call' title='Call Macro' macro='three' />
						<command class_type='delay' title='Delay' exp='delay' type='1' />
						<command class_type='call' title='Call Macro' macro='four' />
						<command class_type='delay' title='Delay' exp='delay' type='1' />
						<command class_type='call' title='Call Macro' macro='five' />
						<command class_type='delay' title='Delay' exp='delay' type='1' />
						<command class_type='call' title='Call Macro' macro='six' />
						<command class_type='delay' title='Delay' exp='delay' type='1' />
						<command class_type='call' title='Call Macro' macro='seven' />
						<command class_type='delay' title='Delay' exp='delay' type='1' />
						<command class_type='call' title='Call Macro' macro='eight' />
						<command class_type='delay' title='Delay' exp='delay' type='1' />
						<command class_type='call' title='Call Macro' macro='nine' />
						<command class_type='delay' title='Delay' exp='delay' type='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='seven' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOff' />
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='b7' />
						</command>
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='digit_to_enable' />
						</command>
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOn' />
					</flowline>
				</macro>
				<macro >
					<flowline name='one' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOff' />
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='b1' />
						</command>
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='digit_to_enable' />
						</command>
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOn' />
					</flowline>
				</macro>
				<macro >
					<flowline name='zero' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOff' />
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='b0' />
						</command>
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='digit_to_enable' />
						</command>
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOn' />
					</flowline>
				</macro>
				<macro >
					<flowline name='four' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOff' />
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='b4' />
						</command>
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='digit_to_enable' />
						</command>
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOn' />
					</flowline>
				</macro>
				<macro >
					<flowline name='start_count' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='loop' title='Loop' type='2' exp='1' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='digit_to_enable = dig1' />
								</command>
								<command class_type='call' title='Call Macro' macro='count' />
							</flowline>
						</command>
						<command class_type='loop' title='Loop' type='2' exp='1' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='digit_to_enable = dig2' />
								</command>
								<command class_type='call' title='Call Macro' macro='count' />
							</flowline>
						</command>
						<command class_type='loop' title='Loop' type='2' exp='1' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='digit_to_enable = dig3' />
								</command>
								<command class_type='call' title='Call Macro' macro='count' />
							</flowline>
						</command>
						<command class_type='loop' title='Loop' type='2' exp='1' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='digit_to_enable = dig4' />
								</command>
								<command class_type='call' title='Call Macro' macro='count' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='six' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOff' />
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='b6' />
						</command>
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='digit_to_enable' />
						</command>
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOn' />
					</flowline>
				</macro>
				<macro >
					<flowline name='three' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOff' />
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='b3' />
						</command>
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='digit_to_enable' />
						</command>
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOn' />
					</flowline>
				</macro>
				<macro >
					<flowline name='eight' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOff' />
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='b8' />
						</command>
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='digit_to_enable' />
						</command>
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOn' />
					</flowline>
				</macro>
				<macro >
					<flowline name='nine' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOff' />
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='b9' />
						</command>
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='digit_to_enable' />
						</command>
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOn' />
					</flowline>
				</macro>
				<macro >
					<flowline name='two' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOff' />
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='b2' />
						</command>
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='digit_to_enable' />
						</command>
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOn' />
					</flowline>
				</macro>
				<macro >
					<flowline name='five' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOff' />
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='b5' />
						</command>
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='SendChar' >
							<argument exp='digit_to_enable' />
						</command>
						<command class_type='call' title='Call Component Macro' component='Latch' macro='TurnOn' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='delay' title='Delay' exp='1000' type='1' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='delay = 200' />
						</command>
						<command class_type='call' title='Call Component Macro' component='SPI_Master1' macro='Initialise' />
						<command class_type='delay' title='Delay' exp='delay' type='1' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='// Digit select' />
							<exp exp='dig1 = 0b0000001' />
							<exp exp='dig2 = 0b0000010' />
							<exp exp='dig3 = 0b0000100' />
							<exp exp='dig4 = 0b0001000' />
							<exp exp='alldigits = 0b0001111' />
						</command>
						<command class_type='calculation' title='' textarea='73,65,73,65' >
							<exp exp='// Numbers inverted and entered' />
							<exp exp='// in reverse order' />
							<exp exp='b0 = NOT 0b0111111 // 0     ok' />
							<exp exp='b1 = NOT 0b0000110 // 1     ok' />
							<exp exp='b2 = NOT 0b1011011 // 2     ok' />
							<exp exp='b3 = NOT 0b1001111 // 3     ok' />
							<exp exp='b4 = NOT 0b1100110 // 4     ok' />
							<exp exp='b5 = NOT 0b1101101 // 5     ok' />
							<exp exp='b6 = NOT 0b1111101 // 6     ok' />
							<exp exp='b7 = NOT 0b0000111 // 7     ok' />
							<exp exp='b8 = NOT 0b1111111 // 8     ok' />
							<exp exp='b9 = NOT 0b1101111 // 9     ok' />
						</command>
						<command class_type='loop' title='Loop' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Call Macro' macro='start_count' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='7fdaec78-394e-4ec9-a578-4f1a12a12076' vmin='1' vmaj='1' codename='Latch' x='-40' y='40' z='-3.85' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTD.4' />
					<value target='polarity' data='001' />
					<value target='on_color' data='8453975' />
					<value target='show_label' data='002' />
					<value target='label_property' data='pin' />
					<value target='label_color' data='16777215' />
					<value target='label_scale' data='1.000000' />
					<value target='label_auto_scale' data='0' />
					<value target='label_position' data='003' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='96862c4d-debc-45fa-9433-74711a4b9a3b' vmin='3' vmaj='1' codename='SPI_Master1' x='0' y='40' z='0.755' xsz='60' ysz='26' zsz='1.51' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='000' />
					<value target='PR_SCALE' data='016' />
					<value target='CKP' data='000' />
					<value target='CKE' data='001' />
					<value target='SMP' data='000' />
					<value target='MOSI' data='$PORTB.0' />
					<value target='MISO' data='$PORTB.4' />
					<value target='CLK' data='$PORTD.7' />
					<value target='MosiRemap' data='' />
					<value target='MisoRemap' data='' />
					<value target='ClkRemap' data='' />
					<value target='label' data='SPI  Master' />
					<value target='ScopeTraces' data='0' />
					<value target='ConsoleData' data='0' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAJQQAAD0CAAA' zoom='75' scrollx='0' scrolly='135' flags='0' />
		<view type='0' name='nine' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAJQQAAD0CAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='count' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAJQQAAD0CAAA' zoom='75' scrollx='0' scrolly='42' flags='0' />
		<view type='0' name='zero' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAJQQAAD0CAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='start_count' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAJQQAAD0CAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='three' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAJQQAAD0CAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='two' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAJQQAAD0CAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='one' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAJQQAAD0CAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='eight' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAJQQAAD0CAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='seven' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAJQQAAD0CAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='six' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAJQQAAD0CAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='five' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAJQQAAD0CAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='four' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAJQQAAD0CAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
