<root>
<document schema='101' license='0,30day_95971225,K6WMPJ' title='' description='' target='PIC.18F.18F2550' >
	<config data='!0,fc!8,3e!10,ff!18,fe!20,ff!28,ff!30,9a!38,ff!40,ff!48,ff!50,ff!58,ff!60,ff!68,ff%5,1%3,3%0,4%8,e%e,0%f,0%15,1%10,1%11,3%13,3%18,0%19,f%28,1%29,1%2a,1%2f,1%30,0%32,0%35,0%36,0%37,1%40,1%41,1%42,1%43,1%4f,1%4e,1%50,1%51,1%52,1%53,1%5f,1%5e,1%5d,1%60,1%61,1%62,1%63,1%6e,1' clkspd='48000000' 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='30' vmin='0' vmaj='1' srcleaf='' visiblename='midi usb' description='' category='Comms' catenable='1' author='joe' manuname='flickers' manucode='' sysinfo='0' keywords='' dynamic='0' iconpath='..\Pictures\midi usb.bmp' />
		<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='joystick_data' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='4' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='oldswitches' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='oldy' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='oldx' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='stringvalue' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='4' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='retval' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Y' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='X' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Throttle' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='trigger2' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='switches' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='trigger' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='buttons_aquire' description='' >
						<command class_type='call' title='Call Component Macro' component='keypad_eb014' macro='GetAscii' />
					</flowline>
				</macro>
				<macro >
					<flowline name='ADC_ERROR' description='' >
						<command class_type='decision' title='Decision' exp='Y &lt; 8' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='Y = 4' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' exp='X &lt; 8' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='X = 4' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' exp='Y = 64' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='Y = 65' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' exp='X = 64' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='X = 65' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' exp='Y = 31' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='Y = 32' />
									<exp exp='' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' exp='X = 31' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='X = 32' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Initialise_MIDI' description='' >
						<command class_type='call' title='Call Component Macro' textmode='1' ccode='// Call Component Macro
// Call Component Macro: MIDI1::Initialise()
FCD_05991_MIDI1__Initialise();
' customize='1' component='MIDI1' macro='Initialise' />
						<command class_type='call' title='Call Macro' macro='aquire_VOLUME_ADC' />
						<command class_type='calculation' title='Initialise old XY values' >
							<exp exp='oldx = X' />
							<exp exp='oldy = Y' />
						</command>
						<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='PrintString' >
							<argument exp='&quot;FLICKERS MIXER&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='delay' title='Delay to allow device to start sending data correctly' exp='500' type='1' />
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Clear' />
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintString' >
							<argument exp='&quot;THE ULTIMATE&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='delay' title='Delay' exp='500' type='1' />
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintString' >
							<argument exp='&quot;MIDI CONTROLLER&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
							<argument exp='2' />
							<argument exp='1' />
						</command>
						<command class_type='delay' title='Delay' exp='500' type='1' />
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Clear' />
					</flowline>
				</macro>
				<macro >
					<flowline name='ADCsample' description='' >
						<command class_type='call' title='Call Component Macro' component='v5__adc0' macro='GetByte' >
							<return exp='X' />
						</command>
						<command class_type='call' title='Call Component Macro' component='v5__adc1' macro='GetByte' >
							<return exp='Y' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='aquire_VOLUME_ADC' description='' >
						<command class_type='call' title='aquired_ADC_value' macro='ADCsample' />
						<command class_type='decision' title='Decision' exp='X &lt; oldx' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='trigger = 1' />
								</command>
							</flowline>
							<flowline >
								<command class_type='decision' title='Decision' exp='X &gt; oldx' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' >
											<exp exp='trigger = 1' />
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
						</command>
						<command class_type='decision' title='Decision' exp='Y &lt; oldy' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='trigger2 = 1' />
								</command>
							</flowline>
							<flowline >
								<command class_type='decision' title='Decision' exp='Y &gt; oldy' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' >
											<exp exp='trigger2 = 1' />
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' >
							<exp exp='oldx = X' />
							<exp exp='oldy = Y' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='lcd_display' description='' >
						<command class_type='comment' title='' comment='show volume ADC
' textarea='12,0,12,0' />
						<command class_type='calculation' title='String Manipulation' >
							<exp exp='stringvalue = FloatToString$ (X)' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintString' >
							<argument exp='&quot;volume1=&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintString' >
							<argument exp='stringvalue' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='comment' title='' comment='notes display
