<root>
<document scada='0' projtype='1' schema='103' license='1,79829088,Q2XNNM' title='New Embedded Project' description='' fcversion='720897' target='PIC.18F.18F252' >
	<config data='!0,ffff!10,ffff!20,ffff!30,ffff!40,ffff!50,ffff!60,ffff%8,7%d,1%10,1%11,1%12,3%18,1%19,7%28,1%30,1%32,1%37,1%40,1%41,1%42,1%43,1%4f,1%4e,1%50,1%51,1%52,1%53,1%5f,1%5e,1%5d,1%60,1%61,1%62,1%63,1%6e,1' clkspd='19660800' simspd='0' usewdt='0' constif='0' commport='6' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='display_buffer' />
	</debug>
	<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='1' />
			<data name='ClockPin' value='6' />
			<data name='DataPort' value='1' />
			<data name='DataPin' value='7' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='9' />
			<data name='CalculatedCommsDelay' value='9' />
			<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='25' fixedy='25' fixedz='25' headcode='0' />
		<definition guid='b497f8d5-c55a-4e6a-9398-825abb3bdedb' vstate='40' vmin='0' vmaj='1' srcleaf='max7219x16_component.fcfx' visiblename='Display4x4Max7219' description='A small component to allow use of 32 x 32 LED display with 16 max7219 drivers.
Currently limited to &apos;plot&apos; to draw pixels' category='Development' category2='' category3='' bIs2dOnly='0' bIs3dOnly='0' bIsWysiwyg='0' catenable='1' author='' manuname='' manucode='' sysinfo='1049355' keywords='max7219|LED|grid|display' dynamic='1' scadaCompatible='0' embeddedCompatible='1' showmacros='1' iconpath='' />
		<component class_type='root' codename='Display4x4Max7219' panelId='-1' 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' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
			<resources />
			<properties >
				<property name='Width' target='width' typeid='21' hidden='0' locked='1' info='' />
				<property name='Height' target='height' typeid='21' hidden='0' locked='1' info='' />
				<property name='Connections' folder='SPI_Master1::#00000008' hidden='0' >
					<property name='Channel' target='SPI_Master1::cal_spi::CHANNEL' typeid='16' hidden='0' locked='0' info='SPI Channel selector' filter='000Software
001Channel 1
' />
					<property name='MOSI' target='SPI_Master1::cal_spi::MOSI' typeid='5' hidden='0' locked='1' info='SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.' />
					<property name='MOSI Remap Pin' target='SPI_Master1::cal_spi::MOSIPins' typeid='16' hidden='1' locked='0' info='Select which the target pin to assign the MOSI hardware pin functionality.' filter='000$PORTB.0 (GPIO32)
001$PORTB.1 (GPIO33)
002$PORTA.25 (GPIO25)
003$PORTA.26 (GPIO26)
004$PORTA.27 (GPIO27)
005$PORTA.14 (GPIO14)
006$PORTA.12 (GPIO12)
007$PORTA.13 (GPIO13)
008$PORTA.15 (GPIO15)
009$PORTA.2 (GPIO2)
010$PORTA.0 (GPIO0)
011$PORTA.4 (GPIO4)
012$PORTA.16 (GPIO16)
013$PORTA.17 (GPIO17)
014$PORTA.5 (GPIO5)
015$PORTA.18 (GPIO18)
016$PORTA.19 (GPIO19)
017$PORTA.21 (GPIO21)
018$PORTA.3 (GPIO3)
019$PORTA.1 (GPIO1)
020$PORTA.22 (GPIO22)
021$PORTA.23 (GPIO23)' />
					<property name='MISO' target='SPI_Master1::cal_spi::MISO' typeid='5' hidden='0' locked='1' info='SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.' />
					<property name='MISO Remap Pin' target='SPI_Master1::cal_spi::MISOPins' typeid='16' hidden='1' locked='0' info='Select which the target pin to assign the MISO hardware pin functionality.' filter='036$PORTB.4 (GPIO36)
