<root>
<document schema='101' license='1,Martin Whitlock,GCYPWG' title='' description='' guid='' target='PIC.16F.16LF1939' >
	<config data='!0,fe2!10,1633%0,2%3,0%5,1%6,1%7,1%8,1%9,3%b,1%c,0%d,0%10,3%14,3%18,0%19,1%1a,1%1c,1%1d,0' clkspd='32000000' simspd='1' usewdt='0' constif='0' />
	<plugins >
		<dll_dbg_icd enabled='0' >
			<data name='debug' value='1' />
			<data name='userpins' value='0' />
			<data name='speed' value='1000' />
			<data name='firmware' value='0000000000000000' />
			<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='1' />
			<data name='ictrate' value='1000' />
			<data name='ictmask' value='-1' />
		</dll_dbg_icd>
		<dll_dbg_ict enabled='0' >
			<data name='speed' value='1000' />
			<data name='firmware' value='0000000000000000' />
			<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='userpins' value='0' />
		</dll_dbg_ict>
		<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='' vmin='0' vmaj='1' visiblename='' description='' category='' author='' keywords='' dynamic='0' iconpath='' />
		<component class_type='root' codename='panel' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='Enable_Read_Switch' type='b1' array='0' description='' isconst='0' isinit='1' usrinit='1' setinit='1' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Reg_second' type='u8' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTC_R' type='u8' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Hour' type='u8' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='POT_Value' type='s16' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Second' type='u8' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTC' type='u8' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Reg_Hour' type='u8' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Var2' type='u8' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Var1' type='u8' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Read_RB7' type='u8' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Retval' type='u8' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='X' type='u8' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Reg_Minute' type='u8' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Read_Switch' type='b1' array='0' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Minute' type='u8' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='LED_Value' type='u8' array='0' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTC_W' type='u8' array='0' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Enable_LED' type='b1' array='0' description='' isconst='0' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Read_Time' description='Reading Hours Min Seconds' >
						<command class_type='comment' title='' comment='The write comand is needed before starting to read data.' ccode='' textshow='1' textmode='0' textarea='12,0,12,0' break='0' mark='0' disable='0' hide='0' customize='0' />
						<command class_type='call' title='' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='Start' />
						<command class_type='call' title='Set RTC To Write' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='TransmitByte' >
							<return exp='Retval' />
							<argument exp='RTC_W' />
						</command>
						<command class_type='call' title='Select Seconds Register' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='TransmitByte' >
							<return exp='Retval' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Restart RTC' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='Restart' />
						<command class_type='call' title='Set RTC To Read' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='TransmitByte' >
							<return exp='Retval' />
							<argument exp='RTC_R' />
						</command>
						<command class_type='call' title='Read Seconds (BCD)' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='ReceiveByte' >
							<return exp='Reg_second' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Read Minutes (BCD)' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='ReceiveByte' >
							<return exp='Reg_Minute' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Read Hours (BCD)' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='ReceiveByte' >
							<return exp='Reg_Hour' />
							<argument exp='1' />
						</command>
						<command class_type='comment' title='' comment='Setting Last(Byte) = 1 in the Read Hours macro is the 
