<root>
<document schema='101' license='1,Multitronik,BM6NTU' title='' description='' target='PIC.16F.16F1829' >
	<config data='!0,9a4!10,1dff%0,4%3,0%5,1%6,0%7,1%8,1%9,0%b,1%c,0%d,0%10,3%14,1%18,1%19,0%1a,1%1c,1%1d,0' clkspd='32000000' 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='19' />
			<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 />
	<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='0' />
			<data name='ClockPin' value='1' />
			<data name='DataPort' value='0' />
			<data name='DataPin' value='0' />
			<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' />
		</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='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='a9eb79b0-1d24-4acf-aade-d3639aa800c7' vstate='40' vmin='0' vmaj='1' srcleaf='Pressure_Sensor_BME280.fcfx' visiblename='Pressure Sensor (BME280)' description='A small PCB surface mount barometric pressure sensor with a I2C bus interface.
Pressure range 300 to 1100 hPa. Temperature range -40 to +85 °C.' category='Sensors' catenable='1' author='Matrix TSL' manuname='Bosch' manucode='BME280' sysinfo='779' keywords='' dynamic='1' iconpath='..\..\icons\components\Pressure.png' />
		<component class_type='root' codename='PressureSensor_BME280' 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 >
				<property name='Channel' target='cal_i2c1::CHANNEL' typeid='16' hidden='0' locked='0' info='Channel selection' filter='000Software
001Channel 1
002Channel 2
' />
				<property name='SDA' target='cal_i2c1::SDA' typeid='5' hidden='0' locked='1' info='Pin used for SDA (data signal)' />
				<property name='SCL' target='cal_i2c1::SCL' typeid='5' hidden='0' locked='1' info='Pin used for SCL (clock signal)' />
				<property name='Baud Select' target='cal_i2c1::BAUD_LIST' typeid='16' hidden='0' locked='0' info='Baud rate option selector' filter='000Custom
001100KHz
002400KHz
0031MHz' />
				<property name='Baud Rate' target='cal_i2c1::BAUD' typeid='14' hidden='0' locked='1' info='Baud rate to be used' />
				<property name='Stop Delay' target='cal_i2c1::StopDel' typeid='7' hidden='0' locked='0' info='On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not 
a 10ms delay between an I2C stop event and the next I2C start event.

Most modern microcontrollers will not have a problem so this property can be disabled to speed up the 
I2C communications. ' />
				<property name='Slave Address' target='SlaveAddress' typeid='16' hidden='0' locked='0' info='' filter='2360xEC
2380xEE' />
			</properties>
			<values >
				<value target='cal_i2c1::CHANNEL' data='001' />
				<value target='cal_i2c1::SDA' data='$PORTB.4' />
				<value target='cal_i2c1::SCL' data='$PORTB.6' />
				<value target='cal_i2c1::BAUD_LIST' data='002' />
				<value target='cal_i2c1::BAUD' data='400000' />
				<value target='cal_i2c1::StopDel' data='1' />
				<value target='SlaveAddress' data='236' />
			</values>
			<events />
			<apis >
				<api name='ReadPressureFloat' alt='ReadPressureFloat' type='1' proto='1' />
				<api name='Reset' alt='Reset' type='1' proto='1' />
				<api name='I2C_Read_Register' alt='I2C_Read_Register' type='1' proto='1' />
				<api name='ReadTemperatureFloat' alt='ReadTemperatureFloat' type='1' proto='1' />
				<api name='I2C_Write_Register' alt='I2C_Write_Register' type='1' proto='1' />
				<api name='ReadHumidityFloat' alt='ReadHumidityFloat' type='1' proto='1' />
				<api name='Initialise' alt='Initialise' type='1' proto='1' />
			</apis>
			<variables >
				<variable public='0' >
					<def class_type='variable' name='TFINE' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='H' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='I2C_RD_ADDR' type='s16' description='' isconst='1' isinit='1' usrinit='237' setinit='0xED' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='sT' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='5' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='T3' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='T2' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='T1' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='I2C_WR_ADDR' type='s16' description='' isconst='1' isinit='1' usrinit='236' setinit='0xEC' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='P9' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='H6' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='sH' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='4' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='P8' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='H5' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='P7' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='H4' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='P6' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='H3' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='P5' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='T' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='P4' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='H1' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='P3' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='P2' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='P1' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='H2u' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='H2s' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='ReadPressureFloat' description='Reads the pressure as a floating point value in Bars.