039$PORTB.7 (GPIO39)
034$PORTB.2 (GPIO34)
035$PORTB.3 (GPIO35)
032$PORTB.0 (GPIO32)
033$PORTB.1 (GPIO33)
025$PORTA.25 (GPIO25)
026$PORTA.26 (GPIO26)
027$PORTA.27 (GPIO27)
014$PORTA.14 (GPIO14)
012$PORTA.12 (GPIO12)
013$PORTA.13 (GPIO13)
015$PORTA.15 (GPIO15)
002$PORTA.2 (GPIO2)
000$PORTA.0 (GPIO0)
004$PORTA.4 (GPIO4)
016$PORTA.16 (GPIO16)
017$PORTA.17 (GPIO17)
005$PORTA.5 (GPIO5)
018$PORTA.18 (GPIO18)
019$PORTA.19 (GPIO19)
021$PORTA.21 (GPIO21)
003$PORTA.3 (GPIO3)
001$PORTA.1 (GPIO1)
022$PORTA.22 (GPIO22)
023$PORTA.23 (GPIO23)' />
					<property name='CLK' target='SPI_Master1::cal_spi::CLK' typeid='5' hidden='0' locked='1' info='SPI Clock Pin CLK - The Clock signal is driven by the SPI master.' />
					<property name='CLK Remap Pin' target='SPI_Master1::cal_spi::CLKPins' typeid='16' hidden='1' locked='0' info='Select which the target pin to assign the CLK hardware pin functionality.' filter='000$PORTB.0 (GPIO32)
001$PORTB.1 (GPIO33)
002$PORTA.25 (GPIO25)
003$PORTA.26 (GPIO26)
004$PORTA.27 (GPIO27)
005$PORTA.14 (GPIO14)
006$PORTA.12 (GPIO12)
007$PORTA.13 (GPIO13)
008$PORTA.15 (GPIO15)
009$PORTA.2 (GPIO2)
010$PORTA.0 (GPIO0)
011$PORTA.4 (GPIO4)
012$PORTA.16 (GPIO16)
013$PORTA.17 (GPIO17)
014$PORTA.5 (GPIO5)
015$PORTA.18 (GPIO18)
016$PORTA.19 (GPIO19)
017$PORTA.21 (GPIO21)
018$PORTA.3 (GPIO3)
019$PORTA.1 (GPIO1)
020$PORTA.22 (GPIO22)
021$PORTA.23 (GPIO23)' />
					<property name='Use Auto CS' target='SPI_Master1::cal_spi::UseAutoCS' typeid='7' hidden='0' locked='0' info='Allow the SPI component to manage the CS pin for us in Master mode.
On initialise the CS pin is automatically set high to disable the remote SPI device.
' />
					<property name='CS / SS' target='SPI_Master1::cal_spi::SS' typeid='5' hidden='0' locked='0' info='Chip Select / Slave Select Pin 
Master Mode: General purpose output pin used to select the remote SPI device.
Slave Mode: Hardware chip select pin input used to select the SPI device.
' />
				</property>
				<property name='Bus Settings' folder='SPI_Master1::property_1' hidden='0' >
					<property name='Prescale' target='SPI_Master1::cal_spi::PR_SCALE' typeid='16' hidden='0' locked='0' info='Prescale option selector' filter='004Fosc/4
016Fosc/16
064Fosc/64' />
					<property name='Clock Phase' target='SPI_Master1::cal_spi::CKE' typeid='16' hidden='0' locked='0' info='Clock Phase (data change edge) selection' filter='000Leading Edge
001Trailing Edge' />
					<property name='Clock Polarity' target='SPI_Master1::cal_spi::CKP' typeid='16' hidden='0' locked='0' info='Clock Polarity setting, inactive (idle) state' filter='000Idle Low
001Idle High' />
					<property name='Sample Point' target='SPI_Master1::cal_spi::SMP' typeid='16' hidden='0' locked='0' info='Data bit read sample point' filter='000Middle
