<root>
<document schema='101' license='1,skquah2007,KZMY45' title='' description='' target='PIC.16F.16F876A' >
	<config data='!0,3f71%0,1%2,0%3,0%6,1%7,0%9,3%b,1%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 />
	<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='' 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='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='GasSensor_sw' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='keyval' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Start_sw' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Reset_sw' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='NewTime_sw' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Keypad_On' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Digit' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Minute' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Direction' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Main' description='16F876A, Keypad Timer with 3 digits counter.. 000 ~  999 minutes..' >
						<command class_type='call' title='Start LCD and panel display' macro='Initialise' />
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='SV means Set Value of timer in minutes' component='lcd_eb005' macro='PrintString' >
							<argument exp='&quot;SV =    Min    M&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
							<argument exp='0' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='PV means Play Value of timer in minutes' component='lcd_eb005' macro='PrintString' >
							<argument exp='&quot;PV =    Min    &quot;' />
						</command>
						<command class_type='label' title='Connection Point' labelid='1' labelname='B' />
						<command class_type='loop' title='Loop' type='0' exp='1' >
							<flowline >
								<command class_type='input' title='Keypad &apos;on&apos; switch' mode='1' port='1048577' mask='4' exp='Keypad_On' />
								<command class_type='decision' title='' exp='Keypad_On = 1' swap='0' >
									<flowline >
										<command class_type='label' title='Connection Point' labelid='0' labelname='A' />
										<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
											<argument exp='0' />
											<argument exp='0' />
										</command>
										<command class_type='call' title='SV means Set Value in minutes' component='lcd_eb005' macro='PrintString' >
											<argument exp='&quot;SV =    Min    M&quot;' />
										</command>
										<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
											<argument exp='0' />
											<argument exp='1' />
										</command>
										<command class_type='call' title='PV means Play Value in minutes' component='lcd_eb005' macro='PrintString' >
											<argument exp='&quot;PV =    Min    &quot;' />
										</command>
										<command class_type='calculation' title='Calculation' >
											<exp exp='keyval = 0' />
											<exp exp='Digit = 0' />
											<exp exp='Minute = 0' />
											<exp exp='' />
										</command>
										<command class_type='loop' title='Enterl 3 digits and  &apos;press #&apos;  ( Enter ) key .' type='0' exp='(Digit &lt; 4) AND (keyval &lt;&gt; 11)' start='0' >
											<flowline >
												<command class_type='call' title='Get keypad ' component='keypad_eb014' macro='GetNumber' >
													<return exp='keyval' />
												</command>
												<command class_type='decision' title=' * Key = 10  ( Clear key )' exp='keyval = 10' swap='0' >
													<flowline >
														<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Clear' />
														<command class_type='goto' title='Goto Connection Point' labelid='0' labelname='' />
													</flowline>
													<flowline >
														<command class_type='call' title='Get keypad' component='keypad_eb014' macro='GetNumber' >
															<return exp='keyval' />
														</command>
														<command class_type='decision' title='Decision' exp='keyval &lt; 10' swap='0' >
															<flowline >
																<command class_type='comment' title='' comment='Add new digits . ' textarea='12,0,12,0' />
																<command class_type='calculation' title='Calculation' >
																	<exp exp='Minute = (Minute * 10) + keyval' />
																</command>
																<command class_type='calculation' title='Calculation' >
																	<exp exp='Digit = Digit + 1' />
																</command>
																<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
																	<argument exp='4' />
																	<argument exp='0' />
																</command>
																<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintNumber' >
																	<argument exp='Minute' />
																</command>
																<command class_type='comment' title='' comment='Wait for key to be released .' textarea='12,0,12,0' />
																<command class_type='loop' title='Loop' type='0' exp='keyval &lt;&gt; 255' start='0' >
																	<flowline >
																		<command class_type='call' title='Get keypad' component='keypad_eb014' macro='GetNumber' >
																			<return exp='keyval' />
																		</command>
																	</flowline>
																</command>
																<command class_type='decision' title='If Digits is more than 3 ?' exp='Digit &gt; 3' swap='0' >
																	<flowline >
																		<command class_type='comment' title='' comment='1) If digit is more than 3, 
   re- enter digits again .  ' textarea='12,0,12,0' />
																		<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Clear' />
																		<command class_type='goto' title='Goto Connection Point' labelid='1' labelname='' />
																	</flowline>
																	<flowline />
																</command>
															</flowline>
															<flowline />
														</command>
													</flowline>
												</command>
												<command class_type='comment' title='' comment='1) Digit &lt; 4 means, not more than 3 digits .
