<root>
<document schema='101' license='1,Lawrence Miranda,ZA3F92' title='' description='' target='PIC16.30F.30F3012' >
	<config data='!0,8701!10,3f!20,723!30,310f!40,330f!50,7!60,c003%0,701%e,2%10,f%14,3%1f,0%20,3%24,2%27,0%28,7%2f,0%30,f%38,1%3c,3%40,f%48,3%4c,3%50,1%51,3%60,3%6e,1%6f,1' clkspd='29480000' 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='1000' />
			<data name='usev9' value='0' />
			<data name='breaks' value='8' />
			<data name='stacks' value='8' />
			<data name='clkport' value='1' />
			<data name='clkbit' value='5' />
			<data name='dataport' value='1' />
			<data name='databit' value='4' />
			<data name='ghostype' value='1' />
			<data name='monitor' value='1' />
			<data name='ictloop' value='1' />
			<data name='ictrate' value='1000' />
			<data name='ictmask' value='-1' />
			<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='Data' />
		<watch expr='trigger' />
		<watch expr='active' />
		<watch expr='call' />
	</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='Misc' 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='tempData' type='u16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='count' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='active' type='b1' 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='Data' type='u16' description='' isconst='0' isinit='1' usrinit='2048' setinit='2048' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Peak' type='u16' description='' isconst='0' isinit='1' usrinit='32750' setinit='32750' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Trough' type='u16' description='' isconst='0' isinit='1' usrinit='32750' setinit='32750' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='call' type='u16' description='' isconst='0' isinit='1' usrinit='32000' setinit='32000' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='trigger' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</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='send_clay_off' description='' >
						<command class_type='call' title='Call Component Macro' component='SendClay_led' macro='TurnOff' />
						<command class_type='interrupt' title='Interrupt' enable='0' name='TMR2' >
							<settings timer='1' prescale='1' postscale='-1' rollover='0' bitcount='-1' trigger='3' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
							</settings>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='timer_tick' description='' >
						<command class_type='call' title='12 bit audio input' component='Voice_Input' macro='RawSampleInt' >
							<return exp='tempData' />
						</command>
						<command class_type='calculation' title='Calculation' >
							<exp exp='Data = tempData &lt;&lt; 4' />
						</command>
						<command class_type='call' title='Call Component Macro' component='DSPInput1' macro='AddRawTick' >
							<argument exp='Data' />
						</command>
						<command class_type='call' title='Filter Signal' textarea='36,0,511,300' component='DSPFilter1' macro='FilterTick' />
						<command class_type='call' title='Call Component Macro' component='DSPLevel1' macro='ReadPeakTick' >
							<return exp='Peak' />
						</command>
						<command class_type='call' title='Call Component Macro' component='DSPLevel1' macro='ReadTroughTick' >
							<return exp='Trough' />
						</command>
						<command class_type='calculation' title='Calculation' >
							<exp exp='call = (Peak - Trough)' />
						</command>
						<command class_type='call' title='Call Component Macro' component='DSPSystem1' macro='TickAllBuffers' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='trigger = 1' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='power_up' description='' >
						<command class_type='call' title='Call Component Macro' component='PowerUp_led' macro='TurnOn' />
						<command class_type='call' title='Call Component Macro' component='PowerUp_led' macro='TurnOff' />
						<command class_type='delay' title='Delay' exp='2' type='2' />
						<command class_type='interrupt' title='Enable Timer Tick 4800' textarea='36,0,511,300' enable='1' name='TMR1' call='timer_tick' >
							<settings timer='1' prescale='1' postscale='-1' rollover='1535' bitcount='-1' trigger='3' maskhi='-----------------wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAA' masklo='-----------------wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAA' >
								<option value='0' />
								<option value='0' />
								<option value='1535' />
								<option value='-1' />
							</settings>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<command class_type='delay' title='Start_up Delay' exp='100' type='1' />
						<command class_type='call' title='Call Component Macro' textarea='36,0,511,300' component='DSPSystem1' macro='Initialise' />
						<command class_type='call' title='Call Component Macro' component='SendClay_led' macro='TurnOff' />
						<command class_type='call' title='Call Component Macro' component='Voice_Input' macro='RawEnable' />
						<command class_type='call' title='Call Macro' macro='power_up' />
						<command class_type='loop' title='Loop' textarea='36,0,511,300' type='0' exp='1' >
							<flowline >
								<command class_type='decision' title='One Time' exp='trigger' swap='0' >
									<flowline >
										<command class_type='call' title=' input pin 6' component='Active_sw' macro='ReadState' >
											<return exp='active' />
										</command>
										<command class_type='decision' title='Decision' exp='active = 1' swap='0' >
											<flowline >
												<command class_type='decision' title='Volume Treshhold' exp='call &gt; 5000' swap='0' >
													<flowline >
														<command class_type='call' title='Call Component Macro' component='SendClay_led' macro='TurnOn' />
														<command class_type='interrupt' title='Interrupt' enable='1' name='TMR2' call='send_clay_off' >
															<settings timer='1' prescale='256' postscale='-1' rollover='7000' bitcount='-1' trigger='3' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
																<option value='0' />
																<option value='3' />
																<option value='7000' />
																<option value='-1' />
															</settings>
														</command>
													</flowline>
													<flowline />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='calculation' title='Calculation' >
											<exp exp='trigger = 0' />
											<exp exp='' />
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='917f243e-4102-4bee-9998-81f18bc6ca9d' vmin='2' vmaj='1' codename='DSPSystem1' x='5.51699' y='118.308' z='0.57143' xsz='40' ysz='40' zsz='1.14286' 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='buffer_count' data='002' />
					<value target='simple_mode' data='1' />
					<value target='DSPsystem_ID' data='1' />
					<value target='buff_a_name' data='Audio' />
					<value target='buff_b_name' data='Filtered' />
					<value target='buff_c_name' data='Filtered2' />
					<value target='buff_d_name' data='Filtered3' />
					<value target='buff_e_name' data='Filtered4' />
					<value target='buff_f_name' data='MyBuf6' />
					<value target='buff_g_name' data='MyBuf7' />
					<value target='buff_h_name' data='MyBuf8' />
					<value target='buff_a_depth' data='001' />
					<value target='buff_a_sign' data='1' />
					<value target='buff_a_size' data='16' />
					<value target='buff_b_depth' data='001' />
					<value target='buff_b_sign' data='1' />
					<value target='buff_b_size' data='16' />
					<value target='buff_c_depth' data='001' />
					<value target='buff_c_sign' data='1' />
					<value target='buff_c_size' data='16' />
					<value target='buff_d_depth' data='001' />
					<value target='buff_d_sign' data='1' />
					<value target='buff_d_size' data='16' />
					<value target='buff_e_depth' data='001' />
					<value target='buff_e_sign' data='1' />
					<value target='buff_e_size' data='16' />
					<value target='buff_f_depth' data='001' />
					<value target='buff_f_sign' data='1' />
					<value target='buff_f_size' data='16' />
					<value target='buff_g_depth' data='001' />
					<value target='buff_g_sign' data='1' />
					<value target='buff_g_size' data='16' />
					<value target='buff_h_depth' data='001' />
					<value target='buff_h_sign' data='1' />
					<value target='buff_h_size' data='16' />
					<value target='buff_simp_depth' data='001' />
					<value target='buff_simp_sign' data='1' />
					<value target='buff_simp_size' data='16' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='317efb6a-2bad-4f83-a0bc-4ada0f4cd51e' vmin='3' vmaj='1' codename='DSPFilter1' x='-9.89056' y='30.6112' z='2.98251' xsz='40' ysz='23.1222' zsz='5.965' 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='buffer_manager' data='001' />
					<value target='input_a' data='000' />
					<value target='output_c' data='001' />
					<value target='size_a' data='16' />
					<value target='size_o' data='16' />
					<value target='depth_a' data='001' />
					<value target='depth_o' data='001' />
					<value target='sign_a' data='1' />
					<value target='sign_o' data='1' />
					<value target='type' data='001' />
					<value target='coef0' data='5' />
					<value target='coef1' data='3' />
					<value target='cutoff_shift1' data='0' />
					<value target='cutoff_shift2' data='0' />
					<value target='order' data='000' />
					<value target='co0' data='1.000000' />
					<value target='co1' data='1.000000' />
					<value target='co2' data='1.000000' />
					<value target='co3' data='1.000000' />
					<value target='co4' data='1.000000' />
					<value target='co5' data='1.000000' />
					<value target='co6' data='1.000000' />
					<value target='co7' data='1.000000' />
					<value target='co8' data='1.000000' />
					<value target='co9' data='1.000000' />
					<value target='co10' data='1.000000' />
					<value target='co11' data='1.000000' />
					<value target='cob0' data='1.000000' />
					<value target='cob1' data='1.000000' />
					<value target='sample_rate' data='4800.000000' />
					<value target='nyquist' data='2400.000000' />
					<value target='cut_off_0' data='480.000000' />
					<value target='cut_off_1' data='800.000000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='d7e01665-00e9-4091-8aa6-b9a0dd265bce' vmin='4' vmaj='1' codename='Voice_Input' x='-102.568' y='119.769' z='19.7367' xsz='48' ysz='48' zsz='39.4734' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='1' >
				<resources />
				<properties />
				<values >
					<value target='angle_start' data='225.000000' />
					<value target='angle_sweep' data='270.000000' />
					<value target='color' data='16777215' />
					<value target='ScopeTraces' data='1' />
					<value target='channel' data='0' />
					<value target='vrefvol' data='300' />
					<value target='vrefop' data='000' />
					<value target='convspd' data='003' />
					<value target='actime' data='40' />
					<value target='bits' data='10' />
					<value target='bitmul' data='0.004883' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c73d493a-b6a0-4dbe-b4b5-79648f67d11e' vmin='2' vmaj='1' codename='DSPInput1' x='-76.987' y='32.1349' z='2.98251' xsz='32' ysz='24' zsz='5.965' 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='buffer_manager' data='001' />
					<value target='input_a' data='000' />
					<value target='size_a' data='16' />
					<value target='depth_a' data='001' />
					<value target='sign_a' data='1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='d92e8259-f3a8-4176-a8c4-fe7ca42b2c3f' vmin='1' vmaj='1' codename='SendClay_led' x='105.392' y='121.556' z='-1.90735e-007' xsz='4.40367' ysz='4.0678' 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='001' />
					<value target='on_color' data='255' />
					<value target='length' data='4.000000' />
					<value target='show_label' data='001' />
					<value target='label_property' data='pin' />
					<value target='label_color' data='65535' />
					<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='ref' guid='d92e8259-f3a8-4176-a8c4-fe7ca42b2c3f' vmin='1' vmaj='1' codename='PowerUp_led' x='53.0861' y='120.938' z='-1.90735e-007' xsz='4.40367' ysz='4.0678' 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.7' />
					<value target='polarity' data='000' />
					<value target='on_color' data='49152' />
					<value target='length' data='4.000000' />
					<value target='show_label' data='001' />
					<value target='label_property' data='pin' />
					<value target='label_color' data='65535' />
					<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='ref' guid='e8f04af0-03d9-4b1c-83d3-9d0b1dc0f80a' vmin='1' vmaj='1' codename='Active_sw' x='-48.7394' y='118.508' z='-2.4395' xsz='2.95323' ysz='2.91124' 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='10' />
					<value target='operation' data='001' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='1392d5c3-35ba-4c7f-a539-7f30a09758e4' vmin='2' vmaj='1' codename='DSPOutput1' x='85.1778' y='30.7381' z='2.98251' xsz='43.5' ysz='32' zsz='5.965' 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='buffer_manager' data='001' />
					<value target='input_a' data='001' />
					<value target='size_a' data='16' />
					<value target='depth_a' data='001' />
					<value target='sign_a' data='1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='e648c3de-ec39-4a3f-bbd9-46e45cce4a63' vmin='2' vmaj='1' codename='DSPLevel1' x='85.5482' y='70.3643' z='2.98251' xsz='43.5' ysz='32' zsz='5.965' 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='buffer_manager' data='001' />
					<value target='input_a' data='001' />
					<value target='size_a' data='16' />
					<value target='depth_a' data='001' />
					<value target='sign_a' data='1' />
					<value target='decay' data='8' />
					<value target='decay_shift' data='3' />
					<value target='sample_shift' data='4' />
					<value target='buff_min' data='0' />
					<value target='buff_max' data='65535' />
				</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='-7' ye='81' ze='329.02' xt='-7' yt='81' 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='0' />
		<camera xe='3' ye='14' ze='520.117' xt='3' yt='14' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAABgUAAJMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='power_up' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAABgUAAJMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='send_clay_off' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAABgUAAJMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='timer_tick' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAABgUAAJMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