001End' />
				</property>
			</properties>
			<values >
				<value target='width' data='32' />
				<value target='height' data='32' />
				<value target='SPI_Master1::cal_spi::CHANNEL' data='001' />
				<value target='SPI_Master1::cal_spi::MOSI' data='$PORTC.5' />
				<value target='SPI_Master1::cal_spi::MOSIPins' data='021' />
				<value target='SPI_Master1::cal_spi::MISO' data='$PORTC.4' />
				<value target='SPI_Master1::cal_spi::MISOPins' data='019' />
				<value target='SPI_Master1::cal_spi::CLK' data='$PORTC.3' />
				<value target='SPI_Master1::cal_spi::CLKPins' data='017' />
				<value target='SPI_Master1::cal_spi::UseAutoCS' data='1' />
				<value target='SPI_Master1::cal_spi::SS' data='$PORTA.3' />
				<value target='SPI_Master1::cal_spi::PR_SCALE' data='004' />
				<value target='SPI_Master1::cal_spi::CKE' data='000' />
				<value target='SPI_Master1::cal_spi::CKP' data='000' />
				<value target='SPI_Master1::cal_spi::SMP' data='000' />
			</values>
			<events />
			<apis >
				<api name='Clear' alt='Clear' type='1' proto='1' />
				<api name='Plot' alt='Plot' type='1' proto='1' />
				<api name='Write' alt='Write' type='1' proto='1' />
				<api name='Refresh' alt='RefreshSim' type='1' proto='1' />
				<api name='SetIntensity' alt='SetIntensity' type='1' proto='1' />
				<api name='Initialise' alt='Initialise' type='1' proto='1' />
			</apis>
			<variables >
				<variable public='0' >
					<def class_type='variable' name='OP_INTENSITY' type='u8' description='' isconst='1' isHidden='0' isinit='1' usrinit='10' setinit='10' />
				</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='OP_SHUTDOWN' type='u8' description='' isconst='1' isHidden='0' isinit='1' usrinit='12' setinit='12' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='offsets' type='u8' description='Character offsets to centre' isconst='1' isHidden='0' isinit='1' usrinit='&quot; 0,3,0,0,0,0,0,0,0,0 &quot;' setinit='{0,3,0,0,0,0,0,0,0,0}' >
						<array size='10' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='OP_DECODEMODE' type='u8' description='' isconst='1' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='OP_SCANLIMIT' type='u8' description='' isconst='1' isHidden='0' isinit='1' usrinit='11' setinit='11' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='OP_DISPLAYTEST' type='u8' description='' isconst='1' isHidden='0' isinit='1' usrinit='15' setinit='15' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='display_buffer' type='u8' description='Buffer for the complete display - address, data' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' >
						<array size='8' />
						<array size='32' />
					</def>
				</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='Clear' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<local name='row' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='chip' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='loop' title='Loop' type='2' forvar='.row' exp='8' >
							<flowline >
								<command class_type='loop' title='Loop' type='2' forvar='.chip' exp='16' >
									<flowline >
										<command class_type='calculation' title='Calculation' >
											<exp exp='display_buffer[.row][.chip * 2] = .row + 1' />
											<exp exp='display_buffer[.row][.chip * 2 + 1] = 0' />
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Plot' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='x' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='y' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='disp' type='u32' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<local name='row' type='u32' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<command class_type='decision' title='Decision' exp='(.x &lt; width) &amp;&amp; (.y &lt; height)' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='.disp = (.x / 8) + (.y / 8) * 4' />
									<exp exp='.row = .y % 8' />
									<exp exp='display_buffer[.row][.disp*2+1] |= 1 &lt;&lt; (7 - (.x % 8))' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Write' description='Draw a character at x, y.  Character set is 16 x 16 and stored in LUT (charset)
