<root>
<document schema='101' license='1,bARRY wETTON,K4RR9E' title='' description='' target='PIC.16F.16F1615' >
	<config data='!0,9fc!10,1eff!20,f9f%0,4%5,1%6,1%7,1%9,0%b,1%c,0%d,0%10,3%12,1%17,1%18,0%19,1%1a,1%1a,1%1c,1%1d,0%20,1f%25,0%28,7%2b,1' clkspd='16000000' simspd='4' 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_models enabled='1' />
		<dll_upgrader enabled='1' />
		<dll_webhelp enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='Adress' />
		<watch expr='LED' />
		<watch expr='Type' />
		<watch expr='LED2' />
		<watch expr='level2' />
		<watch expr='Adress' />
		<watch expr='LED' />
		<watch expr='LED2' />
		<watch expr='LED4' />
		<watch expr='LED6' />
		<watch expr='LED7' />
		<watch expr='LED8' />
		<watch expr='Level_In' />
		<watch expr='Output' />
		<watch expr='Type' />
		<watch expr='level1' />
		<watch expr='level2' />
		<watch expr='level3' />
		<watch expr='level4' />
		<watch expr='level5' />
		<watch expr='level6' />
		<watch expr='level7' />
		<watch expr='level8' />
		<watch expr='LED_X' />
		<watch expr='LED1' />
		<watch expr='LED3' />
		<watch expr='LED5' />
	</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='0' />
			<data name='ClockPin' value='1' />
			<data name='DataPort' value='0' />
			<data name='DataPin' value='0' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='11' />
			<data name='CalculatedCommsDelay' value='11' />
		</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='9fc8d00d-d648-42a9-b6e8-222aa2b70207' 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 />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='level6' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='level5' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='level4' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='level3' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='level2' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='LED_CONT' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='level1' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='LED' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</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='Output' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Address_Count' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Tick' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Adress' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Type' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Input' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Level_In' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='flash_flag' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='LED8' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='LED7' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='LED6' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='LED5' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='LED4' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='LED3' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='time_count' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='LED_X' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='LED2' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='level8' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</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='LED1' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='level7' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='inputs' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Get multiplexed input level' cmdcolor='1975743' cmdcolor_sec='1975743' component='pot_trim_finger1' macro='GetByte' >
							<return exp='Level_In' />
						</command>
						<command class_type='input' title='Get multiplexed input type (0-10V, 4-20mA)' cmdcolor='3610239' cmdcolor_sec='3610239' mode='1' port='1048578' mask='32' exp='Type' />
						<command class_type='comment' title='' comment='If chan is set to 4-20mA and the input voltage is less than 1V
4mA into 249R chan is unused' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
						<command class_type='decision' title='Is chan used' cmdcolor='3568629' cmdcolor_sec='3568629' exp='Type = 0 &amp;&amp; Level_In &lt; 50' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='LED = 0' />
									<exp exp='Level_In = 0' />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='LED = 1' />
								</command>
							</flowline>
						</command>
						<command class_type='decision' title='0-10V = yes, 4-20mA = no' cmdcolor='3568629' cmdcolor_sec='3568629' exp='Type = 1' swap='0' >
							<flowline />
							<flowline >
								<command class_type='decision' title='chan unused' cmdcolor='3568629' cmdcolor_sec='3568629' exp='Level_In = 0' swap='0' >
									<flowline />
									<flowline >
										<command class_type='comment' title='' comment='add 4mA ofset and multiply for 0-254 output' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
										<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
											<exp exp='Level_In = Level_In - 50' />
											<exp exp='Level_In = Level_In * 255' />
											<exp exp='Level_In = Level_In / 205' />
											<exp exp='' />
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
						<command class_type='decision' title='blink led at 0.5Hz' cmdcolor='3568629' cmdcolor_sec='3568629' exp='LED_CONT = 1' swap='0' >
							<flowline >
								<command class_type='comment' title='' comment='Blink led to show highest input' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
								<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='Tick = 1' swap='0' >
									<flowline >
										<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='flash_flag = 0' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
													<exp exp='flash_flag = 1' />
													<exp exp='LED = 1' />
												</command>
											</flowline>
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
													<exp exp='flash_flag = 0' />
													<exp exp='LED = 0' />
												</command>
											</flowline>
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
							<flowline />
						</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 code is for an 8 to 1 multiplexer for 0-10v or 4-20mA set of inputs.
