<root>
<document schema='101' license='50,Dev User,XDKHX7' title='' description='' target='PIC16.33E.EB091' >
	<config data='' clkspd='140000000' simspd='1' usewdt='0' constif='0' />
	<plugins >
		<dll_dbg_icd enabled='0' >
			<data name='debug' value='1' />
			<data name='userpins' value='0' />
			<data name='speed' value='0' />
			<data name='usev9' value='0' />
			<data name='breaks' value='8' />
			<data name='stacks' value='8' />
			<data name='clkport' value='1' />
			<data name='clkbit' value='6' />
			<data name='dataport' value='1' />
			<data name='databit' value='7' />
			<data name='ghostype' value='0' />
			<data name='monitor' value='1' />
			<data name='ictloop' value='0' />
			<data name='ictrate' value='20000' />
			<data name='ictmask' value='0' />
			<data name='anlpres' value='255' />
			<data name='digmask1' value='-1' />
			<data name='digmask2' value='-1' />
		</dll_dbg_icd>
		<dll_models enabled='1' />
		<dll_upgrader enabled='1' />
		<dll_webhelp enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug />
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='934228da-23c4-4091-a428-299cdb8128aa' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='0' iconpath='' />
		<component class_type='root' codename='panel' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='count' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='ret' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Main' description='Starts up the WIFI module then configures the module as a WIFI Station STA.
