<root>
<document schema='101' license='1,skquah2007,KZMY45' title='' description='' target='PIC.16F.16F628A' >
	<config data='!0,3f70%0,10%2,0%3,0%6,1%5,1%7,0%8,1%d,1' clkspd='4000000' 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 >
		<watch expr='C1' />
		<watch expr='C2' />
		<watch expr='temp' />
	</debug>
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='8e54ff60-b547-4166-b1d8-8279fa83a095' 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='C2' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='C1' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</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='temp' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Dip_switch1' type='b1' 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='Int_Comparator' description='Int_Comparator page' >
						<command class_type='native' title='C Code' ccode='//FCV_C1 = test_bit(cmcon, C1OUT);
FCV_C2 = test_bit(cmcon, C2OUT);' language='C' />
						<command class_type='decision' title='Decision' exp='C2 = 1' swap='0' >
							<flowline >
								<command class_type='call' title='Call Component Macro' component='led_5mm_clip1' macro='TurnOn' />
							</flowline>
							<flowline >
								<command class_type='call' title='Call Component Macro' component='led_5mm_clip1' macro='TurnOff' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='Main page : Gas sensor with comparators C2Vout ( open drain ) and C1Vout ( inverse ) .' >
						<command class_type='loop' title='Loop' type='0' exp='1' >
							<flowline >
								<command class_type='native' title='Initialise comparator' ccode=' char temp;
porta = 0;
cmcon=0x06;  // Mode 110
set_bit(cmcon,C1INV);  // Comparator 1 output inverse
trisa = 0x07;
delay_10us(1);
temp = cmcon;' language='C' />
								<command class_type='interrupt' title='Interrupt' enable='0' name='' >
									<custom name='Comparator' handler='if (pir1 &amp; (1 &lt;&lt; CMIF))
{
FCM_Int_Comparator(); // call selected macro
clear_bit(pir1, CMIF); // clear interrupt
}' enable='clear_bit(pir1,CMIF);
set_bit(pie1, CMIE);
set_bit(intcon, PEIE);
set_bit(intcon, GIE);' disable='clear_bit(pie1, CMIE);' />
								</command>
								<command class_type='interrupt' title='Comparator' enable='1' name='' call='Int_Comparator' >
									<custom name='Comparator' handler='if (pir1 &amp; (1 &lt;&lt; CMIF))
{
FCM_Int_Comparator(); // call selected macro
clear_bit(pir1, CMIF); // clear interrupt
}' enable='clear_bit(pir1,CMIF);
set_bit(pie1, CMIE);
set_bit(intcon, PEIE);
set_bit(intcon, GIE);' disable='' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='7fdaec78-394e-4ec9-a578-4f1a12a12076' vmin='1' vmaj='1' codename='led_5mm_clip1' x='-55' y='-9' z='-3.85' xsz='3.84615' ysz='3.84615' zsz='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='pin' data='$PORTA.3' />
					<value target='polarity' data='001' />
					<value target='on_color' data='8453975' />
					<value target='show_label' data='002' />
					<value target='label_property' data='pin' />
					<value target='label_color' data='16777215' />
					<value target='label_scale' data='1.000000' />
					<value target='label_auto_scale' data='0' />
					<value target='label_position' data='003' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='textbox' codename='textbox2' x='-9' y='-7' z='0.5' xsz='46' ysz='15' zsz='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='Color' data='16777215' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='FontSize' data='12.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='Comp. 1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='7fdaec78-394e-4ec9-a578-4f1a12a12076' vmin='1' vmaj='1' codename='led_5mm_clip2' x='-55' y='-50' z='-3.85' xsz='3.84615' ysz='3.84615' zsz='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='pin' data='$PORTA.4' />
					<value target='polarity' data='001' />
					<value target='on_color' data='8453975' />
					<value target='show_label' data='002' />
					<value target='label_property' data='pin' />
					<value target='label_color' data='16777215' />
					<value target='label_scale' data='1.000000' />
					<value target='label_auto_scale' data='0' />
					<value target='label_position' data='003' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='textbox' codename='textbox1' x='23' y='-47' z='0.5' xsz='112' ysz='14' zsz='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='Color' data='16777215' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='FontSize' data='12.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='Comp. 2 ( open drain )' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='textbox' codename='textbox4' x='12' y='41' z='0.5' xsz='183' ysz='13' zsz='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='Color' data='16777215' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='FontSize' data='12.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='Comparator output at Comp. 1  (RA3)' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='textbox' codename='textbox5' x='11' y='24' z='0.5' xsz='182' ysz='13' zsz='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='Color' data='16777215' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='FontSize' data='12.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='Comparator output at Comp. 2  (RA4)' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='textbox' codename='textbox3' x='-23' y='57' z='0.5' xsz='114' ysz='13' zsz='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='Color' data='16777215' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='FontSize' data='12.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='Comparator Mode 110' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='32896' 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='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---------------------wAAAAAUAAAAJQUAAEYCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Int_Comparator' mode='0' placement='LAAAAAAAAAABAAAA----------8AAAAAFAAAAAAAAAAUAAAAJQUAAEYCAAA' zoom='85' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