Currently supports 0..9' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='x' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='y' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='c' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='row' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='pos' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='data' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='col' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='.pos = (.c - &apos;0&apos;) * 16' />
							<exp exp='.x = .x + offsets[.c - &apos;0&apos;]' />
						</command>
						<command class_type='loop' title='Loop' type='2' forvar='.row' exp='16' >
							<flowline >
								<command class_type='call' title='Component Macro' component='char_set' macro='GetInt' >
									<return exp='.data' />
									<argument exp='.pos + .row' />
								</command>
								<command class_type='loop' title='Loop' type='2' forvar='.col' exp='16' >
									<flowline >
										<command class_type='decision' title='Decision' exp='.data &amp; 0x8000' swap='0' >
											<flowline >
												<command class_type='call' title='User Macro' macro='Plot' >
													<argument exp='.x + .col' />
													<argument exp='.y + .row' />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='calculation' title='Calculation' >
											<exp exp='.data = .data &lt;&lt; 1' />
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Refresh' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<local name='row' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='dummy' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='64' />
						</local>
						<command class_type='loop' title='Loop' type='2' forvar='.row' exp='8' >
							<flowline >
								<command class_type='call' title='Component Macro' component='SPI_Master1' macro='Enable_CS' />
								<command class_type='call' title='Component Macro' component='SPI_Master1' macro='TransactionArray' >
									<argument exp='display_buffer[.row]' />
									<argument exp='.dummy' />
									<argument exp='32' />
								</command>
								<command class_type='call' title='Component Macro' component='SPI_Master1' macro='Disable_CS' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SendCmd' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='opCode' type='u8' description='Send a command to all the display drivers' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='data' type='u8' description='Send a command to all the display drivers' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='buf' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='32' />
						</local>
						<local name='i' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='loop' title='For each MAX7219' type='2' forvar='.i' exp='16' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='.buf[.i * 2] = .opCode' />
									<exp exp='.buf[.i * 2 + 1] = .data' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Component Macro' component='SPI_Master1' macro='Enable_CS' />
						<command class_type='call' title='Component Macro' component='SPI_Master1' macro='TransactionArray' >
							<argument exp='.buf' />
							<argument exp='.buf' />
							<argument exp='32' />
						</command>
						<command class_type='call' title='Component Macro' component='SPI_Master1' macro='Disable_CS' />
					</flowline>
				</macro>
				<macro >
					<flowline name='SetIntensity' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='level' type='u8' description='0..15' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='User Macro' macro='SendCmd' >
							<argument exp='OP_INTENSITY' />
							<argument exp='.level' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='RefreshSim' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<local name='y' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='x' type='u32' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<local name='pt' type='b1' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='disp' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<local name='row' type='u32' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<local name='pos' type='u32' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<command class_type='call' title='Component Macro' component='Canvas1' macro='Clear' />
						<command class_type='loop' title='Loop' type='2' forvar='.y' exp='32' >
							<flowline >
								<command class_type='loop' title='Loop' type='2' forvar='.x' exp='32' >
									<flowline >
										<command class_type='calculation' title='Calculation' >
											<exp exp='.disp = (.x / 8) + (.y / 8) * 4' />
											<exp exp='.row = .y % 8' />
											<exp exp='.pos = .disp * 2 + 1' />
											<exp exp='.pt = ((display_buffer[.row][.pos] &amp; (1 &lt;&lt; (7 - (.x % 8)))) != 0)' />
										</command>
										<command class_type='decision' title='Decision' exp='.pt' swap='0' >
											<flowline >
												<command class_type='sim' title='Component Macro' component='Canvas1' macro='PlotPoint' >
													<argument exp='.x' />
													<argument exp='.y' />
													<argument exp='0xff' />
												</command>
											</flowline>
											<flowline >
												<command class_type='sim' title='Component Macro' component='Canvas1' macro='PlotPoint' >
													<argument exp='.x' />
													<argument exp='.y' />
													<argument exp='0' />
												</command>
											</flowline>
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Component Macro' component='Canvas1' macro='Update' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<local name='i' type='u32' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<local name='x' type='u32' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<local name='y' type='u32' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<command class_type='call' title='User Macro' macro='Initialise' />
						<command class_type='loop' title='Loop' type='3' exp='1' >
							<flowline >
								<command class_type='call' title='User Macro' macro='Clear' />
								<command class_type='call' title='User Macro' macro='Write' >
									<argument exp='0' />
									<argument exp='0' />
									<argument exp='.i % 10 + &apos;0&apos;' />
								</command>
								<command class_type='call' title='User Macro' macro='Write' >
									<argument exp='16' />
									<argument exp='0' />
									<argument exp='(.i + 1) % 10 + &apos;0&apos;' />
								</command>
								<command class_type='call' title='User Macro' macro='Write' >
									<argument exp='0' />
									<argument exp='16' />
									<argument exp='(.i + 2) % 10 + &apos;0&apos;' />
								</command>
								<command class_type='call' title='User Macro' macro='Write' >
									<argument exp='16' />
									<argument exp='16' />
									<argument exp='(.i + 3) % 10 + &apos;0&apos;' />
								</command>
								<command class_type='calculation' title='Calculation' >
									<exp exp='.i = .i + 1' />
								</command>
								<command class_type='call' title='User Macro' macro='RefreshSim' />
								<command class_type='delay' title='Delay' textarea='36,-16,36,-16' exp='1' type='2' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Initialise' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<local name='row' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='chip' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Component Macro' component='SPI_Master1' macro='Initialise' />
						<command class_type='call' title='User Macro' macro='Clear' />
						<command class_type='call' title='User Macro' macro='SendCmd' >
							<argument exp='OP_DISPLAYTEST' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='User Macro' macro='SendCmd' >
							<argument exp='OP_SCANLIMIT' />
							<argument exp='7' />
						</command>
						<command class_type='call' title='User Macro' macro='SendCmd' >
							<argument exp='OP_DECODEMODE' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='User Macro' macro='SendCmd' >
							<argument exp='OP_SHUTDOWN' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='User Macro' macro='SendCmd' >
							<argument exp='OP_INTENSITY' />
							<argument exp='0' />
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='96862c4d-debc-45fa-9433-74711a4b9a3b' vmin='1' vmaj='2' codename='SPI_Master1' panelId='0' x='123' y='-124' z='0' xsz='25.1778' ysz='25.1392' 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='2' poslock='0' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='cal_spi::CHANNEL' data='001' />
					<value target='cal_spi::MOSI' data='$PORTC.5' />
					<value target='cal_spi::MOSIPins' data='021' />
					<value target='cal_spi::MISO' data='$PORTC.4' />
					<value target='cal_spi::MISOPins' data='019' />
					<value target='cal_spi::CLK' data='$PORTC.3' />
					<value target='cal_spi::CLKPins' data='017' />
					<value target='cal_spi::UseAutoCS' data='1' />
					<value target='cal_spi::SS' data='$PORTA.3' />
					<value target='cal_spi::PR_SCALE' data='004' />
					<value target='cal_spi::CKE' data='000' />
					<value target='cal_spi::CKP' data='000' />
					<value target='cal_spi::SMP' data='000' />
					<value target='label' data='SPI  Master' />
					<value target='cal_spi::ScopeTraces' data='1' />
					<value target='cal_spi::ConsoleData' data='1' />
					<value target='cal_spi::Injector' data='000' />
					<value target='cal_spi::InjectorCS' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='GdiCanvas' codename='Canvas1' panelId='0' x='190' y='-460' z='1' xsz='87.5' ysz='81.25' zsz='0' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='8' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='46' >
				<resources />
				<properties />
				<values >
					<value target='nWidth' data='32' />
					<value target='nHeight' data='32' />
					<value target='nStyle' data='  1' />
					<value target='bLockAspect' data='1' />
					<value target='colBackground' data='0' />
					<value target='colForeground' data='255' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='dfb4d07a-3d70-45d5-83ef-07e3c95d86ab' vmin='8' vmaj='1' codename='char_set' panelId='0' x='116' y='-116' z='2' 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='2' poslock='0' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='Enabled' data='1' />
					<value target='StorageType' data='001' />
					<value target='Sign' data='000' />
					<value target='intfixed' data='0x1FFC, 0x3FFE, 0x3C3E, 0x381E,