The multiplexed input is 0n RA1. The highest detected input has
its input leved outputted by the DAC on RA0. There are 8 channel LEDS
charlieplexed on RC2 to RC4, unused channels have their LED switched
off, and the highest level flashes at 0.5Hz. The input multiplexers
are driven from A2,A4 &amp; A5. The digital type select multiplexed signal
is on  RC0.
The processor is an PIC16F1615 running at 16MHz
 ' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
						<command class_type='native' title='C Code' ccode='OSCCON = 0x7A;
/* set int osc to 16MHz*/' cmdcolor='3389439' cmdcolor_sec='3389439' language='C' />
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='Address_Count = 0 /* clear varibles*/' />
							<exp exp='Output = 0' />
							<exp exp='LED1 = 0' />
							<exp exp='LED2 = 0' />
							<exp exp='LED3 = 0' />
							<exp exp='LED4 = 0' />
							<exp exp='LED5 = 0' />
							<exp exp='LED6 = 0' />
							<exp exp='LED7 = 0' />
							<exp exp='LED8 = 0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='DAC_Output1' macro='Enable' />
						<command class_type='interrupt' title='Interrupt' cmdcolor='3610239' cmdcolor_sec='3610239' enable='1' name='TMR2' call='time_tick' >
							<settings timer='1' prescale='128' postscale='15' rollover='208' bitcount='-1' trigger='3' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='7' />
								<option value='14' />
								<option value='208' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
							</settings>
						</command>
						<command class_type='loop' title='Loop' cmdcolor='3568629' cmdcolor_sec='3568629' type='0' exp='1' >
							<flowline >
								<command class_type='switch' title='Switch' textarea='36,25,36,25' cmdcolor='3568629' cmdcolor_sec='3568629' exp='Address_Count' >
									<case >
										<flowline >
											<command class_type='calculation' title='Select Variables for input macro' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='LED_CONT = LED1' />
												<exp exp='Adress = 0' />
												<exp exp='' />
											</command>
											<command class_type='call' title='Input' cmdcolor='1975743' cmdcolor_sec='1975743' macro='inputs' />
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='level1 = Level_In' />
												<exp exp='' />
											</command>
											<command class_type='comment' title='' comment='If channel is not used as detected by the input macro