2) Keyval &lt; &gt; 11 means, not more or not less than 11 .
   This is &apos;#&apos; key used as Enter key . ' textarea='12,0,12,0' />
											</flowline>
										</command>
										<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
											<argument exp='12' />
											<argument exp='0' />
										</command>
										<command class_type='call' title='Print 2 spaces' component='lcd_eb005' macro='PrintString' >
											<argument exp='&quot;  &quot;' />
										</command>
										<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
											<argument exp='12' />
											<argument exp='0' />
										</command>
										<command class_type='call' title='Print (Minute)' component='lcd_eb005' macro='PrintNumber' >
											<argument exp='Minute' />
										</command>
										<command class_type='delay' title='Delay' exp='100' type='1' />
										<command class_type='goto' title='Goto Connection Point' labelid='1' labelname='' />
									</flowline>
									<flowline />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Initialise' description='Initialise page : Initialise LCD and panel headers' >
						<command class_type='output' title='Valve &apos;off&apos;' mode='1' port='1048577' mask='16' exp='0' />
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Start' />
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintString' >
							<argument exp='&quot;Hello&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
							<argument exp='0' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintString' >
							<argument exp='&quot;World&quot;' />
						</command>
						<command class_type='delay' title='Delay' exp='3' type='2' />
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Clear' />
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='b07090da-50a4-41ed-97d8-99016c092a14' vmin='0' vmaj='1' codename='keypad_eb014' x='-59' y='-42' z='5.1' xsz='0.882353' ysz='0.866426' 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='port' data='005' />
					<value target='pin_col1' data='$PORTC.3' />
					<value target='pin_col2' data='$PORTC.2' />
					<value target='pin_col3' data='$PORTC.1' />
					<value target='pin_row1' data='$PORTC.7' />
					<value target='pin_row2' data='$PORTC.6' />
					<value target='pin_row3' data='$PORTC.5' />
					<value target='pin_row4' data='$PORTC.4' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='d29dda88-17de-4008-991a-c881890d4c57' vmin='1' vmaj='1' codename='lcd_eb005' x='36' y='28' z='3.575' xsz='2' ysz='1.92837' 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_0' data='$PORTA.2' />
					<value target='Pin_Data_1' data='$PORTA.3' />
					<value target='Pin_Data_2' data='$PORTA.4' />
					<value target='Pin_Data_3' data='$PORTA.5' />
					<value target='Pin_RS' data='$PORTA.0' />
					<value target='Pin_E' data='$PORTA.1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='textbox' codename='textbox4' x='9' y='69.5' z='0.5' xsz='60' ysz='9' 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='8.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='LCD (RA0 ~ RA5)' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='textbox' codename='textbox5' x='-56' y='-79' z='0.5' xsz='70' ysz='8' 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='8.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='Keypad (RC0 ~ RC7)' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='textbox' codename='textbox7' x='-28' y='-53' z='0.5' xsz='14' 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='8.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='  #
Set
 ' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='textbox' codename='textbox8' x='-89' y='-54' z='3.5' xsz='18' ysz='16' 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='8.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='    *
Clear
 ' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='5c1da48f-ce54-4622-bdd9-fc812e373696' vmin='0' vmaj='1' codename='sw_push_rnd_pnl1' x='-80' y='58' z='-6.175' xsz='0.851064' ysz='0.851064' 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='$PORTB.1' />
					<value target='polarity' data='000' />
					<value target='debounce' data='30' />
					<value target='operation' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='textbox' codename='textbox2' x='-79' y='70' z='0.5' xsz='38' ysz='8' 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='8.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='Start (RB1)' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='5c1da48f-ce54-4622-bdd9-fc812e373696' vmin='0' vmaj='1' codename='sw_push_rnd_pnl2' x='-80' y='29' z='-6.175' xsz='0.851064' ysz='0.851064' 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='$PORTB.0' />
					<value target='polarity' data='000' />
					<value target='debounce' data='30' />
					<value target='operation' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='textbox' codename='textbox3' x='-76' y='42' z='0.5' xsz='40' ysz='7' 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='8.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='Reset (RB0)' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='5c1da48f-ce54-4622-bdd9-fc812e373696' vmin='0' vmaj='1' codename='sw_push_rnd_pnl3' x='-79' y='-2' z='-6.175' xsz='0.851064' ysz='0.851064' 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='$PORTB.2' />
					<value target='polarity' data='000' />
					<value target='debounce' data='30' />
					<value target='operation' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='textbox' codename='textbox6' x='-74' y='11' z='2.1' xsz='61' ysz='9' 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='8.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='Keypad &apos;on&apos; (RB2)' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='textbox' codename='textbox12' x='64' y='-57' z='0.5' xsz='23' ysz='10' 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='9.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='Valve' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='7fdaec78-394e-4ec9-a578-4f1a12a12076' vmin='1' vmaj='1' codename='led_5mm_clip4' x='37' y='-58' z='-3.85' xsz='2.82051' ysz='2.82051' 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='$PORTB.4' />
					<value target='polarity' data='001' />
					<value target='on_color' data='255' />
					<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='45' y='-17' z='0.5' xsz='112' ysz='9' 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='8.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='** SV means Set Value in minutes' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='textbox' codename='textbox9' x='46' y='-28' z='0.5' xsz='114' ysz='9' 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='8.000000' />
					<value target='AlignX' data='0' />
					<value target='AlignY' data='0' />
					<value target='Text' data='** PV means Play Value in minutes' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='0' brightness='102' perspective='0' >
		<background rgb='8388694' 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='5751039' img='' style='0' />
		<table rgb='16729600' 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='33' scrollx='0' scrolly='1319' flags='0' />
		<view type='0' name='Initialise' mode='0' placement='LAAAAAAAAAABAAAA----------8AAAAAFAAAAAAAAAAUAAAAJQUAAEYCAAA' zoom='50' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