The device will attemmpt to connect to an existing network.
If the connection is ok then we will attempt to read a file from the MatrixTSL Website.' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Startup LCD' component='lcd_eb005' macro='Start' />
						<command class_type='call' title='Print Init' component='lcd_eb005' macro='PrintString' >
							<argument exp='&quot;Init, &quot;' />
						</command>
						<command class_type='call' title='Initialise Wifi' component='WLAN_ESP8266' macro='Initialise' />
						<command class_type='call' title='Print FW' component='lcd_eb005' macro='PrintString' >
							<argument exp='&quot;Join AP&quot;' />
						</command>
						<command class_type='call' title='Connect To Access Point' component='WLAN_ESP8266' macro='ConnectToSSID' >
							<return exp='ret' />
							<argument exp='&quot;WirelessName&quot;' />
							<argument exp='&quot;WirelessPassword&quot;' />
							<argument exp='5' />
						</command>
						<command class_type='call' title='Move to second line of LCD' component='lcd_eb005' macro='Cursor' >
							<argument exp='0' />
							<argument exp='1' />
						</command>
						<command class_type='decision' title='Decision' exp='ret = 1' swap='0' >
							<flowline >
								<command class_type='call' title='Print firmware string' component='lcd_eb005' macro='PrintString' >
									<argument exp='&quot;OK&quot;' />
								</command>
								<command class_type='delay' title='Delay' exp='2' type='2' />
								<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Clear' />
								<command class_type='call' title='Print FW' component='lcd_eb005' macro='PrintString' >
									<argument exp='&quot;Connecting...&quot;' />
								</command>
								<command class_type='call' title='Move to second line of LCD' component='lcd_eb005' macro='Cursor' >
									<argument exp='0' />
									<argument exp='1' />
								</command>
								<command class_type='call' title='TCP Connect to MatrixTSL.com' component='WLAN_ESP8266' macro='ClientConnect' >
									<return exp='ret' />
									<argument exp='0' />
									<argument exp='&quot;46.17.91.231&quot;' />
									<argument exp='80' />
								</command>
								<command class_type='decision' title='Decision' exp='ret = 1' swap='0' >
									<flowline >
										<command class_type='call' title='Request URL demo/test.txt' component='WLAN_ESP8266' macro='ClientSendRequest' >
											<argument exp='&quot;GET /demo/test.txt HTTP/1.1\r\nHost: 46.17.91.231\r\n\r\n&quot;' />
										</command>
										<command class_type='loop' title='Display output on LCD' type='0' exp='count &lt; 32' >
											<flowline >
												<command class_type='calculation' title='Calculation' >
													<exp exp='count = 0' />
												</command>
												<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Clear' />
												<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
													<argument exp='0' />
													<argument exp='0' />
												</command>
												<command class_type='loop' title='Loop' type='2' exp='16' >
													<flowline >
														<command class_type='call' title='Call Component Macro' component='WLAN_ESP8266' macro='GetByteWithTimeout' >
															<return exp='ret' />
														</command>
														<command class_type='decision' title='Decision' exp='ret = 0' swap='0' >
															<flowline >
																<command class_type='calculation' title='Calculation' >
																	<exp exp='count = count + 1' />
																</command>
															</flowline>
															<flowline >
																<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintAscii' >
																	<argument exp='ret' />
																</command>
															</flowline>
														</command>
													</flowline>
												</command>
												<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
													<argument exp='0' />
													<argument exp='1' />
												</command>
												<command class_type='loop' title='Loop' type='2' exp='16' >
													<flowline >
														<command class_type='call' title='Call Component Macro' component='WLAN_ESP8266' macro='GetByteWithTimeout' >
															<return exp='ret' />
														</command>
														<command class_type='decision' title='Decision' exp='ret = 0' swap='0' >
															<flowline >
																<command class_type='calculation' title='Calculation' >
																	<exp exp='count = count + 1' />
																</command>
															</flowline>
															<flowline >
																<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintAscii' >
																	<argument exp='ret' />
																</command>
															</flowline>
														</command>
													</flowline>
												</command>
												<command class_type='delay' title='Delay' exp='2' type='2' />
											</flowline>
										</command>
										<command class_type='call' title='Print FW' component='lcd_eb005' macro='PrintString' >
											<argument exp='&quot;Done&quot;' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Print FW' component='lcd_eb005' macro='PrintString' >
											<argument exp='&quot;Failed&quot;' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline >
								<command class_type='call' title='Print firmware string' component='lcd_eb005' macro='PrintString' >
									<argument exp='&quot;Fail&quot;' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='e1bb4679-58ef-40dc-8d09-306ada46f7bf' vmin='6' vmaj='1' codename='WLAN_ESP8266' x='-0.0359411' y='16.4711' z='0.755' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='RxBufferSize' data='128' />
					<value target='ScanBufferSize' data='100' />
					<value target='ResetMode' data='001' />
					<value target='Termination' data='001' />
					<value target='UART_CHANNEL' data='001' />
					<value target='BAUD' data='009' />
					<value target='RESET' data='$PORTD.5' />
					<value target='TX' data='$PORTD.6' />
					<value target='RX' data='$PORTD.7' />
					<value target='TXRemap' data='013' />
					<value target='RXRemap' data='071' />
					<value target='PAGES' data='004' />
					<value target='TIMEOUT' data='4' />
					<value target='LineDelay' data='100' />
					<value target='name1' data='index.htm' />
					<value target='html1' data='&lt;html&gt;' />
					<value target='name2' data='page2.htm' />
					<value target='html2' data='&lt;html&gt;' />
					<value target='name3' data='page3.htm' />
					<value target='html3' data='&lt;html&gt;' />
					<value target='name4' data='page4.htm' />
					<value target='html4' data='&lt;html&gt;' />
					<value target='WLAN_USE_PAGE1' data='1' />
					<value target='WLAN_USE_PAGE2' data='1' />
					<value target='WLAN_USE_PAGE3' data='1' />
					<value target='WLAN_USE_PAGE4' data='1' />
					<value target='Injector' data='000' />
					<value target='label' data='WLAN' />
					<value target='LenIn0' data='20' />
					<value target='LenIn1' data='20' />
					<value target='LenIn2' data='20' />
					<value target='LenIn3' data='20' />
					<value target='LenIn4' data='20' />
					<value target='LenIn5' data='20' />
					<value target='LenOut0' data='20' />
					<value target='LenOut1' data='20' />
					<value target='LenOut2' data='20' />
					<value target='LenOut3' data='20' />
					<value target='LenOut4' data='20' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='d29dda88-17de-4008-991a-c881890d4c57' vmin='1' vmaj='1' codename='lcd_eb005' x='0.686611' y='-25.0507' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Pin_Data_0' data='$PORTB.0' />
					<value target='Pin_Data_1' data='$PORTB.1' />
					<value target='Pin_Data_2' data='$PORTB.2' />
					<value target='Pin_Data_3' data='$PORTB.3' />
					<value target='Pin_RS' data='$PORTB.4' />
					<value target='Pin_E' data='$PORTB.5' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='15335401' img='' style='0' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='16777215' img='' style='0' />
		<table rgb='16777215' img='' style='0' size='0' />
		<camera xe='0' ye='0' ze='104.811' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAArQQAAJEDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
