<root>
<document schema='101' license='10,DELAK_ALED,6QX2PB' title='' description='' target='PIC.16F.16F877A' >
	<config data='!0,3f72%0,2%2,0%3,0%6,1%7,0%9,3%b,1%8,1%d,1' clkspd='19660800' 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='monitor' value='1' />
			<data name='ictloop' value='0' />
			<data name='ictrate' value='20000' />
			<data name='ictmask' value='0' />
		</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='CH_Output' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='IR_detect' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Channel' type='u8' description='Data' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Main' description='' >
						<command class_type='comment' title='' comment='On your Philips RC5 compatible Remote:
Press 1 to toggle bit 0 (Think of it as Channel 1 or Relay 1 Etc.) 
Press 2 to toggle bit 1
Press 3 to toggle bit 2
Press 4 to toggle bit 3
Press 5 to toggle bit 4
Press 6 to toggle bit 5
Press 7 to toggle bit 6
Press 8 to toggle bit 7
Press 0 to switch all channels off.' textarea='12,0,976,300' />
						<command class_type='call' title='Enable RC5 Component' textarea='36,0,511,300' component='v5__rc50' macro='RXEnable' />
						<command class_type='loop' title='Loop' textarea='36,0,511,300' type='0' exp='1' >
							<flowline >
								<command class_type='loop' title='Loop' textarea='36,0,511,300' type='0' exp='IR_detect = 0' start='0' >
									<flowline >
										<command class_type='call' title='Check for IR' textarea='36,0,511,300' component='v5__rc50' macro='CheckRX' >
											<return exp='IR_detect' />
										</command>
									</flowline>
								</command>
								<command class_type='call' title='Decode IR' textarea='36,0,511,300' component='v5__rc50' macro='CollectData' >
									<return exp='Channel' />
									<argument exp='0' />
								</command>
								<command class_type='loop' title='Wait for key to be released' textarea='36,0,511,300' type='0' exp='IR_detect = 1' start='0' >
									<flowline >
										<command class_type='delay' title='Delay' textarea='36,0,511,300' exp='200' type='1' />
										<command class_type='call' title='Check for IR' textarea='36,0,511,300' component='v5__rc50' macro='CheckRX' >
											<return exp='IR_detect' />
										</command>
									</flowline>
								</command>
								<command class_type='decision' title='Key 0 pressed?' textarea='36,0,511,300' exp='Channel = 0' swap='0' >
									<flowline >
										<command class_type='calculation' title='All Channels Off' textarea='36,0,511,300' >
											<exp exp='CH_Output = 0' />
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title='Calculation' >
											<exp exp='CH_Output = CH_Output XOR (1 &lt;&lt; CHANNEL - 1)' />
										</command>
									</flowline>
								</command>
								<command class_type='output' title='Output' textarea='36,0,511,300' mode='2' port='1048577' mask='255' exp='CH_Output' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='81e90a9f-1594-4b34-8aef-5dd671dddc30' vmin='1' vmaj='1' codename='v5__rc50' x='-16' y='24' z='0' xsz='1.33333' ysz='2.15385' zsz='1.14286' 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 >
					<value target='ir_freq' data='36000' />
					<value target='timer_enval' data='1' />
					<value target='timer_avr_enval' data='' />
					<value target='timer_pre_val' data='119' />
					<value target='timer_arm_enval' data='' />
					<value target='lwidth' data='3' />
					<value target='hwidth' data='23' />
					<value target='cwidth' data='11' />
					<value target='pwm_period' data='138' />
					<value target='pwm_duty' data='69' />
					<value target='pwm_scaler' data='0' />
					<value target='rx_mode' data='1' />
					<value target='rx_invert_signal' data='1' />
					<value target='rx_addr_mask' data='0' />
					<value target='rx_addr_val' data='0' />
					<value target='rx_a0' data='0' />
					<value target='rx_a1' data='0' />
					<value target='rx_a2' data='0' />
					<value target='rx_a3' data='0' />
					<value target='rx_a4' data='0' />
					<value target='rx_pin' data='$PORTA.2' />
					<value target='v5rxaddress' data='0' />
					<value target='tx_mode' data='0' />
					<value target='tx_modulation' data='2' />
					<value target='tx_pwm_chan' data='0' />
					<value target='tx_pin' data='$PORTA.0' />
					<value target='tx_pwm_pin' data='$PORTC.2' />
					<value target='RemapPin' data='' />
					<value target='label' data='RC5' />
				</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='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---------------------wAAAAAUAAAAnwYAAJEDAAA' zoom='75' scrollx='0' scrolly='347' flags='0' />
	</layout>
</document>
</root>