Calls the ReadPressureRaw function and then converts to a meaningful value.' >
						<return name='Return' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='adc_P' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='P1' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='P2' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='P3' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='P4' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='P5' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='P6' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='P7' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='P8' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='P9' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='TFINE' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='native' title='C Code' ccode='long long var1, var2, p;' cmdcolor='3389439' cmdcolor_sec='3389439' language='C' />
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='ReadTemperatureFloat' />
						<command class_type='call' title='BME280_REGISTER_PRESSUREDATA' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read3_Register' >
							<return exp='.adc_P' />
							<argument exp='0xF7' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='.adc_P != 0x800000' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='.P1 = P1' />
									<exp exp='.P2 = P2' />
									<exp exp='.P3 = P3' />
									<exp exp='.P4 = P4' />
									<exp exp='.P5 = P5' />
									<exp exp='.P6 = P6' />
									<exp exp='.P7 = P7' />
									<exp exp='.P8 = P8' />
									<exp exp='.P9 = P9' />
									<exp exp='.TFINE = TFINE' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='.adc_P = .adc_P &gt;&gt; 4' />
								</command>
								<command class_type='native' title='C Code' ccode='var1 = ((long long)FCL_TFINE) - 128000;
var2 = var1 * var1 * (long long)FCL_P6;
var2 = var2 + ((var1*(long long)FCL_P5)&lt;&lt;17);
var2 = var2 + (((long long)FCL_P4)&lt;&lt;35);
var1 = ((var1 * var1 * (long long)FCL_P3)&gt;&gt;8) + ((var1 * (long long)FCL_P2)&lt;&lt;12);
var1 = (((((long long)1)&lt;&lt;47)+var1))*((long long)FCL_P1)&gt;&gt;33;

if (var1 == 0) 
{
    return 0.0; // avoid exception caused by division by zero
}

p = 1048576 - FCL_ADC_P;
p = (((p&lt;&lt;31) - var2)*3125) / var1;
var1 = (((long long)FCL_P9) * (p&gt;&gt;13) * (p&gt;&gt;13)) &gt;&gt; 25;
var2 = (((long long)FCL_P8) * p) &gt;&gt; 19;

p = ((p + var1 + var2) &gt;&gt; 8) + (((long long)FCL_P7)&lt;&lt;4);

