<root>
<document scada='0' schema='102' license='1,allenkkwong,FRHMR9' title='' description='' fcversion='524802' target='PIC.16F.16LF1936' >
	<config data='!0,2ffa!10,1233%0,2%3,3%5,1%6,1%7,1%8,1%9,3%b,1%c,0%d,1%10,3%14,3%18,0%19,1%1a,0%1c,1%1d,0' clkspd='11059200' simspd='9' usewdt='1' constif='0' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='Status_ON' />
		<watch expr='Switch' />
	</debug>
	<traces />
	<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='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='16' />
			<data name='CalculatedCommsDelay' value='16' />
			<data name='AnalogEB2PrescaleValue' value='2' />
			<data name='DigitalEB2SampleRate' value='100000' />
		</ICD>
		<pins >
			<digital A='0' B='0' 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' />
			<analog A='0' B='0' 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='ce9f2000-4f69-4424-be92-ff762a5e8b5e' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='1' scadaCompatible='0' embeddedCompatible='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' scadavisible='1' interactive='1' solid='1' layer='0' poslock='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='Repeat_Send' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='KeyPressed' 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='Press_and_Hold_Sent' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='T6_WDT' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Switch' type='b1' description='1 is ON, 0 is OFF' isconst='0' isinit='1' usrinit='1' setinit='1' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Time_PressHold' type='s16' description='' isconst='1' isinit='1' usrinit='900' setinit='900' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Status_Music' type='b1' description='1 = Music, 0 = No Music' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='BT_CmdArray' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='30' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Status_Ext_2' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Status_Ext_1' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Status_ON' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='KeyValue' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Counter_Key' type='u16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='KeyPre' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0x00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Time_Debounce' type='s16' description='' isconst='1' isinit='1' usrinit='30' setinit='30' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='T6_500ms' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='T6_Counter' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='EC_Detect' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Counter_Silent' type='u16' 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>
				<variable public='0' >
					<def class_type='variable' name='Status_Standby' type='b1' description='1 = Standby' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='EC_Process' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='input' title='Input' cmdcolor='4664832' cmdcolor_sec='4470784' mode='1' port='1048576' mask='16' exp='EC_Detect' />
						<command class_type='calculation' title='Calculation' disable='1' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='EC_Detect = !EC_Detect' />
							<exp exp='// Toggle logic on Mar/11' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='PWR_EN' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='on' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.on == 1' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='Status_ON = 1' />
								</command>
								<command class_type='output' title='Output' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='1' exp='Status_ON' />
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='Status_ON = 0' />
								</command>
								<command class_type='output' title='Output' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='1' exp='Status_ON' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='BT_Reset' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='LowReset' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='BT Reset, 0=Reset' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.LowReset' swap='0' >
							<flowline >
								<command class_type='output' title='BT Normal=1' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='2' exp='1' />
							</flowline>
							<flowline >
								<command class_type='output' title='BT Reset=0' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='2' exp='0' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='BT_Init' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='BT_Reset' >
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='BT_MFB' >
							<argument exp='0' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='100' type='1' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='BT_Reset' >
							<argument exp='1' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='500' type='1' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='BT_CmdArray[0] = 0x02' />
							<exp exp='BT_CmdArray[1] = 0x00' />
							<exp exp='BT_CmdArray[2] = 0x50' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='BT_SendCommand' >
							<argument exp='3' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='BT_CmdArray[0] = 0x17' />
							<exp exp='BT_CmdArray[1] = 0x00' />
							<exp exp='BT_CmdArray[2] = 0x00' />
							<exp exp='BT_CmdArray[3] = 0x00' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='BT_SendCommand' >
							<argument exp='4' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='PT_Send_All' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='Start' />
						<command class_type='call' title='Send Address' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x88' />
						</command>
						<command class_type='call' title='Test Mode/Auto Zero/Auto Increment' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x20' />
						</command>
						<command class_type='call' title='Main source selector (0)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x30' />
						</command>
						<command class_type='call' title='Main Loudness (1)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0xc0' />
						</command>
						<command class_type='call' title='Soft Mute (2)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x01' />
						</command>
						<command class_type='call' title='Main Volume (3)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x00' />
						</command>
						<command class_type='call' title='Treble (4)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x04' />
						</command>
						<command class_type='call' title='Middle (5)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x00' />
						</command>
						<command class_type='call' title='Bass (6)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x29' />
						</command>
						<command class_type='call' title='Second Source (7)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x00' />
						</command>
						<command class_type='call' title='Sub/Mid/Bass (8)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x31' />
						</command>
						<command class_type='decision' title='EC enabled?' cmdcolor='12615680' cmdcolor_sec='15376912' exp='EC_Detect == 1' swap='0' >
							<flowline >
								<command class_type='call' title='Mixing Gain (9)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
									<argument exp='0x07' />
								</command>
							</flowline>
							<flowline >
								<command class_type='call' title='Mixing Gain (9)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
									<argument exp='0x0f' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Left Front Speaker Attenuation (10)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x00' />
						</command>
						<command class_type='call' title='Right Front Speaker Attenuation (11)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x00' />
						</command>
						<command class_type='decision' title='EC enabled?' cmdcolor='12615680' cmdcolor_sec='15376912' exp='EC_Detect == 1' swap='0' >
							<flowline >
								<command class_type='call' title='Speaker Attenuator Left Rear (12)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
									<argument exp='0x60' />
								</command>
								<command class_type='call' title='Speaker Attenuator Right  Rear (13)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
									<argument exp='0x60' />
								</command>
							</flowline>
							<flowline >
								<command class_type='call' title='Speaker Attenuator Left Rear (12)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
									<argument exp='0x03' />
								</command>
								<command class_type='call' title='Speaker Attenuator Right  Rear (13)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
									<argument exp='0x03' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Mixing Level (14)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x00' />
						</command>
						<command class_type='call' title='Sub Attenuation (15)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x00' />
						</command>
						<command class_type='comment' title='' comment='Byte 16) DC without HP filter' textarea='12,0,12,0' cmdcolor='10944511' cmdcolor_sec='11465458' />
						<command class_type='call' title='SA/Clock/AC Mode (16)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x00' />
						</command>
						<command class_type='call' title='Testing Audio Processor (17)' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='TransmitByte' >
							<argument exp='0x00' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='BT_MFB' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='HighEnable' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='BT MFB, 1=Enable' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.HighEnable' swap='0' >
							<flowline >
								<command class_type='output' title='MFB Enable=1' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='4' exp='1' />
							</flowline>
							<flowline >
								<command class_type='output' title='MFB Disable' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='4' exp='0' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='BT_SendCommand' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='DataSize' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='CS' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='temp' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.CS = 0' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='BT_MFB' >
							<argument exp='1' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='10' type='1' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='RS232_BT' macro='SendChar' >
							<argument exp='0x00' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='RS232_BT' macro='SendChar' >
							<argument exp='0xaa' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='RS232_BT' macro='SendChar' >
							<argument exp='0x00' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='RS232_BT' macro='SendChar' >
							<argument exp='.DataSize' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.CS = .CS - .DataSize' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.temp' exp='.DataSize' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='RS232_BT' macro='SendChar' >
									<argument exp='BT_CmdArray[.temp]' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.CS = .CS - BT_CmdArray[.temp]' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='RS232_BT' macro='SendChar' >
							<argument exp='.CS' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='10' type='1' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='BT_MFB' >
							<argument exp='0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='comment' title='' comment='This is a simplified FC. My original FC has also timer enabled. 
