<root>
<document schema='101' license='1,e-smokeguru,J4G4XN' title='' description='' target='PIC.18F.18F4550' >
	<config data='!0,e0!8,32!10,d9!18,fe!20,ff!28,f9!30,9a!38,ff!40,ff!48,ff!50,ff!58,ff!60,ff!68,ff%5,1%3,0%0,0%8,2%e,0%f,0%15,0%10,1%11,0%13,3%18,0%19,f%28,1%29,0%2a,0%2f,1%30,0%32,0%35,0%36,0%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='48000000' 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='8d377a39-7120-4447-b7e9-d97b67a8028e' 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='LSB' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='freq' type='u16' description='' isconst='0' isinit='1' usrinit='512' setinit='512' />
				</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='TotFreq4' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='TotFreq3' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='MSB' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='TotFreq2' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='TotFreq1' 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='eeprom_read' description='' >
						<command class_type='call' title='Call Component Macro' component='eeprom1' macro='Read' >
							<return exp='TotFreq1' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' component='eeprom1' macro='Read' >
							<return exp='TotFreq2' />
							<argument exp='2' />
						</command>
						<command class_type='call' title='Call Component Macro' component='eeprom1' macro='Read' >
							<return exp='TotFreq3' />
							<argument exp='3' />
						</command>
						<command class_type='call' title='Call Component Macro' component='eeprom1' macro='Read' >
							<return exp='TotFreq4' />
							<argument exp='4' />
						</command>
						<command class_type='comment' title='' comment='Combine seperate bytes back in to ULong variable' textarea='157,79,157,79' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='freq = TotFreq1 * 16777216 + TotFreq2 * 65536 + TotFreq3 * 256 + TotFreq4' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='eeprom_write' description='' >
						<command class_type='calculation' title='Calculation' >
							<exp exp='TotFreq1 = (freq &amp; 0xFF000000) &gt;&gt; 24' />
							<exp exp='TotFreq2 = (freq &amp; 0xFF0000) &gt;&gt; 16' />
							<exp exp='TotFreq3 = (freq &amp; 0xFF00) &gt;&gt; 8' />
							<exp exp='TotFreq4 = (freq &amp; 0xFF)' />
						</command>
						<command class_type='call' title='Call Component Macro' component='eeprom1' macro='Write' >
							<argument exp='22' />
							<argument exp='22' />
						</command>
						<command class_type='call' title='Call Component Macro' component='eeprom1' macro='Write' >
							<argument exp='1' />
							<argument exp='TotFreq1' />
						</command>
						<command class_type='call' title='Call Component Macro' component='eeprom1' macro='Write' >
							<argument exp='2' />
							<argument exp='TotFreq2' />
						</command>
						<command class_type='call' title='Call Component Macro' component='eeprom1' macro='Write' >
							<argument exp='3' />
							<argument exp='TotFreq3' />
						</command>
						<command class_type='call' title='Call Component Macro' component='eeprom1' macro='Write' >
							<argument exp='4' />
							<argument exp='TotFreq4' />
						</command>
						<command class_type='calculation' title='Calculation' >
							<exp exp='TotFreq1 = 0' />
							<exp exp='TotFreq2 = 0' />
							<exp exp='TotFreq3 = 0' />
							<exp exp='TotFreq4 = 0' />
							<exp exp='' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<command class_type='call' title='Call Macro' macro='eeprom_read' />
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='Initialise' />
						<command class_type='output' title='Output' mode='1' port='1048577' mask='16' exp='1' />
						<command class_type='delay' title='Delay' exp='10' type='1' />
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='0b00000001' />
						</command>
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='0b01100101' />
						</command>
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='0b00000001' />
						</command>
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='0b01100101' />
						</command>
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='MSB' />
						</command>
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='LSB' />
						</command>
						<command class_type='output' title='Output' mode='1' port='1048577' mask='16' exp='0' />
						<command class_type='loop' title='Loop' type='0' exp='1' >
							<flowline />
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='dcbf571f-a6fa-402d-bdd4-be00cca4070f' vmin='1' vmaj='1' codename='eeprom1' x='-32' y='40' z='1.24088' xsz='20' ysz='20' zsz='20' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='EESize' data='256 byte' />
					<value target='EEbitdepth' data='8 bit' />
					<value target='InitialValues' data='' />
					<value target='InitValsParsed' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='24219805-113d-4b12-b6bd-e1b0b0c33981' vmin='2' vmaj='1' codename='I2C_Master1' x='-8' y='-40' z='0.755' xsz='60' ysz='26' zsz='1.51' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='000' />
					<value target='BAUD_LIST' data='000' />
					<value target='SRC' data='000' />
					<value target='SMB' data='000' />
					<value target='BAUD' data='50000' />
					<value target='SDA' data='$PORTB.5' />
					<value target='SCL' data='$PORTB.3' />
					<value target='label' data='I2C Master' />
					<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='189.803' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAA8gIAAE4CAAA' zoom='75' scrollx='0' scrolly='400' flags='0' />
	</layout>
</document>
</root>