&quot;Not Retvalnowledge&quot; to end the read cycle' ccode='' textshow='1' textmode='0' textarea='12,0,12,0' break='0' mark='0' disable='0' hide='0' customize='0' />
						<command class_type='call' title='' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='Stop' />
						<command class_type='calculation' title='Calculate Decimal Values FromRaw BCD Data' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
							<exp exp='Var1 = Reg_second AND 0x0F' />
							<exp exp='Var2 = (Reg_second &gt;&gt; 4) AND 0x07' />
							<exp exp='Second = Var1 + (Var2 * 10)' />
							<exp exp='Var1 = Reg_Minute AND 0x0F' />
							<exp exp='Var2 = (Reg_Minute &gt;&gt; 4) AND 0x07' />
							<exp exp='Minute = Var1 + (Var2 * 10)' />
							<exp exp='Var1 = Reg_Hour AND 0x0F' />
							<exp exp='Var2 = (Reg_Hour &gt;&gt; 4) AND 0x03' />
							<exp exp='Hour = Var1 + (Var2 * 10)' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='LEDs' description='' >
						<command class_type='decision' title='Decision' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='POT_Value &gt; 840' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
									<exp exp='LED_Value = 63' />
								</command>
							</flowline>
							<flowline >
								<command class_type='decision' title='Decision' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='POT_Value &gt; 700' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
											<exp exp='LED_Value = 31' />
										</command>
									</flowline>
									<flowline >
										<command class_type='decision' title='Decision' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='POT_Value &gt; 560' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
													<exp exp='LED_Value = 15' />
												</command>
											</flowline>
											<flowline >
												<command class_type='decision' title='Decision' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='POT_Value &gt; 420' swap='0' >
													<flowline >
														<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
															<exp exp='LED_Value = 7' />
														</command>
													</flowline>
													<flowline >
														<command class_type='decision' title='Decision' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='POT_Value &gt; 280' swap='0' >
															<flowline >
																<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
																	<exp exp='LED_Value = 3' />
																</command>
															</flowline>
															<flowline >
																<command class_type='decision' title='Decision' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='POT_Value &gt; 140' swap='0' >
																	<flowline >
																		<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
																			<exp exp='LED_Value = 1' />
																		</command>
																	</flowline>
																	<flowline >
																		<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
																			<exp exp='LED_Value = 0' />
																		</command>
																	</flowline>
																</command>
															</flowline>
														</command>
													</flowline>
												</command>
											</flowline>
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
						<command class_type='decision' title='Decision' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='Enable_LED = 1' swap='0' >
							<flowline />
							<flowline >
								<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
									<exp exp='LED_Value = 0' />
									<exp exp='' />
									<exp exp='' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='POT' description='' >
						<command class_type='input' title='Input' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' mode='1' port='1048577' mask='128' exp='Read_RB7' />
						<command class_type='decision' title='Decision' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='Read_RB7' swap='1' >
							<flowline >
								<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='Cursor' >
									<argument exp='0' />
									<argument exp='1' />
								</command>
								<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintString' >
									<argument exp='&quot;Disbld&quot;' />
								</command>
								<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
									<exp exp='POT_Value = 0' />
								</command>
							</flowline>
							<flowline >
								<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__adc0' macro='GetInt' >
									<return exp='POT_Value' />
								</command>
								<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='Cursor' >
									<argument exp='0' />
									<argument exp='1' />
								</command>
								<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintString' >
									<argument exp='&quot;    &quot;' />
								</command>
								<command class_type='decision' title='Decision' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='POT_Value &gt; 999' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
											<exp exp='X = 0' />
										</command>
									</flowline>
									<flowline >
										<command class_type='decision' title='Decision' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='POT_Value &gt; 99' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
													<exp exp='X = 1' />
												</command>
											</flowline>
											<flowline >
												<command class_type='decision' title='Decision' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='POT_Value &gt; 9' swap='0' >
													<flowline >
														<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
															<exp exp='X = 2' />
														</command>
													</flowline>
													<flowline >
														<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
															<exp exp='X = 3' />
														</command>
													</flowline>
												</command>
											</flowline>
										</command>
									</flowline>
								</command>
								<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='Cursor' >
									<argument exp='X' />
									<argument exp='1' />
								</command>
								<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintNumber' >
									<argument exp='POT_Value' />
								</command>
								<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintString' >
									<argument exp='&quot;    &quot;' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Switch' description='' >
						<command class_type='output' title='Output' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' mode='1' port='1048576' mask='1' exp='0' />
						<command class_type='delay' title='Delay' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='10' type='0' />
						<command class_type='input' title='Input' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' mode='1' port='1048576' mask='1' exp='Read_Switch' />
						<command class_type='decision' title='Decision' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='Read_Switch = 1' swap='0' >
							<flowline >
								<command class_type='decision' title='Decision' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='Enable_Read_Switch = 1' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
											<exp exp='Enable_LED = !Enable_LED' />
											<exp exp='Enable_Read_Switch = 0' />
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
									<exp exp='Enable_Read_Switch = 1' />
								</command>
							</flowline>
						</command>
						<command class_type='delay' title='Delay' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='10' type='0' />
						<command class_type='output' title='Output' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' mode='0' port='1048576' mask='0' exp='LED_Value' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Init' description='' >
						<command class_type='call' title='Setup LCD' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='Start' />
						<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='Cursor' >
							<argument exp='3' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintString' >
							<argument exp='&quot;MICROCHIP&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='Cursor' >
							<argument exp='2' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintString' >
							<argument exp='&quot;One PIC MCU&quot;' />
						</command>
						<command class_type='delay' title='Delay' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='2' type='2' />
						<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='Clear' />
						<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='Cursor' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintString' >
							<argument exp='&quot;Programmed With&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='Cursor' >
							<argument exp='2' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintString' >
							<argument exp='&quot;FLOWCODE V5!&quot;' />
						</command>
						<command class_type='delay' title='Delay' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='2' type='2' />
						<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='Clear' />
						<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='Cursor' >
							<argument exp='1' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintString' >
							<argument exp='&quot;PIC16FL1939&quot;' />
						</command>
						<command class_type='calculation' title='Define Parameters' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' >
							<exp exp='RTC = 0x6F' />
							<exp exp='RTC_R = (RTC &lt;&lt; 1) + 1' />
							<exp exp='RTC_W = (RTC &lt;&lt; 1) + 0' />
							<exp exp='' />
							<exp exp='' />
						</command>
						<command class_type='call' title='' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='Initialise' />
						<command class_type='delay' title='Delay' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='100' type='1' />
						<command class_type='call' title='' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='Start' />
						<command class_type='call' title='Set base addresss in write mode' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='TransmitByte' >
							<return exp='Retval' />
							<argument exp='RTC_W' />
						</command>
						<command class_type='call' title='reg0' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='TransmitByte' >
							<return exp='Retval' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Start osc (bit 7 = 1)and set seconds' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='TransmitByte' >
							<return exp='Retval' />
							<argument exp='0x80' />
						</command>
						<command class_type='call' title='Set Minutes' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='TransmitByte' >
							<return exp='Retval' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Set hours to 12' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='TransmitByte' >
							<return exp='Retval' />
							<argument exp='12' />
						</command>
						<command class_type='call' title='' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__i2c0' macro='Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Disp_Time' description='Display Time' >
						<command class_type='call' title='' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='Cursor' >
							<argument exp='8' />
							<argument exp='1' />
						</command>
						<command class_type='decision' title='N &lt; 10' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='Hour &lt; 10' swap='0' >
							<flowline >
								<command class_type='call' title='Add Leading Zero If Less Than 10' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintNumber' >
									<argument exp='0' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='call' title='Display Hour' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintNumber' >
							<argument exp='Hour' />
						</command>
						<command class_type='call' title='Print &quot;:&quot;' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintString' >
							<argument exp='&quot;:&quot;' />
						</command>
						<command class_type='decision' title='N &lt; 10' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='Minute &lt; 10' swap='0' >
							<flowline >
								<command class_type='call' title='Add Leading Zero if Less Than 10' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintNumber' >
									<argument exp='0' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='call' title='Display Minutes' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintNumber' >
							<argument exp='Minute' />
						</command>
						<command class_type='call' title='Print &quot;:&quot;' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintString' >
							<argument exp='&quot;:&quot;' />
						</command>
						<command class_type='decision' title='N &lt; 10' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='Second &lt; 10' swap='0' >
							<flowline >
								<command class_type='call' title='Add Leading Zero If Less Than 10' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintNumber' >
									<argument exp='0' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='call' title='Display Seconds' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' component='v5__lcddisplay0' macro='PrintNumber' >
							<argument exp='Second' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<command class_type='native' title='Set Internal osc to 32MHz.  (pll has to be enabled)' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' language='C' />
						<command class_type='native' title='C Code' comment='' ccode='osccon=0x70;//inter osc to 8MHz (32MHZ with pll en) 
