<root>
<document scada='0' schema='103' license='1,29702036,2UQF2A' title='' description='' fcversion='655618' target='PIC.16F.16F1939' >
	<config data='!0,2fc4!10,1333%0,4%3,0%5,0%6,1%7,1%8,1%9,3%b,1%c,0%d,1%10,3%14,3%18,1%19,1%1a,0%1c,1%1d,0' clkspd='32000000' simspd='1' usewdt='0' constif='0' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='i' />
		<watch expr='ReadPort' />
		<watch expr='PCF_data' />
		<watch expr='ReadPort_U8' />
		<watch expr='KEY' />
	</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='6' />
			<data name='CalculatedCommsDelay' value='6' />
			<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='6364d08a-acfd-44b3-9b2e-87465f265e69' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' category2='' category3='' bIs2dOnly='0' bIs3dOnly='0' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='1' scadaCompatible='0' embeddedCompatible='1' showmacros='1' iconpath='' />
		<component class_type='root' codename='ComponentRoot' 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' comp2dType='0' >
			<resources />
			<properties >
				<property name='External Address' target='PCF8575::ExtAddress' typeid='16' hidden='0' locked='0' info='Selects the value of the three address pins for the MCP23S17.' filter='0000 (0, 0, 0)
0011 (0, 0, 1)
0022 (0, 1, 0)
0033 (0, 1, 1)
0044 (1, 0, 0)
0055 (1, 0, 1)
0066 (1, 1, 0)
0077 (1, 1, 1)' />
				<property name='Device Type' target='PCF8575::DeviceType' typeid='16' hidden='0' locked='0' info='' filter='032PCF8575' />
			</properties>
			<values >
				<value target='PCF8575::ExtAddress' data='000' />
				<value target='PCF8575::DeviceType' data='032' />
			</values>
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='KEY_OLD' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='ReadPort' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='b' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='led' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='a' type='u16' 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='KEY' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='255' setinit='0xFF' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='M0' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='M0_OLD' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='KEY_1_OLD' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Response' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='OUTS' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Timer3' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Timer2' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='KEY_2_OLD' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Timer1' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='KEY_2' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='255' setinit='0xFF' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='KEY_1' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='l' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='STR_2' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='4' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='PCF_data' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='STR_1' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='4' />
					</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>
				<variable public='0' >
					<def class_type='variable' name='i' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='LedsOff' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<local name='j' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
							<exp exp='.j = 1' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' type='0' exp='.j &lt; 9' >
							<flowline >
								<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='SendToMAX7219' >
									<argument exp='.j' />
									<argument exp='0' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
									<exp exp='.j = .j + 1' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='40' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='OLED_Disp_Key' 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='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Clear' />
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Cursor' >
							<argument exp='7' />
							<argument exp='0' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='KEY = 255' swap='0' >
							<flowline >
								<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintString' >
									<argument exp='&quot;NO KEY&quot;' />
								</command>
							</flowline>
							<flowline >
								<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='KEY = 254' swap='0' >
									<flowline >
										<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Cursor' >
											<argument exp='0' />
											<argument exp='0' />
										</command>
										<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintString' >
											<argument exp='&quot;Pressed two keys&quot;' />
										</command>
										<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Cursor' >
											<argument exp='0' />
											<argument exp='1' />
										</command>
										<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintString' >
											<argument exp='&quot;in same line !!!&quot;' />
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
											<exp exp='STR_1 = ToString$(KEY)' />
										</command>
										<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintString' >
											<argument exp='&quot;KEY = &quot;' />
										</command>
										<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintString' >
											<argument exp='STR_1' />
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Cursor' >
							<argument exp='7' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintString' >
							<argument exp='&quot;a = &quot;' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintNumber' >
							<argument exp='a' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Cursor' >
							<argument exp='7' />
							<argument exp='2' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintString' >
							<argument exp='&quot;b = &quot;' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintNumber' >
							<argument exp='b' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Cursor' >
							<argument exp='0' />
							<argument exp='3' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintString' >
							<argument exp='&quot;Out&apos;s = &quot;' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
							<exp exp='STR_2 = ToString$(OUTS)' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintString' >
							<argument exp='STR_2' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SendToMAX7219' description='Adres rejestru MAX7219 i dane do zapisania w rejestrze.' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='Address' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Data' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='i' type='s16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='comment' title='' comment='Pins description:
CLK -&gt; RD6
CS -&gt; RD3
DOUT -&gt; RD2' textarea='12,0,12,0' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' />
						<command class_type='output' title='Output' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' mode='1' port='1048579' mask='8' exp='false' usechipref='1' />
						<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
							<exp exp='.i = 7' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' type='0' exp='.i &gt;= 0' >
							<flowline >
								<command class_type='output' title='Output' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' mode='1' port='1048579' mask='4' exp='(.Address &gt;&gt; .i) &amp; 0x01' usechipref='1' />
								<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
									<exp exp='.i = .i - 1' />
								</command>
								<command class_type='output' title='Output' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' mode='1' port='1048579' mask='64' exp='true' usechipref='1' />
								<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='1' type='0' />
								<command class_type='output' title='Output' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' mode='1' port='1048579' mask='64' exp='false' usechipref='1' />
								<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='1' type='0' />
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
							<exp exp='.i = 7' />
							<exp exp='.Address = 0' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' type='0' exp='.i &gt;= 0' >
							<flowline >
								<command class_type='output' title='Output' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' mode='1' port='1048579' mask='4' exp='(.Data &gt;&gt; .i) &amp; 0x01' usechipref='1' />
								<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
									<exp exp='.i = .i - 1' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='1' type='0' />
								<command class_type='output' title='Output' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' mode='1' port='1048579' mask='64' exp='true' usechipref='1' />
								<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='1' type='0' />
								<command class_type='output' title='Output' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' mode='1' port='1048579' mask='64' exp='false' usechipref='1' />
								<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='1' type='0' />
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
							<exp exp='.Data = 0' />
						</command>
						<command class_type='output' title='Output' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' mode='1' port='1048579' mask='8' exp='true' usechipref='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Keyb_pooling' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<local name='a' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
							<exp exp='PCF_data = 0xFF00' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='PCF8575' macro='WritePort' >
							<argument exp='PCF_data' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='50' type='0' />
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='PCF8575' macro='ReadPort' >
							<return exp='ReadPort' />
						</command>
						<command class_type='decision' title='Keyb_pressed' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='(ReadPort &amp; 0xFF00) != 0xFF00' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
									<exp exp='i = 0' />
									<exp exp='' />
								</command>
								<command class_type='loop' title='Loop' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' type='0' exp='i &lt; 8' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
											<exp exp='PCF_data = 0xFFFF' />
											<exp exp='PCF_data = PCF_data &amp;  ~(1 &lt;&lt; i)' />
										</command>
										<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='PCF8575' macro='WritePort' >
											<argument exp='PCF_data' />
										</command>
										<command class_type='delay' title='Delay' disable='1' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='300' type='0' />
										<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='PCF8575' macro='ReadPort' >
											<return exp='ReadPort' />
										</command>
										<command class_type='comment' title='' comment='b11111110 = 0xFE
b11111100 = 0xFC
b11111000 = 0xF8
b11110000 = 0xF0
b11100000 = 0xE0
b11000000 = 0xC0
b10000000 = 0x80
b00000000 = 0x00