1) RA5 has to be set high as soon as there is power. This will locked a MOSFET 
   so as to maintain power to the circuit. The inital power up is by a tact
   switch. 
2) PWR_EN: light up some LEDs. Once the power is up, the user can 
   release the tact switch so that the RA5 will remain high. 
3) Currently, I have set the I2C using Channel 1. I have fixed by changing
   to software I2C to RA1(SDA) and RA2(SCL)
' textarea='12,0,12,0' cmdcolor='10944511' cmdcolor_sec='11465458' />
						<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='10' type='1' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='PWR_EN' >
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='BT_MFB' >
							<argument exp='1' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='1' type='1' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='RS232_BT' macro='Initialise' />
						<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='1' type='1' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='BT_Init' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='I2C_Master_PT' macro='Initialise' />
						<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='100' type='1' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='PT_Send_All' />
						<command class_type='native' title='C Code' ccode='WDTCON = 0x16; //set WDT 2s 0b0001 0110
WPUB = 0xff; // set Pull up for all port B

//OPTION_REGbits.nWPUEN = 0;' cmdcolor='7687168' cmdcolor_sec='8152576' language='C' />
						<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='1' type='1' />
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='0' exp='1' >
							<flowline >
								<command class_type='input' title='Input' cmdcolor='4664832' cmdcolor_sec='4470784' mode='1' port='1048576' mask='32' exp='Switch' />
								<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='Switch == 0' swap='0' >
									<flowline >
										<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='20' type='1' />
										<command class_type='input' title='Input' cmdcolor='4664832' cmdcolor_sec='4470784' mode='1' port='1048576' mask='32' exp='Switch' />
										<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='Switch == 0' swap='0' >
											<flowline >
												<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='PWR_EN' >
													<argument exp='0' />
												</command>
												<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='10' type='2' />
											</flowline>
											<flowline />
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='c73616d1-7ad0-45d9-aada-69ccfa4c5efc' vmin='0' vmaj='2' codename='RS232_BT' x='0' y='0' z='0' xsz='64' ysz='32' zsz='1.53' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='cal_uart::CHANNEL' data='001' />
					<value target='cal_uart::BAUD_LIST' data='009' />
					<value target='cal_uart::BAUD' data='115200' />
					<value target='cal_uart::DBITS' data='008' />
					<value target='cal_uart::RETURN' data='000' />
					<value target='cal_uart::ECHO' data='000' />
					<value target='cal_uart::UseTX' data='1' />
					<value target='cal_uart::TX' data='$PORTC.6' />
					<value target='cal_uart::OutputPins' data='007' />
					<value target='cal_uart::TXAlt' data='0' />
					<value target='cal_uart::UseRX' data='1' />
					<value target='cal_uart::RX' data='$PORTC.7' />
					<value target='cal_uart::InputPins' data='013' />
					<value target='cal_uart::RXAlt' data='0' />
					<value target='cal_uart::FLOWEN' data='000' />
					<value target='cal_uart::RTS' data='$PORTB.2' />
					<value target='cal_uart::CTS' data='$PORTB.1' />
					<value target='label' data='UART' />
					<value target='cal_uart::ScopeTraces' data='0' />
					<value target='cal_uart::ConsoleData' data='0' />
					<value target='cal_uart::ConsoleFormat' data='000' />
					<value target='cal_uart::ConsoleColumns' data='64' />
					<value target='cal_uart::DataSource' data='000' />
					<value target='cal_uart::com_port' data='000' />
					<value target='cal_uart::Injector' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='7fdaec78-394e-4ec9-a578-4f1a12a12076' vmin='1' vmaj='1' codename='led_5mm_clip1' x='50' y='20' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTC.0' />
					<value target='polarity' data='001' />
					<value target='on_color' data='8453975' />
					<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='ref' guid='24219805-113d-4b12-b6bd-e1b0b0c33981' vmin='4' vmaj='1' codename='I2C_Master_PT' x='70' y='-20' z='1.9775' xsz='64' ysz='32' zsz='2.125' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='cal_i2c::CHANNEL' data='001' />
					<value target='cal_i2c::BAUD_LIST' data='001' />
					<value target='cal_i2c::BAUD' data='100000' />
					<value target='cal_i2c::StopDel' data='1' />
					<value target='cal_i2c::SRC' data='000' />
					<value target='cal_i2c::SMB' data='000' />
					<value target='cal_i2c::ClockStretching' data='1' />
					<value target='cal_i2c::SDA' data='$PORTC.4' />
					<value target='cal_i2c::SDAPins' data='002' />
					<value target='cal_i2c::SCL' data='$PORTC.3' />
					<value target='cal_i2c::SCLPins' data='010' />
					<value target='label' data='I2C Master' />
					<value target='cal_i2c::ScopeTraces' data='0' />
					<value target='cal_i2c::ConsoleData' data='' />
					<value target='cal_i2c::Injector' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='26732594-ad79-472f-80ff-95d365b3b252' vmin='2' vmaj='1' codename='sw_push_pcb1' x='0' y='40' z='4.465' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTA.5' />
					<value target='polarity' data='001' />
					<value target='debounce' data='10' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='7292207' img='' style='0' />
		<camera xe='18.5502' ye='17.4059' ze='268.036' xt='18.5502' yt='17.4059' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='0' />
		<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---------------------wUAAAAeAAAAMwQAAFYCAAA' zoom='90' scrollx='20' scrolly='0' flags='0' />
		<view type='0' name='BT_SendCommand' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAMwQAAFYCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='BT_MFB' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAMwQAAFYCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='BT_Reset' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAMwQAAFYCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='BT_Init' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAMwQAAFYCAAA' zoom='55' scrollx='0' scrolly='20' flags='0' />
		<view type='0' name='PT_Send_All' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAMwQAAFYCAAA' zoom='75' scrollx='0' scrolly='1007' flags='0' />
		<view type='0' name='EC_Process' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAMwQAAFYCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='PWR_EN' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAMwQAAFYCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
