<root>
<document schema='101' license='1,csouter,GP0B0X' title='' description='' target='PIC16.24F.24FJ256GB106' >
	<config data='!0,ffff!10,82b6!20,7f7f%0,1%1,1%2,1%3,1%4,1%5,1%6,1%7,1%8,1%9,f%d,1%e,1%f,1%10,2%13,0%14,1%15,1%16,2%18,2%1b,0%1c,0%1f,1%20,f%24,1%25,1%26,1%27,0%28,3%2a,1%2b,1%2c,1%2d,1%2e,1%2f,0' 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='19' />
			<data name='digmask1' value='-1' />
			<data name='digmask2' value='-1' />
		</dll_dbg_icd>
		<dll_upgrader enabled='1' />
		<dll_webhelp enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='DAC_Command' />
		<watch expr='DAC_Command.Command_Value' />
	</debug>
	<ghost >
		<FK2 >
			<data name='FK2D0' port='4294967295' pin='4294967295' />
			<data name='FK2D1' port='4294967295' pin='4294967295' />
			<data name='FK2D2' port='4294967295' pin='4294967295' />
			<data name='FK2D3' port='4294967295' pin='4294967295' />
			<data name='FK2D4' port='4294967295' pin='4294967295' />
			<data name='FK2D5' port='4294967295' pin='4294967295' />
			<data name='FK2D6' port='4294967295' pin='4294967295' />
			<data name='FK2D7' port='4294967295' pin='4294967295' />
			<data name='FK2D8' port='4294967295' pin='4294967295' />
			<data name='FK2D9' port='4294967295' pin='4294967295' />
			<data name='FK2D10' port='4294967295' pin='4294967295' />
			<data name='FK2D11' port='4294967295' pin='4294967295' />
			<data name='FK2D12' port='4294967295' pin='4294967295' />
			<data name='FK2D13' port='4294967295' pin='4294967295' />
			<data name='FK2D14' port='4294967295' pin='4294967295' />
			<data name='FK2D15' port='4294967295' pin='4294967295' />
			<data name='FK2A0' port='4294967295' pin='4294967295' />
			<data name='FK2A1' port='4294967295' pin='4294967295' />
			<data name='FK2A2' port='4294967295' pin='4294967295' />
			<data name='FK2A3' port='4294967295' pin='4294967295' />
			<data name='FK2A4' port='4294967295' pin='4294967295' />
			<data name='FK2A5' port='4294967295' pin='4294967295' />
		</FK2>
		<ICD >
			<data name='AnalogPrescaleValue' value='19' />
			<data name='DigitalSampleRate' value='100000' />
			<data name='BreakpointCount' value='8' />
			<data name='CallStackDepthCount' value='8' />
			<data name='ClockPort' value='1' />
			<data name='ClockPin' value='6' />
			<data name='DataPort' value='1' />
			<data name='DataPin' value='7' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='0' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='42' />
			<data name='CalculatedCommsDelay' value='42' />
		</ICD>
		<pins >
			<digital A='0' B='33414' C='0' D='255' E='7' F='11' G='448' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
			<analog A='0' B='8' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
		</pins>
	</ghost>
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='9ceae35d-982a-4ccc-b4b1-ddbd130b2a98' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='1' 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 >
				<property name='COM Port' target='USB_Serial1::COM_port' typeid='12' hidden='0' locked='0' info='Hardware COM port to communicate with any connected USB serial devices or any other virtual COM ports.' />
			</properties>
			<values >
				<value target='USB_Serial1::COM_port' data='000' />
			</values>
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='NVIS' type='b1' description='Night vision mode (true for nigt vision, false for day vision)' isconst='0' isinit='1' usrinit='0' setinit='false' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Old_Backlight_Command' type='b1' description='Previous value of Backlight_Command' isconst='0' isinit='1' usrinit='0' setinit='false' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Push_Buttons_High' type='u8' description='High buts of the switch array' isconst='0' isinit='1' usrinit='15' setinit='0x0F' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Display_17' type='b1' description='True if 17 inch display, false for 12 inch display' isconst='0' isinit='1' usrinit='1' setinit='true' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='High_Bright' type='b1' description='High brightness control selection (true for high brightness)' isconst='0' isinit='1' usrinit='1' setinit='true' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Old_Bright_Switches' type='u8' description='Retained (previous) value of bright (D3/D4) command (keypad) bits' isconst='0' isinit='1' usrinit='3' setinit='3' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Push_Buttons_Low' type='u8' description='Input from reading the button array' isconst='0' isinit='1' usrinit='255' setinit='0xFF' />
				</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='I_Feedback' type='u16' description='Current feedback value' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='DAC_Command' type='u32' description='DAC commanded value' isconst='0' isinit='1' usrinit='65535' setinit='0x0000FFFF' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='BRIGHT_SWITCH_MASK' type='s16' description='Bits used by the brightness control switches' isconst='1' isinit='1' usrinit='24' setinit='0x18' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Video_In_Button' type='b1' description='State of the video input button' isconst='0' isinit='1' usrinit='1' setinit='1' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Old_Push_Buttons_High' type='u8' description='Previous value of the high bits of the switch array' isconst='0' isinit='1' usrinit='15' setinit='0x0F' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Old_Video_In_Button' type='b1' description='Previous value of video in command button' isconst='0' isinit='1' usrinit='1' setinit='1' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Backlight_Command' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='false' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='External_Video_Mode' type='b1' description='External Video Mode enabled' isconst='0' isinit='1' usrinit='0' setinit='false' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Bright_Switches' type='u8' description='Value of the D3/D4 command (keypad) bits' isconst='0' isinit='1' usrinit='3' setinit='3' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Old_Push_Buttons_Low' type='u8' description='Previous value of Button arrray' isconst='0' isinit='1' usrinit='255' setinit='0xFF' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='SHIFT_SWITCH_MASK' type='s16' description='Bit for the shift button in keypad array' isconst='1' isinit='1' usrinit='2' setinit='0x02' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Heartbeat' type='b1' description='Value for heartbet LED' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Heartbeat_LED' description='Invert the state of the Heartbeat LED' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Toggle Heartbeat' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='Heartbeat = !Heartbeat' />
						</command>
						<command class_type='output' title='Set Heartbeat LED' cmdcolor='7895044' cmdcolor_sec='7895044' mode='1' port='135266310' mask='1' exp='Heartbeat' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Send_32_Bit' description='Sends a 32 bit number out the USB port - does so by calling Send_Digit' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='Data_Value' type='u32' description='32 bit number to format and send as hex out the USB port' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='' cmdcolor='1975743' cmdcolor_sec='1975743' component='USB_Serial' macro='SendString' >
							<argument exp='&quot; 0x&quot;' />
						</command>
						<command class_type='call' title='Data Value MS Digit' cmdcolor='1975743' cmdcolor_sec='1975743' macro='Send_Digit' >
							<argument exp='((.Data_Value&amp;0xF000)&gt;&gt;24)' />
						</command>
						<command class_type='call' title='Data Value next digit' cmdcolor='1975743' cmdcolor_sec='1975743' macro='Send_Digit' >
							<argument exp='((.Data_Value&amp;0x0F00)&gt;&gt;16)' />
						</command>
						<command class_type='call' title='Data Value next digit' cmdcolor='1975743' cmdcolor_sec='1975743' macro='Send_Digit' >
							<argument exp='((.Data_Value&amp;0x00F0)&gt;&gt;8)' />
						</command>
						<command class_type='call' title='Data Value LS Digit' cmdcolor='1975743' cmdcolor_sec='1975743' macro='Send_Digit' >
							<argument exp='(.Data_Value&amp;0x000F)' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='USB_Initialization' description='Initialization of the usb interface for reporting data' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Initialize USB' cmdcolor='1975743' cmdcolor_sec='1975743' component='USB_Serial' macro='Initialise' />
					</flowline>
				</macro>
				<macro >
					<flowline name='USB_Report' description='Report certain key data values as a serial data stream to a host computer via the USB interface' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='decision' title='Is it a 17 inch display?' cmdcolor='3568629' cmdcolor_sec='3568629' exp='Display_17' swap='0' >
							<flowline >
								<command class_type='call' title='Send 1 for display size' cmdcolor='1975743' cmdcolor_sec='1975743' component='USB_Serial' macro='SendString' >
									<argument exp='&quot;17  &quot;' />
								</command>
							</flowline>
							<flowline >
								<command class_type='call' title='Send 0 for display size' cmdcolor='1975743' cmdcolor_sec='1975743' component='USB_Serial' macro='SendString' >
									<argument exp='&quot;12  &quot;' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='USB_Serial' macro='SendString' >
							<argument exp='&quot; DAC: &quot;' />
						</command>
						<command class_type='call' title='Send DAC command value (raw 32 bit)' cmdcolor='1975743' cmdcolor_sec='1975743' macro='Send_32_Bit' >
							<argument exp='DAC_Command' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='USB_Serial' macro='SendString' >
							<argument exp='&quot; I F/B:&quot;' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='Send_32_Bit' >
							<argument exp='I_Feedback' />
						</command>
						<command class_type='call' title='Send line termination' cmdcolor='1975743' cmdcolor_sec='1975743' component='USB_Serial' macro='SendString' >
							<argument exp='&quot;\r\n&quot;' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Send_Digit' description='Sends a digit as an ASCII character to the USB serial interface' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='Raw_Digit' type='u8' description='Value to convert to ASCII and send as a character' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Character_String' type='T8' description='String of one character to send to USB port' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='2' />
						</local>
						<command class_type='decision' title='Alpha or numeric character?' cmdcolor='3568629' cmdcolor_sec='3568629' exp='.Raw_Digit &gt; 9' swap='0' >
							<flowline >
								<command class_type='calculation' title='Alpha character to output' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='.Character_String[0] = .Raw_Digit - 10 + &apos;A&apos;' />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Numeric character to output' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='.Character_String[0] = .Raw_Digit + &apos;0&apos;' />
								</command>
							</flowline>
						</command>
						<command class_type='calculation' title='Null terminate string' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='.Character_String[1] = 0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='USB_Serial' macro='SendString' >
							<argument exp='.Character_String' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='USB Init' cmdcolor='1975743' cmdcolor_sec='1975743' component='USB_Serial' macro='Initialise' />
						<command class_type='loop' title='Loop' cmdcolor='3568629' cmdcolor_sec='3568629' type='0' exp='true' >
							<flowline >
								<command class_type='call' title='' cmdcolor='1975743' cmdcolor_sec='1975743' macro='Heartbeat_LED' />
								<command class_type='delay' title='Delay' cmdcolor='7895044' cmdcolor_sec='7895044' exp='100' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='3e28ac22-2855-410a-9660-0b0a4731e545' vmin='6' vmaj='1' codename='USB_Serial' x='10' y='40' z='0.755' xsz='60' ysz='26' zsz='1.51' 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='vendor_ID' data='4799' />
					<value target='product_ID' data='61456' />
					<value target='dev_name' data='Flowcode USB Serial' />
					<value target='dev_manufacturer' data='Matrix Multimedia Ltd.' />
					<value target='major_version' data='1' />
					<value target='minor_version' data='0' />
					<value target='RETURN' data='000' />
					<value target='enumeration_tout' data='0' />
					<value target='timeout' data='10' />
					<value target='usb_type' data='1' />
					<value target='TXBUFSZ' data='64' />
					<value target='RXBUFSZ' data='64' />
					<value target='driver_directory' data='$(srcdir)' />
					<value target='driver_filename' data='Flowcode_USB_Serial_Driver' />
					<value target='gen_driver' data='' />
					<value target='COM_port' data='000' />
					<value target='label' data='USB Serial' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='2105930' 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' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAWAQAAEcCAAA' zoom='85' scrollx='0' scrolly='2' flags='0' />
		<view type='0' name='Send_32_Bit' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAWAQAAEcCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