' textarea='12,0,12,0' />
						<command class_type='calculation' title='String Manipulation' >
							<exp exp='stringvalue = FloatToString$ (Y)' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintString' >
							<argument exp='&quot;volume2=&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintString' >
							<argument exp='stringvalue' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
							<argument exp='0' />
							<argument exp='1' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='CollectSwitches' description='' >
						<command class_type='input' title='Input' mode='0' port='1048577' mask='255' exp='switches' />
						<command class_type='decision' title='Decision' exp='switches &lt;&gt; oldswitches' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='trigger = 1' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='calculation' title='Calculation' >
							<exp exp='oldswitches = switches' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<command class_type='call' title='Call Macro' macro='Initialise_MIDI' />
						<command class_type='interrupt' title='Interrupt' enable='1' name='TMR0' call='ADCsample' >
							<settings timer='1' prescale='8' postscale='-1' rollover='-1' bitcount='-1' trigger='3' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='0' />
								<option value='0' />
								<option value='3' />
								<option value='-1' />
							</settings>
						</command>
						<command class_type='loop' title='Infinite Loop' type='0' exp='1' >
							<flowline >
								<command class_type='calculation' title='No Data To Send' >
									<exp exp='trigger2 = 0' />
								</command>
								<command class_type='calculation' title='No Data To Send' >
									<exp exp='trigger = 0' />
								</command>
								<command class_type='call' title='Collect and Compare XY' macro='aquire_VOLUME_ADC' />
								<command class_type='delay' title='Delay' exp='1' type='1' />
								<command class_type='calculation' title='Calculation' >
									<exp exp='X = X / 2' />
									<exp exp='Y = Y / 2' />
								</command>
								<command class_type='call' title='Call Macro' macro='ADC_ERROR' />
								<command class_type='call' title='Call Macro' macro='lcd_display' />
								<command class_type='decision' title='If there is data to send' exp='trigger' swap='0' >
									<flowline >
										<command class_type='call' title='volume1 chanel 1' ccode='// Call Component Macro
// Call Component Macro: MIDI1::SendControl(0, 60, 0)
FCD_05991_MIDI1__SendControl(0, 60, 0);
' component='MIDI1' macro='SendControl' >
											<argument exp='0' />
											<argument exp='60' />
											<argument exp='X' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='If there is data to send' exp='trigger2' swap='0' >
									<flowline >
										<command class_type='call' title='volume 2 channel 1' ccode='// Call Component Macro
// Call Component Macro: MIDI1::SendControl(0, 60, 0)
FCD_05991_MIDI1__SendControl(0, 60, 0);
' component='MIDI1' macro='SendControl' >
											<argument exp='0' />
											<argument exp='50' />
											<argument exp='Y' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='delay' title='Delay' exp='2' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='ba1c2da7-b596-40e2-af9a-02b90f325e1a' vmin='0' vmaj='0' codename='v5__keypad0' 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 />
				<macros />
			</component>
			<component class_type='ref' guid='1a8c2bb7-8bed-4a1c-9186-ba24688c8840' vmin='552' vmaj='16' codename='v5__adc0' x='-16' y='24.0002' z='0' xsz='24' ysz='213.333' zsz='18.45' 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='tang_col' data='2960685' />
					<value target='mark_col' data='255' />
					<value target='channel' data='1' />
					<value target='vrefvol' data='500' />
					<value target='vrefop' data='000' />
					<value target='convspd' data='000' />
					<value target='actime' data='10' />
					<value target='bits' data='10' />
					<value target='bitmul' data='0.004883' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='1a8c2bb7-8bed-4a1c-9186-ba24688c8840' vmin='552' vmaj='16' codename='v5__adc1' x='-56' y='28.7307' z='0' xsz='24' ysz='208' zsz='18.45' 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='tang_col' data='2960685' />
					<value target='mark_col' data='255' />
					<value target='channel' data='0' />
					<value target='vrefvol' data='500' />
					<value target='vrefop' data='000' />
					<value target='convspd' data='000' />
					<value target='actime' data='10' />
					<value target='bits' data='10' />
					<value target='bitmul' data='0.004883' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='b07090da-50a4-41ed-97d8-99016c092a14' vmin='40' vmaj='16' codename='keypad_eb014' x='-234.5' y='72' z='5.1' xsz='3.92157' ysz='2.77256' 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 >
					<value target='port' data='001' />
					<value target='pin_col1' data='$PORTB.0' />
					<value target='pin_col2' data='$PORTB.1' />
					<value target='pin_col3' data='$PORTB.2' />
					<value target='pin_row1' data='$PORTB.4' />
					<value target='pin_row2' data='$PORTB.5' />
					<value target='pin_row3' data='$PORTB.6' />
					<value target='pin_row4' data='$PORTB.7' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='a9b43242-9ccc-4f1c-b2d1-acdfbe420fc1' vmin='808' vmaj='16' codename='MIDI1' x='224' y='56' z='-10.23' xsz='112' ysz='56.0001' zsz='1.51' 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='CHANNEL' data='000' />
					<value target='TX' data='$PORTC.6' />
					<value target='RX' data='$PORTC.7' />
					<value target='TXRemap' data='' />
					<value target='RXRemap' data='' />
					<value target='label' data='MIDI' />
					<value target='DataSource' data='000' />
					<value target='Midi_Port' data='000' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='d29dda88-17de-4008-991a-c881890d4c57' vmin='296' vmaj='16' codename='lcd_eb005' x='196' y='204' z='813.575' xsz='3.9' ysz='2.86501' 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 >
					<value target='Pin_Data_0' data='$PORTB.0' />
					<value target='Pin_Data_1' data='$PORTB.1' />
					<value target='Pin_Data_2' data='$PORTB.2' />
					<value target='Pin_Data_3' data='$PORTB.3' />
					<value target='Pin_RS' data='$PORTB.4' />
					<value target='Pin_E' data='$PORTB.5' />
				</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='1110' 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---------------------wAAAAAUAAAANQUAAFQCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ADC_ERROR' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAANQUAAFQCAAA' zoom='75' scrollx='0' scrolly='673' flags='0' />
		<view type='0' name='Initialise_MIDI' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAANQUAAFQCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='aquire_VOLUME_ADC' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAANQUAAFQCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ADCsample' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAANQUAAFQCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='lcd_display' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAANQUAAFQCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