return (float)p/256;
' cmdcolor='3389439' cmdcolor_sec='3389439' language='C' />
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='.Return = 0.0' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Reset' description='Resets the device' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='I2C_WR_ADDR' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='0x1E' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_Stop' />
						<command class_type='delay' title='Delay' cmdcolor='7895044' cmdcolor_sec='7895044' exp='10' type='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadCalibData' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='b1' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='b2' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='H2' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='T1' />
							<argument exp='0x88' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='T1 = (T1 &gt;&gt; 8) | (T1 &lt;&lt; 8)' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='T2' />
							<argument exp='0x8A' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='T2 = (T2 &gt;&gt; 8) | (T2 &lt;&lt; 8)' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='T3' />
							<argument exp='0x8C' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='T3 = (T3 &gt;&gt; 8) | (T3 &lt;&lt; 8)' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='P1' />
							<argument exp='0x8E' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='P2' />
							<argument exp='0x90' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='P3' />
							<argument exp='0x92' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='P4' />
							<argument exp='0x94' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='P5' />
							<argument exp='0x96' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='P6' />
							<argument exp='0x98' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='P7' />
							<argument exp='0x9A' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='P8' />
							<argument exp='0x9C' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='P9' />
							<argument exp='0x9E' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read_Register' >
							<return exp='H1' />
							<argument exp='0xA1' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='H2u' />
							<argument exp='0xE1' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='H2u = (H2u &gt;&gt; 8) | (H2u &lt;&lt; 8)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='H2s = H2u' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read_Register' >
							<return exp='H3' />
							<argument exp='0xE3' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read_Register' >
							<return exp='.b1' />
							<argument exp='0xE4' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read_Register' >
							<return exp='.b2' />
							<argument exp='0xE5' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='H4 = (.b1 &lt;&lt; 4) | (.b2 &amp; 0xF)' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read_Register' >
							<return exp='.b1' />
							<argument exp='0xE6' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read_Register' >
							<return exp='.b2' />
							<argument exp='0xE5' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='H5 = (.b1 &lt;&lt; 4) | (.b2 &gt;&gt; 4)' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read_Register' >
							<return exp='H6' />
							<argument exp='0xE7' />
						</command>
						<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='Cursor' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='calculation' title='Calculation' disable='1' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='sT = ToString$ (H2s)' />
						</command>
						<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
							<argument exp='sT' />
						</command>
						<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
							<argument exp='&quot;;&quot;' />
						</command>
						<command class_type='calculation' title='Calculation' disable='1' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='sT = ToString$ (H5)' />
						</command>
						<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
							<argument exp='sT' />
						</command>
						<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
							<argument exp='&quot;;&quot;' />
						</command>
						<command class_type='calculation' title='Calculation' disable='1' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='sT = ToString$ (H6)' />
						</command>
						<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
							<argument exp='sT' />
						</command>
						<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='Cursor' >
							<argument exp='0' />
							<argument exp='1' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='I2C_Read_Register' description='Reads a byte value from a register on the device' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='Address' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='SlaveAddress' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.Address' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_Restart' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='SlaveAddress | 1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_RxByte' >
							<return exp='.Return' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadTemperatureFloat' description='Reads the temperature as a floating point value in °C.
Resultion sets the return bit value and conversion time.
Calls the ReadTemperatureRaw function and then converts to a meaningful value.' >
						<return name='Return' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='adc_T' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='TFINE' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='T1' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='T2' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='T3' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='varb1' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='varb2' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='native' title='C Code' ccode='long var1, var2;' cmdcolor='3389439' cmdcolor_sec='3389439' language='C' />
						<command class_type='call' title='BME280_REGISTER_TEMPDATA' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read3_Register' >
							<return exp='.adc_T' />
							<argument exp='0xFA' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='.adc_T != 0x800000' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='.T1 = T1' />
									<exp exp='.T2 = T2' />
									<exp exp='.T3 = T3' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='.adc_T = .adc_T &gt;&gt; 4' />
								</command>
								<command class_type='native' title='C Code' ccode='var1 = ((((FCL_ADC_T&gt;&gt;3) - ((long)FCL_T1 &lt;&lt;1))) * ((long)FCL_T2)) &gt;&gt; 11;
             
var2 = (((((FCL_ADC_T&gt;&gt;4) - ((long)FCL_T1)) * ((FCL_ADC_T&gt;&gt;4) - ((long)FCL_T1))) &gt;&gt; 12) * ((long)FCL_T3)) &gt;&gt; 14;

FCL_TFINE = var1 + var2;

float T = (FCL_TFINE * 5 + 128) &gt;&gt; 8;