b11111110 = 0xFE
b11111101 = 0xFD
b11111011 = 0xFB
b11110111 = 0xF7
b11101111 = 0xEF
b11011111 = 0xDF
b10111111 = 0xBF
b01111111 = 0x7F' textarea='12,0,12,0' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' />
										<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='(ReadPort &amp; 0xFF00) != 0xFF00' swap='0' >
											<flowline >
												<command class_type='switch' title='Switch' textarea='36,25,36,25' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='(ReadPort &amp; 0x00FF)' >
													<case >
														<flowline />
													</case>
													<case exp='0x00FE' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = 0' />
															</command>
														</flowline>
													</case>
													<case exp='0x00FD' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = 1' />
															</command>
														</flowline>
													</case>
													<case exp='0x00FB' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = 2' />
															</command>
														</flowline>
													</case>
													<case exp='0x00F7' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = 3' />
															</command>
														</flowline>
													</case>
													<case exp='0x00EF' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = 4' />
															</command>
														</flowline>
													</case>
													<case exp='0x00DF' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = 5' />
															</command>
														</flowline>
													</case>
													<case exp='0x00BF' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = 6' />
															</command>
														</flowline>
													</case>
													<case exp='0x007F' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = 7' />
															</command>
														</flowline>
													</case>
												</command>
												<command class_type='switch' title='Switch' textarea='36,25,36,25' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='(ReadPort &amp; 0xFF00)' >
													<case >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = 254' />
															</command>
														</flowline>
													</case>
													<case exp='0xFE00' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = KEY + 0' />
															</command>
														</flowline>
													</case>
													<case exp='0xFD00' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = KEY + 8' />
																<exp exp='' />
															</command>
														</flowline>
													</case>
													<case exp='0xFB00' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = KEY + 16' />
																<exp exp='' />
															</command>
														</flowline>
													</case>
													<case exp='0xF700' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = KEY + 24' />
															</command>
														</flowline>
													</case>
													<case exp='0xEF00' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = KEY + 32' />
															</command>
														</flowline>
													</case>
													<case exp='0xDF00' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = KEY + 40' />
															</command>
														</flowline>
													</case>
													<case exp='0xBF00' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = KEY + 48' />
															</command>
														</flowline>
													</case>
													<case exp='0x7F00' >
														<flowline >
															<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
																<exp exp='KEY = KEY + 56' />
															</command>
														</flowline>
													</case>
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
											<exp exp='i = i + 1' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
									<exp exp='KEY = 255' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='OLED_INIT' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='500' type='1' />
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Command' >
							<argument exp='0x39' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Command' >
							<argument exp='0x17' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Command' >
							<argument exp='0x0C' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Command' >
							<argument exp='0x01' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Command' >
							<argument exp='0x02' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Command' >
							<argument exp='0x06' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Command' >
							<argument exp='0x01' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='7' type='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='LedsOn' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<local name='j' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
							<exp exp='.j = 1' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' type='0' exp='.j &lt; 9' >
							<flowline >
								<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='SendToMAX7219' >
									<argument exp='.j' />
									<argument exp='0xFF' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
									<exp exp='.j = .j + 1' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='40' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='InitMAX7219' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='comment' title='' comment='Pins description:
CLK -&gt; RD6
CS -&gt; RD3
DOUT -&gt; RD2' textarea='12,0,12,0' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' />
						<command class_type='output' title='Output' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' mode='1' port='1048579' mask='8' exp='1' usechipref='1' />
						<command class_type='output' title='Output' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' mode='1' port='1048579' mask='4' exp='0' usechipref='1' />
						<command class_type='output' title='Output' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' mode='1' port='1048579' mask='64' exp='0' usechipref='1' />
						<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='500' type='1' />
						<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='SendToMAX7219' >
							<argument exp='0x0C' />
							<argument exp='1' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='1' type='1' />
						<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='SendToMAX7219' >
							<argument exp='0x0B' />
							<argument exp='7' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='1' type='1' />
						<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='SendToMAX7219' >
							<argument exp='0x09' />
							<argument exp='0x00' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='1' type='1' />
						<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='SendToMAX7219' >
							<argument exp='0x0A' />
							<argument exp='0x0A' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='TIMERS' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<local name='n' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
							<exp exp='.n = Timer1' />
							<exp exp='Timer1 = .n - 1' />
							<exp exp='' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
							<exp exp='.n = Timer2' />
							<exp exp='Timer2 = .n - 1' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
							<exp exp='.n = Timer3' />
							<exp exp='Timer3 = .n - 1' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='LOGO' 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='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Clear' />
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Cursor' >
							<argument exp='8' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintString' >
							<argument exp='&quot;Hello&quot;' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Cursor' >
							<argument exp='3' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintString' >
							<argument exp='&quot;Have a nice day&quot;' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Cursor' >
							<argument exp='8' />
							<argument exp='2' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintString' >
							<argument exp='&quot;LASKA&quot;' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Cursor' >
							<argument exp='7' />
							<argument exp='3' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='PrintString' >
							<argument exp='&quot;Austria&quot;' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='3' type='2' />
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='OLED_8BIT' macro='Clear' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='native' title='Code' ccode='// Enter C code below this comment
OSCCONbits.SCS = 0b00;
OSCCONbits.IRCF = 0b1110;' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' language='C' />
						<command class_type='output' title='P_ON_MAX7219_&amp;_OLED' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' mode='1' port='1048576' mask='2' exp='false' usechipref='1' />
						<command class_type='call' title='User Macro' textarea='39,-7,39,-7' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='InitMAX7219' />
						<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='LedsOff_no_delay' />
						<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='LedsOn' />
						<command class_type='delay' title='Delay' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='500' type='1' />
						<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='LedsOff' />
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='PCF8575' macro='Initialise' />
						<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='OLED_INIT' />
						<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='LOGO' />
						<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
							<exp exp='Timer1 = 61' />
							<exp exp='Timer2 = 30' />
							<exp exp='Timer3 = 20' />
							<exp exp='a = 1' />
							<exp exp='b = 1' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='ModbusMaster1' macro='Initialise' />
						<command class_type='interrupt' title='Interrupt' ccode='  // Interrupt, Type: Interrupt: Enable TMR0
  /*T0CON1 = (T0CON1 &amp; 0x1F) | 0x60;
  cr_bit(T0CON1,T0ASYNC);
  T0CON1 = (T0CON1 &amp; 0xF0) | 0x00;
  T0CON0 = 0x90;*/
  T0CON1 = 0x58;
  T0CON0 = 0x80;
  st_bit(INTCON,GIE);
  st_bit(PIE0, TMR0IE);' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' enable='1' name='TMR0' call='TIMERS' >
							<settings timer='1' prescale='256' postscale='-1' rollover='-1' bitcount='-1' trigger='3' ppsport='-1' ppspin='-1' maskhi='AAAAAAD-------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='AAAAAAD-------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='1' />
								<option value='1' />
								<option value='8' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
							</settings>
						</command>
						<command class_type='loop' title='Loop' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' type='0' exp='1' >
							<flowline >
								<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='!Timer1' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
											<exp exp='Timer1 = 15' />
											<exp exp='led =  !led' />
										</command>
										<command class_type='output' title='Output' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' mode='1' port='1048576' mask='1' exp='led' usechipref='1' />
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='!Timer2' swap='0' >
									<flowline >
										<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='ModbusMaster1' macro='ReadCoil' >
											<return exp='OUTS' />
											<argument exp='1' />
											<argument exp='514' />
											<argument exp='1' />
										</command>
										<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
											<exp exp='Timer2 = 130' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='Decision' ccode='    // Decision, Type: Decision: !Timer2?
    if (!FCV_TIMER2)
    {
' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='M0 != M0_OLD' swap='0' >
									<flowline >
										<command class_type='call' title='Component Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' component='ModbusMaster1' macro='SetCoil' >
											<argument exp='1' />
											<argument exp='9728' />
											<argument exp='M0' />
										</command>
										<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
											<exp exp='M0_OLD = M0' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='!Timer3' swap='0' >
									<flowline >
										<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='Keyb_pooling' />
										<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
											<exp exp='Timer3 = 24' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='(KEY_OLD != KEY)' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
											<exp exp='KEY_OLD = KEY' />
											<exp exp='' />
										</command>
										<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
											<exp exp='M0 = 1' />
										</command>
										<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
											<exp exp='KEY_1 = KEY' />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='(KEY_1_OLD == 39) &amp;&amp; (KEY_1 == 255)' swap='0' >
											<flowline >
												<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='a &lt; 8' swap='0' >
													<flowline >
														<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
															<exp exp='a = a + 1' />
														</command>
													</flowline>
													<flowline />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='(KEY_1_OLD == 38) &amp;&amp; (KEY_1 == 255)' swap='0' >
											<flowline >
												<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='a &gt; 1' swap='0' >
													<flowline >
														<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
															<exp exp='a = a - 1' />
														</command>
													</flowline>
													<flowline />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='(KEY_1_OLD == 23) &amp;&amp; (KEY_1 == 255)' swap='0' >
											<flowline >
												<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='b &lt; 256' swap='0' >
													<flowline >
														<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
															<exp exp='b = b + 1' />
														</command>
													</flowline>
													<flowline />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='(KEY_1_OLD == 22) &amp;&amp; (KEY_1 == 255)' swap='0' >
											<flowline >
												<command class_type='decision' title='Decision' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' exp='b &gt; 1' swap='0' >
													<flowline >
														<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
															<exp exp='b = b - 1' />
														</command>
													</flowline>
													<flowline />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
											<exp exp='KEY_1_OLD = KEY_1' />
										</command>
										<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='LedsOff_no_delay' />
										<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='SendToMAX7219' >
											<argument exp='a' />
											<argument exp='b' />
										</command>
										<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='OLED_Disp_Key' />
									</flowline>
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
											<exp exp='M0 = 0' />
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='LedsOff_no_delay' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<local name='j' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
							<exp exp='.j = 1' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' type='0' exp='.j &lt; 9' >
							<flowline >
								<command class_type='call' title='User Macro' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' macro='SendToMAX7219' >
									<argument exp='.j' />
									<argument exp='0' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='8379903' cmdcolor_sec='14942207' cmdcolor_txt='0' cmdgradient='2' cmdopacity='1' >
									<exp exp='.j = .j + 1' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='4616b658-531f-4c5e-981a-4d9fc04f9a36' vmin='0' vmaj='1' codename='PCF8575' panelId='0' x='77' y='-69' 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='2' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='DeviceType' data='032' />
					<value target='ExtAddress' data='000' />
					<value target='cal_i2c1::CHANNEL' data='001' />
					<value target='cal_i2c1::StopDel' data='0' />
					<value target='cal_i2c1::BAUD_LIST' data='002' />
					<value target='cal_i2c1::BAUD' data='400000' />
					<value target='cal_i2c1::SDA' data='$PORTC.4' />
					<value target='cal_i2c1::SDAPins' data='029' />
					<value target='cal_i2c1::SCL' data='$PORTC.3' />
					<value target='cal_i2c1::SCLPins' data='028' />
					<value target='label' data='PCF8575' />
					<value target='cal_i2c1::ScopeTraces' data='0' />
					<value target='cal_i2c1::ConsoleData' data='0' />
					<value target='cal_i2c1::Injector' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='47f6b39b-ead7-40f5-9931-8a79aa54014a' vmin='1' vmaj='2' codename='ModbusMaster1' panelId='0' x='274' y='-84' z='1' 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' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='cal_uart::CHANNEL' data='001' />
					<value target='cal_uart::TX' data='$PORTC.6' />
					<value target='cal_uart::OutputPins' data='000' />
					<value target='cal_uart::TXAlt' data='0' />
					<value target='cal_uart::RX' data='$PORTC.7' />
					<value target='cal_uart::InputPins' data='025' />
					<value target='cal_uart::RXAlt' data='0' />
					<value target='cal_uart::BAUD_LIST' data='004' />
					<value target='cal_uart::BAUD' data='9600' />
					<value target='UARTidx' data='001' />
					<value target='BaudByteDelay' data='1040' />
					<value target='BusType' data='001' />
					<value target='DDRP' data='$PORTA.5' />
					<value target='ReadDDRState' data='000' />
					<value target='FrameType' data='000' />
					<value target='ReceiveBufferSize' data='30' />
					<value target='AddressBytes' data='1' />
					<value target='SilentInterval' data='60' />
					<value target='RXTOUT' data='0' />
					<value target='TOUTCNT' data='0' />
					<value target='label' data='Modbus' />
					<value target='cal_uart::ScopeTraces' data='1' />
					<value target='cal_uart::ConsoleData' data='1' />
					<value target='cal_uart::ConsoleColumns' data='64' />
					<value target='cal_uart::DataSource' data='001' />
					<value target='cal_uart::com_port' data='003' />
					<value target='cal_uart::Injector' data='000' />
					<value target='cal_uart::APIUseDDR' data='' />
					<value target='cal_uart::APIDDRPin' data='' />
					<value target='cal_uart::APIDDRRXState' data='' />
					<value target='cal_uart::APIUseFC' data='' />
					<value target='cal_uart::APICTSPin' data='' />
					<value target='cal_uart::APIRTSPin' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='51677753-5eaf-4e3a-a3c8-71c49a142171' vmin='1' vmaj='1' codename='OLED_8BIT' panelId='0' x='171' y='-227' 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='1' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='LCD::LCD_Mode' data='002' />
					<value target='LCD::Pin_Data_0' data='$PORTB.0' />
					<value target='LCD::Pin_Data_1' data='$PORTB.1' />
					<value target='LCD::Pin_Data_2' data='$PORTB.2' />
					<value target='LCD::Pin_Data_3' data='$PORTB.3' />
					<value target='LCD::Pin_Data_4' data='$PORTB.4' />
					<value target='LCD::Pin_Data_5' data='$PORTB.5' />
					<value target='LCD::Pin_Data_6' data='$PORTB.6' />
					<value target='LCD::Pin_Data_7' data='$PORTB.7' />
					<value target='LCD::LCD_Port' data='$PORTB0' />
					<value target='LCD::Pin_RS' data='$PORTD.5' />
					<value target='LCD::Pin_E' data='$PORTD.4' />
					<value target='LCD::LCD_Use_Write' data='0' />
					<value target='LCD::Pin_RW' data='$PORTB.6' />
					<value target='LCD::Rows' data='004' />
					<value target='LCD::Columns' data='020' />
					<value target='LCD::RemapCharacters' data='0' />
					<value target='LCD::DelayTiming' data='100' />
					<value target='LCD::ctrl_lcd::Base_GLCD1::ComponentLabel' data='000' />
					<value target='LCD::ctrl_lcd::Base_GLCD1::GdiText1::sText' data='OLED_8BIT' />
					<value target='LCD::ctrl_lcd::Base_GLCD1::GdiText1::dScale' data='1.400000' />
					<value target='LCD::ctrl_lcd::TextColour' data='0' />
					<value target='LCD::ctrl_lcd::TextBg' data='14803425' />
					<value target='LCD::ctrl_lcd::DisplayBg' data='16777215' />
				</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='35.527' ye='115.027' ze='2071.28' xt='35.527' yt='115.027' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='642' dy='555' zoom='37.5044' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='7360576' />
		<winpos ID='7005' RectRecentFloat='315,318,965,768' RectRecentDocked='0,0,642,578' 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='16.7199' ye='-306.305' ze='6348.29' xt='16.7199' yt='-306.305' zt='-4.39339e-19' 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='639,180,1293,757' RectRecentDocked='0,0,646,546' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel3d>
	<panels2d count='1' >
		<panel2d_0 id='0' name='NewPanel' >
			<winpos ID='1171' RectRecentFloat='879,189,1310,579' RectRecentDocked='693,141,1335,719' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='1' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='1' />
			<background fill='288230376134934656' showgrid='0' gridstyle='1' gridsize='10' gridbrush='71776119075691740' snaptogrid='1' />
		</panel2d_0>
	</panels2d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAEwUAACQCAAA' zoom='100' scrollx='0' scrolly='3314' flags='0' />
		<view type='0' name='OLED_INIT' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAEwUAACQCAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='LOGO' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAEwUAACQCAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Keyb_pooling' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAEwUAACQCAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='OLED_Disp_Key' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAEwUAACQCAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SendToMAX7219' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAEwUAACQCAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='InitMAX7219' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAEwUAACQCAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='LedsOn' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAEwUAACQCAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='LedsOff' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAEwUAACQCAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='LedsOff_no_delay' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAEwUAACQCAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='TIMERS' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAEwUAACQCAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