0x381E, 0x381E, 0x381E, 0x381E,
0x381E, 0x381E, 0x381E, 0x381E,
0x381E, 0x3C3E, 0x3FFE, 0x0000,
0x0200, 0x0600, 0x0E00, 0x1E00,
0x0600, 0x0600, 0x0600, 0x0600,
0x0600, 0x0600, 0x0600, 0x0600,
0x0600, 0x1F80, 0x1F80, 0x0000,
0x1FFC, 0x3FFE, 0x301E, 0x001E,
0x001E, 0x003C, 0x0078, 0x00F0,
0x01E0, 0x03C0, 0x0780, 0x0F00,
0x1E00, 0x3FFE, 0x3FFE, 0x0000,
0x1FFC, 0x3FFE, 0x301E, 0x001E,
0x001E, 0x03FC, 0x03FC, 0x001E,
0x001E, 0x001E, 0x001E, 0x001E,
0x301E, 0x3FFE, 0x1FFC, 0x0000,
0x003C, 0x007C, 0x00FC, 0x01DC,
0x039C, 0x071C, 0x0E1C, 0x1C1C,
0x381C, 0x7FFE, 0x7FFE, 0x001C,
0x001C, 0x001C, 0x001C, 0x0000,
0x3FFE, 0x3FFE, 0x3800, 0x3800,
0x3800, 0x3FFC, 0x3FFE, 0x001E,
0x001E, 0x001E, 0x001E, 0x001E,
0x301E, 0x3FFE, 0x1FFC, 0x0000,
0x0FFC, 0x1FFE, 0x3C00, 0x3800,
0x3800, 0x3FFC, 0x3FFE, 0x3C1E,
0x381E, 0x381E, 0x381E, 0x381E,
0x381E, 0x3FFE, 0x1FFC, 0x0000,
0x3FFE, 0x3FFE, 0x001E, 0x003C,
0x003C, 0x0078, 0x00F0, 0x00F0,
0x01E0, 0x01E0, 0x03C0, 0x03C0,
0x0780, 0x0780, 0x0780, 0x0000,
0x1FFC, 0x3FFE, 0x3C3E, 0x381E,
0x381E, 0x3C3E, 0x1FFC, 0x1FFC,
0x3C3E, 0x381E, 0x381E, 0x381E,
0x3C3E, 0x3FFE, 0x1FFC, 0x0000,
0x1FFC, 0x3FFE, 0x3C3E, 0x381E,
0x381E, 0x381E, 0x3C3E, 0x3FFE,
0x1FFE, 0x001E, 0x001E, 0x001E,
0x001E, 0x3FFC, 0x1FF8, 0x0000' />
					<value target='floatfixed' data='0x1FFC, 0x3FFE, 0x3C3E, 0x381E