FCL_VARB1=var1;
FCL_VARB2=var2;' cmdcolor='3389439' cmdcolor_sec='3389439' language='C' />
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='TFINE = .TFINE' />
								</command>
								<command class_type='calculation' title='Calculation' disable='1' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='sT = ToString$ (TFINE)' />
								</command>
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
									<argument exp='sT' />
								</command>
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
									<argument exp='&quot;;&quot;' />
								</command>
								<command class_type='native' title='C Code' ccode='return T/100;' cmdcolor='3389439' cmdcolor_sec='3389439' language='C' />
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='.Return = 0.0' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='US_R2' description='' >
						<return name='Return' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='address' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='temp' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='.temp' />
							<argument exp='.address' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='.temp = (.temp &gt;&gt; 8) | (.temp &lt;&lt; 8)' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='I2C_Read2_Register' description='Reads two byte values from sequential registers on the device' >
						<return name='Return' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='Address' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='temp' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='SlaveAddress' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.Address' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_Restart' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='SlaveAddress | 1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_RxByte' >
							<return exp='.temp' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_RxByte' >
							<return exp='.Return' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_Stop' />
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='.Return = .Return | (.temp &lt;&lt; 8)' />
							<exp exp='//.Return = (.Return &gt;&gt; 8) | (.Return &lt;&lt; 8)' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='I2C_Write_Register' description='Writes a byte value to a register on the device' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='Address' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='Value' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='SlaveAddress' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.Address' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.Value' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='I2C_Read3_Register' description='Reads three byte values from sequential registers on the device' >
						<return name='Return' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='Address' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='temp' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='SlaveAddress' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.Address' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_Restart' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='SlaveAddress | 1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_RxByte' >
							<return exp='.Return' />
							<argument exp='0' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='.Return = .Return &lt;&lt; 8' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_RxByte' >
							<return exp='.temp' />
							<argument exp='0' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='.Return = .Return | .temp' />
							<exp exp='.Return = .Return &lt;&lt; 8' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_RxByte' >
							<return exp='.temp' />
							<argument exp='1' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='.Return = .Return | .temp' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadHumidityFloat' description='Reads the humidity as a floating point value in percentage 0-100%.
Calls the ReadHumidityRaw function and then converts to a meaningful value.' >
						<return name='Return' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='adc_H' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='H1' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='H3' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='H2' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='H4' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='H5' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='H6' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='TFINE' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='varb3' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='ReadTemperatureFloat' />
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read2_Register' >
							<return exp='.adc_H' />
							<argument exp='0xFD' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='.adc_H != 0x8000' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='.H1 = H1' />
									<exp exp='.H2 = H2s' />
									<exp exp='.H3 = H3' />
									<exp exp='.H4 = H4' />
									<exp exp='.H5 = H5' />
									<exp exp='.H6 = H6' />
									<exp exp='.TFINE = TFINE' />
								</command>
								<command class_type='native' title='C Code' disable='1' ccode='long v_x1_u32r;

v_x1_u32r = (FCL_TFINE - ((long)76800));
FCL_VARB3=v_x1_u32r;' cmdcolor='3389439' cmdcolor_sec='3389439' language='C' />
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='Cursor' >
									<argument exp='0' />
									<argument exp='0' />
								</command>
								<command class_type='calculation' title='Calculation' disable='1' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='sT = ToString$ (.varb3)' />
								</command>
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
									<argument exp='sT' />
								</command>
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
									<argument exp='&quot;;&quot;' />
								</command>
								<command class_type='native' title='C Code' disable='1' ccode='v_x1_u32r = ((((FCL_ADC_H &lt;&lt; 14) - (((long)FCL_H4) &lt;&lt; 20) -
                    (((long)FCL_H5) * v_x1_u32r)) + ((long)16384)) &gt;&gt; 15);
FCL_VARB3=v_x1_u32r;' cmdcolor='3389439' cmdcolor_sec='3389439' language='C' />
								<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='Cursor' >
									<argument exp='0' />
									<argument exp='1' />
								</command>
								<command class_type='calculation' title='Calculation' disable='1' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='sT = ToString$ (H2s)' />
								</command>
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
									<argument exp='sT' />
								</command>
								<command class_type='native' title='C Code' ccode='long v_x1_u32r;