clear_bit(option_reg , 7); //Enable port B weak pullups
set_bit(wpub,7); //Only Enable WPU on RB7' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' language='C' />
						<command class_type='call' title='Initalise RTC Settings' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' macro='Init' />
						<command class_type='loop' title='Loop' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='1' type='0' start='1' count='1' breakend='0' >
							<flowline >
								<command class_type='call' title='' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' macro='Read_Time' />
								<command class_type='call' title='' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' macro='Disp_Time' />
								<command class_type='call' title='Call Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' macro='POT' />
								<command class_type='call' title='Call Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' macro='Switch' />
								<command class_type='call' title='Call Macro' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' macro='LEDs' />
								<command class_type='delay' title='Delay' comment='' ccode='' textshow='1' textmode='0' textarea='36,0,36,0' break='0' mark='0' disable='0' hide='0' customize='0' exp='100' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='24219805-113d-4b12-b6bd-e1b0b0c33981' vmin='1' vmaj='1' codename='v5__i2c0' x='16' y='-8' z='2.12737' xsz='31.9999' ysz='32' zsz='1.14286' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='1' />
					<value target='BAUD_LIST' data='1' />
					<value target='SRC' data='0' />
					<value target='SMB' data='0' />
					<value target='BAUD' data='50000' />
					<value target='SDA' data='$PORTC.4' />
					<value target='SCL' data='$PORTC.3' />
					<value target='label' data='I2C Master' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='0953aac0-9c23-4c2f-9843-88954a4191ea' vmin='7' vmaj='1' codename='v5__lcddisplay0' x='-60' y='88' z='2.12737' xsz='88' ysz='32' zsz='1.14286' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' >
				<resources />
				<properties />
				<values >
					<value target='Pin_Data_0' data='$PORTD.0' />
					<value target='Pin_Data_1' data='$PORTD.1' />
					<value target='Pin_Data_2' data='$PORTD.2' />
					<value target='Pin_Data_3' data='$PORTD.3' />
					<value target='Pin_RS' data='$PORTC.0' />
					<value target='Pin_E' data='$PORTA.6' />
					<value target='Rows' data='2' />
					<value target='Columns' data='16' />
					<value target='BackgroundColor' data='0x808080' />
					<value target='LineColor' data='0' />
					<value target='TextColor' data='0x000000' />
					<value target='Font' data='Arial' />
					<value target='CursorPosX' data='8' />
					<value target='CursorPosY' data='1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='14683ea8-5a08-4b3a-be2d-3dea3e17e720' vmin='1' vmaj='1' codename='v5__adc0' x='1' y='1' z='1' xsz='0' ysz='31.4438' zsz='1.14286' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' >
				<resources />
				<properties />
				<values >
					<value target='angle_start' data='225.000000' />
					<value target='angle_sweep' data='270.000000' />
					<value target='cap_color' data='192' />
					<value target='point_color' data='16777215' />
					<value target='channel' data='13' />
					<value target='vrefvol' data='500' />
					<value target='vrefop' data='0' />
					<value target='convspd' data='3' />
					<value target='actime' data='50' />
					<value target='bits' data='10' />
					<value target='bitmul' data='0.004883' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c8da67a7-fc7b-48c0-8c3f-3264c74f4024' vmin='2' vmaj='1' codename='v5__ledarray0' x='-8' y='-56' z='1.25' 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' >
				<resources />
				<properties />
				<values >
					<value target='count' data='6' />
					<value target='port' data='005' />
					<value target='pin0' data='$PORTA.0' />
					<value target='pin1' data='$PORTA.1' />
					<value target='pin2' data='$PORTA.2' />
					<value target='pin3' data='$PORTA.3' />
					<value target='pin4' data='$PORTA.4' />
					<value target='pin5' data='$PORTA.5' />
					<value target='pin6' data='$PORTA.0' />
					<value target='pin7' data='$PORTA.0' />
					<value target='polarity' data='1' />
					<value target='full_port' data='$PORTA' />
					<value target='align' data='0' />
					<value target='spacing' data='7.000000' />
					<value target='target_object' data='' />
					<value target='shape' data='4' />
					<value target='width' data='5.000000' />
					<value target='height' data='5.000000' />
					<value target='depth' data='2.500000' />
					<value target='color_same' data='1' />
					<value target='color_led0' data='255' />
					<value target='color_led1' data='65280' />
					<value target='color_led2' data='65280' />
					<value target='color_led3' data='65280' />
					<value target='color_led4' data='65535' />
					<value target='color_led5' data='65535' />
					<value target='color_led6' data='255' />
					<value target='color_led7' data='255' />
					<value target='bitmask' data='63' />
					<value target='inv_bitmask' data='-64' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='5c1da48f-ce54-4622-bdd9-fc812e373696' vmin='0' vmaj='1' codename='v5__switch0' x='-64' y='0' z='-6.175' 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' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTB.7' />
					<value target='polarity' data='0' />
					<value target='debounce' data='0' />
					<value target='operation' data='1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='text' codename='label1' x='-64' y='-16' z='1' xsz='5.7765' ysz='8' zsz='0' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' >
				<resources />
				<properties />
				<values >
					<value target='Color' data='192' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='Text' data='Enable Analogue Control' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' perspective='0' >
		<background rgb='14215660' 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' 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' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAfwUAAN0CAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