0x381E, 0x381E, 0x381E, 0x381E
0x381E, 0x381E, 0x381E, 0x381E
0x381E, 0x3C3E, 0x3FFE, 0x0000
0x0200, 0x0600, 0x0E00, 0x1E00
0x0600, 0x0600, 0x0600, 0x0600
0x0600, 0x0600, 0x0600, 0x0600
0x0600, 0x1F80, 0x1F80, 0x0000
0x1FFC, 0x3FFE, 0x301E, 0x001E
0x001E, 0x003C, 0x0078, 0x00F0
0x01E0, 0x03C0, 0x0780, 0x0F00
0x1E00, 0x3FFE, 0x3FFE, 0x0000
0x1FFC, 0x3FFE, 0x301E, 0x001E
0x001E, 0x03FC, 0x03FC, 0x001E
0x001E, 0x001E, 0x001E, 0x001E
0x301E, 0x3FFE, 0x1FFC, 0x0000
0x003C, 0x007C, 0x00FC, 0x01DC
0x039C, 0x071C, 0x0E1C, 0x1C1C
0x381C, 0x7FFE, 0x7FFE, 0x001C
0x001C, 0x001C, 0x001C, 0x0000
0x3FFE, 0x3FFE, 0x3800, 0x3800
0x3800, 0x3FFC, 0x3FFE, 0x001E
0x001E, 0x001E, 0x001E, 0x001E
0x301E, 0x3FFE, 0x1FFC, 0x0000
0x0FFC, 0x1FFE, 0x3C00, 0x3800
0x3800, 0x3FFC, 0x3FFE, 0x3C1E
0x381E, 0x381E, 0x381E, 0x381E
0x381E, 0x3FFE, 0x1FFC, 0x0000
0x3FFE, 0x3FFE, 0x001E, 0x003C
0x003C, 0x0078, 0x00F0, 0x00F0
0x01E0, 0x01E0, 0x03C0, 0x03C0
0x0780, 0x0780, 0x0780, 0x0000
0x1FFC, 0x3FFE, 0x3C3E, 0x381E
0x381E, 0x3C3E, 0x1FFC, 0x1FFC
0x3C3E, 0x381E, 0x381E, 0x381E
0x3C3E, 0x3FFE, 0x1FFC, 0x0000
0x1FFC, 0x3FFE, 0x3C3E, 0x381E
0x381E, 0x381E, 0x3C3E, 0x3FFE
0x1FFE, 0x001E, 0x001E, 0x001E
0x001E, 0x3FFC, 0x1FF8, 0x0000' />
					<value target='NumVals' data='160' />
					<value target='EmbedIntoC' data='1' />
				</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='0' ye='0' ze='576.121' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='267' dy='1556' zoom='56.0768' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='7360576' />
		<winpos ID='7005' RectRecentFloat='519,283,1169,733' RectRecentDocked='0,0,267,1606' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</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' />
		<winpos ID='7004' RectRecentFloat='551,299,1201,749' RectRecentDocked='0,0,376,1690' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel3d>
	<panels2d count='1' >
		<panel2d_0 id='0' name='2D Panel' type='0' >
			<winpos ID='1171' RectRecentFloat='1298,663,3295,2160' RectRecentDocked='3198,328,3840,2018' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='1' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
			<background fill='288230376151053813' showgrid='1' gridstyle='1' gridsize='10' gridbrush='71776119075691740' snaptogrid='1' fitcomp='0' disp_x='300' disp_y='400' scale='100' disp_col='16777215' />
		</panel2d_0>
	</panels2d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAzAAAAcgoAAJUGAAA' zoom='190' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Initialise' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAzAAAAcgoAAJUGAAA' zoom='220' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Refresh' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAzAAAAcgoAAJUGAAA' zoom='180' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SendCmd' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAzAAAAcgoAAJUGAAA' zoom='180' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Clear' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAzAAAAcgoAAJUGAAA' zoom='135' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetIntensity' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAzAAAAcgoAAJUGAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Write' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAzAAAAcgoAAJUGAAA' zoom='220' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='RefreshSim' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAzAAAAcgoAAJUGAAA' zoom='220' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Plot' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAzAAAAcgoAAJUGAAA' zoom='260' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