v_x1_u32r = (FCL_TFINE - ((long)76800));
v_x1_u32r = (((((FCL_ADC_H &lt;&lt; 14) - (((long)FCL_H4) &lt;&lt; 20) -
                    (((long)FCL_H5) * v_x1_u32r)) + ((long)16384)) &gt;&gt; 15) *
                 (((((((v_x1_u32r * ((long)FCL_H6)) &gt;&gt; 10) *
                      (((v_x1_u32r * ((long)FCL_H3)) &gt;&gt; 11) + ((long)32768))) &gt;&gt; 10) +
                    ((long)2097152)) * ((long)FCL_H2) + 8192) &gt;&gt; 14));
v_x1_u32r = (v_x1_u32r - (((((v_x1_u32r &gt;&gt; 15) * (v_x1_u32r &gt;&gt; 15)) &gt;&gt; 7) *
                               ((long)FCL_H1)) &gt;&gt; 4));
v_x1_u32r = (v_x1_u32r &lt; 0) ? 0 : v_x1_u32r;
v_x1_u32r = (v_x1_u32r &gt; 419430400) ? 419430400 : v_x1_u32r;

FCL_VARB3=v_x1_u32r;' cmdcolor='3389439' cmdcolor_sec='3389439' language='C' />
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='Cursor' >
									<argument exp='0' />
									<argument exp='0' />
								</command>
								<command class_type='calculation' title='Calculation' disable='1' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='sT = ToString$ (.varb3)' />
								</command>
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
									<argument exp='sT' />
								</command>
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
									<argument exp='&quot;;&quot;' />
								</command>
								<command class_type='native' title='C Code' ccode='float h = (v_x1_u32r&gt;&gt;12);

return h / 1024.0;' cmdcolor='3389439' cmdcolor_sec='3389439' language='C' />
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='.Return = 0.0' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='native' title='C Code' ccode='OSCCON=0xF2;' cmdcolor='3389439' cmdcolor_sec='3389439' language='C' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='Clear' />
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='Initialise' />
						<command class_type='loop' title='Loop' cmdcolor='3568629' cmdcolor_sec='3568629' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='ReadHumidityFloat' >
									<return exp='H' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='sH = FloatToString$ (H)' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='Cursor' >
									<argument exp='0' />
									<argument exp='0' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
									<argument exp='sH' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
									<argument exp='&quot; %&quot;' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='ReadTemperatureFloat' >
									<return exp='T' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='sT = FloatToString$ (T)' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='Cursor' >
									<argument exp='0' />
									<argument exp='1' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
									<argument exp='sT' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='LCD1' macro='PrintString' >
									<argument exp='&quot; C&quot;' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='7895044' cmdcolor_sec='7895044' exp='500' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Initialise' description='Starts up the I2C bus and initialises the pressure sensor ready for use.