keep channel led off' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
											<command class_type='decision' title='Switch LED off ' cmdcolor='3568629' cmdcolor_sec='3568629' exp='LED = 0' swap='0' >
												<flowline />
												<flowline >
													<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='led_charlieplexed1' macro='LEDOn' >
														<argument exp='1' />
													</command>
												</flowline>
											</command>
										</flowline>
									</case>
									<case exp='1' >
										<flowline >
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='LED_CONT = LED2' />
												<exp exp='Adress = 0x04' />
											</command>
											<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='inputs' />
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='level2 = Level_In' />
												<exp exp='' />
											</command>
											<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='LED = 0' swap='0' >
												<flowline />
												<flowline >
													<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='led_charlieplexed1' macro='LEDOn' >
														<argument exp='2' />
													</command>
												</flowline>
											</command>
										</flowline>
									</case>
									<case exp='2' >
										<flowline >
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='LED_CONT = LED3' />
												<exp exp='Adress = 0x10' />
												<exp exp='' />
											</command>
											<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='inputs' />
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='level3 = Level_In' />
												<exp exp='' />
											</command>
											<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='LED = 0' swap='0' >
												<flowline />
												<flowline >
													<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='led_charlieplexed1' macro='LEDOn' >
														<argument exp='3' />
													</command>
												</flowline>
											</command>
										</flowline>
									</case>
									<case exp='3' >
										<flowline >
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='LED_CONT = LED4' />
												<exp exp='Adress = 0x14' />
												<exp exp='' />
											</command>
											<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='inputs' />
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='level4 = Level_In' />
												<exp exp='' />
											</command>
											<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='LED = 0' swap='0' >
												<flowline />
												<flowline >
													<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='led_charlieplexed1' macro='LEDOn' >
														<argument exp='4' />
													</command>
												</flowline>
											</command>
										</flowline>
									</case>
									<case exp='4' >
										<flowline >
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='LED_CONT = LED5' />
												<exp exp='Adress = 0x20' />
											</command>
											<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='inputs' />
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='level5 = Level_In' />
												<exp exp='' />
											</command>
											<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='LED = 0' swap='0' >
												<flowline />
												<flowline >
													<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='led_charlieplexed1' macro='LEDOn' >
														<argument exp='5' />
													</command>
												</flowline>
											</command>
										</flowline>
									</case>
									<case exp='5' >
										<flowline >
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='LED_CONT = LED6' />
												<exp exp='Adress = 0x24' />
												<exp exp='' />
											</command>
											<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='inputs' />
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='level6 = Level_In' />
												<exp exp='' />
											</command>
											<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='LED = 0' swap='0' >
												<flowline />
												<flowline >
													<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='led_charlieplexed1' macro='LEDOn' >
														<argument exp='6' />
													</command>
												</flowline>
											</command>
										</flowline>
									</case>
									<case exp='6' >
										<flowline >
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='LED_CONT = LED7' />
												<exp exp='Adress = 0x30' />
											</command>
											<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='inputs' />
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='level7 = Level_In' />
												<exp exp='' />
											</command>
											<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='LED = 0' swap='0' >
												<flowline />
												<flowline >
													<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='led_charlieplexed1' macro='LEDOn' >
														<argument exp='7' />
													</command>
												</flowline>
											</command>
										</flowline>
									</case>
									<case exp='7' >
										<flowline >
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='LED_CONT = LED8' />
												<exp exp='Adress = 0x34' />
												<exp exp='' />
											</command>
											<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='inputs' />
											<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
												<exp exp='level8 = Level_In' />
												<exp exp='' />
												<exp exp='' />
											</command>
											<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='LED = 0' swap='0' >
												<flowline />
												<flowline >
													<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='led_charlieplexed1' macro='LEDOn' >
														<argument exp='8' />
													</command>
												</flowline>
											</command>
										</flowline>
									</case>
								</command>
								<command class_type='calculation' title='update multiplexer address' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='Address_Count = Address_Count + 1' />
								</command>
								<command class_type='decision' title='Select highest output' cmdcolor='3568629' cmdcolor_sec='3568629' exp='Address_Count = 8' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
											<exp exp='Address_Count = 0' />
											<exp exp='Output = 0' />
											<exp exp='' />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='level1 &gt; Output' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
													<exp exp='Output = level1' />
													<exp exp='LED_X = 0x01' />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='level2 &gt; Output' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
													<exp exp='Output = level2' />
													<exp exp='LED_X = 0x02' />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='level3 &gt; Output' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
													<exp exp='Output = level3' />
													<exp exp='LED_X = 0x04' />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='level4 &gt; Output' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
													<exp exp='Output = level4' />
													<exp exp='LED_X = 0x08' />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='level5 &gt; Output' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
													<exp exp='Output = level5' />
													<exp exp='LED_X = 0x10' />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='level6 &gt; Output' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
													<exp exp='Output = level6' />
													<exp exp='LED_X = 0x20' />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='level7 &gt; Output' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
													<exp exp='Output = level7' />
													<exp exp='LED_X = 0x40' />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='level8 &gt; Output' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
													<exp exp='Output = level8' />
													<exp exp='LED_X = 0x80' />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
											<exp exp='LED1 = (LED_X &gt;&gt; 0) &amp; 0x01' />
											<exp exp='LED2 = (LED_X &gt;&gt; 1) &amp; 0x01' />
											<exp exp='LED3 = (LED_X &gt;&gt; 2) &amp; 0x01' />
											<exp exp='LED4 = (LED_X &gt;&gt; 3) &amp; 0x01' />
											<exp exp='LED5 = (LED_X &gt;&gt; 4) &amp; 0x01' />
											<exp exp='LED6 = (LED_X &gt;&gt; 5) &amp; 0x01' />
											<exp exp='LED7 = (LED_X &gt;&gt; 6) &amp; 0x01' />
											<exp exp='LED8 = (LED_X &gt;&gt; 7) &amp; 0x01' />
										</command>
									</flowline>
									<flowline >
										<command class_type='delay' title='Delay' cmdcolor='7895044' cmdcolor_sec='7895044' exp='7' type='0' />
									</flowline>
								</command>
								<command class_type='output' title='Multiplexer address driver' cmdcolor='7895044' cmdcolor_sec='7895044' mode='2' port='1048576' mask='52' exp='Adress' />
								<command class_type='call' title='DAC output' cmdcolor='1975743' cmdcolor_sec='1975743' component='DAC_Output1' macro='SetOutput' >
									<argument exp='Output' />
								</command>
								<command class_type='calculation' title='Reset tick to 0' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='Tick = 0' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='time_tick' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='time_count = time_count + 1' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='time_count = 5' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='Tick = 1' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='8462ac99-ca8f-429b-953a-36dbe58ada72' vmin='4' vmaj='1' codename='pot_trim_finger1' x='-90' y='60' z='2.4' xsz='11.8794' ysz='11.8794' zsz='16' 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='0' />
					<value target='channel' data='1' />
					<value target='vrefvol' data='500' />
					<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='489ad870-75dd-4fc4-9879-aa83871ddef6' vmin='5' vmaj='1' codename='led_charlieplexed1' x='10' y='70' z='2.3' 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='1' poslock='1' >
				<resources />
				<properties />
				<values >
					<value target='pincount' data='004' />
					<value target='ledcount' data='12' />
					<value target='pin0' data='$PORTC.2' />
					<value target='pin1' data='$PORTC.3' />
					<value target='pin2' data='$PORTC.4' />
					<value target='pin3' data='$PORTC.5' />
					<value target='pin4' data='$PORTA.4' />
					<value target='pin5' data='$PORTA.5' />
					<value target='pin6' data='$PORTA.6' />
					<value target='pin7' data='$PORTA.7' />
					<value target='pin8' data='$PORTB.0' />
					<value target='pin9' data='$PORTB.1' />
					<value target='pin10' data='$PORTB.2' />
					<value target='pin11' data='$PORTB.3' />
					<value target='align' data='000' />
					<value target='spacing' data='7.000000' />
					<value target='width' data='5.000000' />
					<value target='height' data='5.000000' />
					<value target='depth' data='2.500000' />
					<value target='reverse' data='0' />
					<value target='shape' data='007' />
					<value target='target_object' data='' />
					<value target='color_led0' data='65280' />
					<value target='show_label' data='001' />
					<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='09222494-fbef-455b-9651-9e9e46592eb5' vmin='3' vmaj='1' codename='DAC_Output1' x='0' y='-40' z='2.25002' xsz='14.5' ysz='64' zsz='4.50004' 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='CHANNEL' data='001' />
					<value target='PORT' data='$PORTA.0' />
					<value target='InvPin' data='' />
					<value target='REF' data='0' />
					<value target='VREFOP' data='000' />
					<value target='VrefVol' data='5.000000' />
					<value target='TYPE' data='1' />
					<value target='Steps' data='256' />
					<value target='BITS' data='8' />
					<value target='Res' data='1:256' />
					<value target='VoltRes' data='0.019608' />
					<value target='enabled' data='1' />
					<value target='ScopeTraces' data='1' />
					<value target='OutVolt' data='3.549048' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='63177601-e8e2-4330-89d3-a4c5a7e228f5' vmin='1' vmaj='1' codename='led_array_pcb1' x='0' y='0' z='2.3' 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='1' poslock='1' >
				<resources />
				<properties />
				<values >
					<value target='count' data='3' />
					<value target='port' data='011' />
					<value target='PortByte' data='$PORTA0' />
					<value target='pin0' data='$PORTA.2' />
					<value target='pin1' data='$PORTA.4' />
					<value target='pin2' data='$PORTA.5' />
					<value target='pin3' data='$PORTB0.3' />
					<value target='pin4' data='$PORTB0.4' />
					<value target='pin5' data='$PORTB0.5' />
					<value target='pin6' data='$PORTB0.6' />
					<value target='pin7' data='$PORTB0.7' />
					<value target='polarity' data='001' />
					<value target='full_port' data='' />
					<value target='align' data='000' />
					<value target='spacing' data='12.000000' />
					<value target='reverse' data='1' />
					<value target='label_position' data='003' />
					<value target='color_led0' data='65280' />
					<value target='label_color' data='16777215' />
					<value target='bitmask' data='255' />
					<value target='inv_bitmask' data='-256' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c6c91999-1fe0-414e-b6aa-0a7ddc9a6417' vmin='1' vmaj='1' codename='sw_toggle_mtl_pcb1' x='-90' y='20' z='11.4105' 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='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTC.0' />
					<value target='polarity' data='000' />
					<value target='debounce' data='10' />
					<value target='operation' data='001' />
				</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---------------------wUAAAAYAAAAeQUAAMUBAAA' zoom='75' scrollx='0' scrolly='3325' flags='0' />
		<view type='0' name='inputs' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAeQUAAMUBAAA' zoom='75' scrollx='0' scrolly='482' flags='0' />
		<view type='0' name='time_tick' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAeQUAAMUBAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
