<root>
<document schema='101' license='0,42980089,K8KKQD' title='' description='' target='PIC.16F.16F628A' >
	<config data='!0,3f18%0,10%2,0%3,1%6,0%5,0%7,0%8,1%d,1' clkspd='4000000' simspd='8' 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 >
		<watch expr='CHAR' />
		<watch expr='INDEX' />
		<watch expr='STR_LEN' />
	</debug>
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='panel' description='' category='Misc' 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='RET_VAL' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='CHAR' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='s16' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='INDEX' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='FINISHED' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='STR_LEN' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='s16' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='INTERRUPT_TMR0' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
					</flowline>
				</macro>
				<macro >
					<flowline name='INTERRUPT_PORTB' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
					</flowline>
				</macro>
				<macro >
					<flowline name='INTERRUPT_RB0INT' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Init Bluetooth' component='Bluetooth1' macro='Initialise' />
						<command class_type='calculation' title='Set Default values' >
							<exp exp='RET_VAL = 0' />
							<exp exp='STR_LEN = 0' />
							<exp exp='INDEX = 0' />
							<exp exp='FINISHED = 0' />
						</command>
						<command class_type='call' title='Send the Script' disable='1' component='Bluetooth1' macro='SendScript' >
							<return exp='RET_VAL' />
							<argument exp='1' />
						</command>
						<command class_type='delay' title='Pause for set up to complete' exp='3' type='2' />
						<command class_type='loop' title='Check for Responses' type='0' exp='1' >
							<flowline >
								<command class_type='comment' title='' comment='Slow' textarea='143,9,143,9' />
								<command class_type='call' title='Check for Response' component='Bluetooth1' macro='StringReceive' >
									<return exp='STR_LEN' />
								</command>
								<command class_type='call' title='Get next CHAR of message' component='Bluetooth1' macro='StringRead' >
									<return exp='CHAR' />
									<argument exp='0' />
								</command>
								<command class_type='switch' title='Switch' textarea='36,25,36,25' exp='CHAR' >
									<case >
										<flowline />
									</case>
									<case exp='&apos;a&apos;' >
										<flowline >
											<command class_type='output' title='Output' mode='1' port='1048576' mask='1' exp='true' />
										</flowline>
									</case>
									<case exp='&apos;b&apos;' >
										<flowline >
											<command class_type='output' title='Output' mode='1' port='1048576' mask='2' exp='true' />
										</flowline>
									</case>
									<case exp='&apos;c&apos;' >
										<flowline >
											<command class_type='output' title='Output' mode='1' port='1048576' mask='4' exp='true' />
										</flowline>
									</case>
									<case exp='&apos;d&apos;' >
										<flowline >
											<command class_type='output' title='Output' mode='1' port='1048576' mask='8' exp='true' />
										</flowline>
									</case>
									<case exp='&apos;0&apos;' >
										<flowline >
											<command class_type='output' title='Output' mode='0' port='1048576' mask='0' exp='0x00' />
											<command class_type='output' title='Output' mode='1' port='1048577' mask='16' exp='false' />
										</flowline>
									</case>
								</command>
								<command class_type='decision' title='Any response?' disable='1' exp='STR_LEN &gt; 0' swap='0' >
									<flowline >
										<command class_type='calculation' title='Reset index' disable='1' >
											<exp exp='INDEX = 0' />
										</command>
										<command class_type='loop' title='Print message' disable='1' type='0' exp='INDEX &lt; STR_LEN' >
											<flowline >
												<command class_type='call' title='Get next CHAR of message' component='Bluetooth1' macro='StringRead' >
													<return exp='CHAR' />
													<argument exp='INDEX' />
												</command>
												<command class_type='output' title='Output' mode='0' port='1048576' mask='0' exp='0xff' />
												<command class_type='calculation' title='Increment index' >
													<exp exp='INDEX = INDEX + 1' />
												</command>
											</flowline>
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='cff93310-545b-4948-a8fa-12b119c5f7a7' vmin='2' vmaj='1' codename='Bluetooth1' x='152' y='200' z='7.36864' xsz='7.38462' ysz='7.38462' zsz='7.38462' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='1' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='001' />
					<value target='FLOWEN' data='000' />
					<value target='BAUD_LIST' data='004' />
					<value target='BAUD' data='' />
					<value target='CommandBufferSize' data='32' />
					<value target='ResponseBufferSize' data='14' />
					<value target='SCRIPTS' data='001' />
					<value target='SCRIPT1' data='AT
AT+IPR
AT+CSS
' />
					<value target='SCRIPT2' data='' />
					<value target='SCRIPT3' data='' />
					<value target='SCRIPT4' data='' />
					<value target='TX' data='$PORTB.2' />
					<value target='RX' data='$PORTB.1' />
					<value target='RTS' data='$PORTC.5' />
					<value target='CTS' data='$PORTC.4' />
					<value target='TXRemap' data='' />
					<value target='RXRemap' data='' />
					<value target='DataSource' data='001' />
					<value target='COMport' data='001' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='0' ye='0' ze='2156.52' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='0' ye='0' ze='1644.66' 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---------------------wAAAAAdAAAAVwUAAPEDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