Returns 1 for a sucessful startup.
Returns 0 for a failed startup or no device detected.' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='temp' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='PROM' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='.Return = 0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='cal_i2c1' macro='Master_Init' />
						<command class_type='delay' title='Delay' cmdcolor='7895044' cmdcolor_sec='7895044' exp='10' type='1' />
						<command class_type='call' title='Read Chip ID' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read_Register' >
							<return exp='.temp' />
							<argument exp='0xD0' />
						</command>
						<command class_type='decision' title='Check device is correct' cmdcolor='3568629' cmdcolor_sec='3568629' exp='.temp = 0x60' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='.Return = 1' />
								</command>
								<command class_type='call' title='reset the device using soft-reset' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Write_Register' >
									<argument exp='0xE0' />
									<argument exp='0xB6' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='7895044' cmdcolor_sec='7895044' exp='300' type='1' />
								<command class_type='call' title='is busy reading cal data?' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read_Register' >
									<return exp='.temp' />
									<argument exp='0xF3' />
								</command>
								<command class_type='loop' title='Loop' cmdcolor='3568629' cmdcolor_sec='3568629' type='0' exp='(.temp &amp; 0x01) != 0' >
									<flowline >
										<command class_type='delay' title='Delay' cmdcolor='7895044' cmdcolor_sec='7895044' exp='100' type='1' />
										<command class_type='call' title='is busy reading cal data?' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Read_Register' >
											<return exp='.temp' />
											<argument exp='0xF3' />
										</command>
									</flowline>
								</command>
								<command class_type='comment' title='' comment='Read Coefficients' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
								<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='ReadCalibData' />
								<command class_type='call' title='BME280_REGISTER_CONTROLHUMID' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Write_Register' >
									<argument exp='0xF2' />
									<argument exp='2' />
								</command>
								<command class_type='call' title='BME280_REGISTER_CONFIG' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Write_Register' >
									<argument exp='0xF5' />
									<argument exp='0xE4' />
								</command>
								<command class_type='call' title='BME280_REGISTER_CONTROL' cmdcolor='1975743' cmdcolor_sec='1975743' macro='I2C_Write_Register' >
									<argument exp='0xF4' />
									<argument exp='0x4B' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='ed3a5141-43bb-43e0-86b0-2243fd1147ca' vmin='3' vmaj='1' codename='cal_i2c1' x='0' y='60' z='0' xsz='25' ysz='25' zsz='25' 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='REF' data='1' />
					<value target='CHANNEL' data='001' />
					<value target='SDA' data='$PORTB.4' />
					<value target='SCL' data='$PORTB.6' />
					<value target='BAUD_LIST' data='002' />
					<value target='BAUD' data='400000' />
					<value target='SRC' data='000' />
					<value target='SMB' data='000' />
					<value target='StopDel' data='1' />
					<value target='BMODE' data='0' />
					<value target='SDA_PORT' data='$PORTB.4' />
					<value target='SDA_TRIS' data='$PORTB.4' />
					<value target='SDA_PIN' data='4' />
					<value target='SCL_PORT' data='$PORTB.6' />
					<value target='SCL_TRIS' data='$PORTB.6' />
					<value target='SCL_PIN' data='6' />
					<value target='MASTER' data='1' />
					<value target='ScopeTraces' data='0' />
					<value target='ConsoleData' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='0953aac0-9c23-4c2f-9843-88954a4191ea' vmin='4' vmaj='2' codename='LCD1' x='0' y='6' z='0.55' xsz='120' ysz='40' zsz='1.1' 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='LCD_Mode' data='000' />
					<value target='Pin_Data_0' data='$PORTC.4' />
					<value target='Pin_Data_1' data='$PORTC.5' />
					<value target='Pin_Data_2' data='$PORTA.4' />
					<value target='Pin_Data_3' data='$PORTA.5' />
					<value target='Pin_Data_4' data='$PORTA.1' />
					<value target='Pin_Data_5' data='$PORTA.1' />
					<value target='Pin_Data_6' data='$PORTA.1' />
					<value target='Pin_Data_7' data='$PORTA.1' />
					<value target='LCD_Port' data='$PORTA' />
					<value target='Pin_RS' data='$PORTB.7' />
					<value target='Pin_E' data='$PORTC.7' />
					<value target='LCD_Use_Write' data='0' />
					<value target='Pin_RW' data='$PORTA.0' />
					<value target='Rows' data='004' />
					<value target='Columns' data='020' />
					<value target='RemapCharacters' data='0' />
					<value target='DelayTiming' data='100' />
					<value target='BackgroundColor' data='16711750' />
					<value target='LineColor' data='16777215' />
					<value target='TextColor' data='16777215' />
					<value target='Font' data='Fixedsys' />
					<value target='CursorPosX' data='7' />
					<value target='CursorPosY' data='1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='2105930' img='' style='0' />
		<camera xe='-11.2374' ye='15.3124' ze='179.206' xt='-11.2374' yt='15.3124' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='1' lighting='2' brightness='0' perspective='0' >
		<background rgb='7895160' img='' style='0' />
		<table rgb='8388608' img='' style='0' size='7' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA.QUAACICAAA' zoom='75' scrollx='0' scrolly='111' flags='0' />
		<view type='0' name='ReadHumidityFloat' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA.QUAACICAAA' zoom='75' scrollx='0' scrolly='914' flags='0' />
	</layout>
</document>
</root>
