<root>
<document schema='101' license='50,Dev User,NXHQAN' title='' description='' guid='f2788919-86f1-4d98-b373-c316bafdff91' target='PIC.16F.16F877A' >
	<config data='!0,3f72%0,2%2,0%3,0%6,1%7,0%9,3%b,1%8,1%d,1' clkspd='19660800' 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='f2788919-86f1-4d98-b373-c316bafdff91' vmin='0' vmaj='1' visiblename='' description='' category='' author='' sysinfo='0' 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='Mins' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Hours' type='u8' 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='RAMbyte' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Secs' type='u8' 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>
			</variables>
			<macros >
				<macro >
					<flowline name='DisplayTime' description='' >
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Cursor' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='decision' title='Decision' exp='Hours &lt; 10' swap='0' >
							<flowline >
								<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintAscii' >
									<argument exp='&apos;0&apos;' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintNumber' >
							<argument exp='Hours' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintAscii' >
							<argument exp='&apos;:&apos;' />
						</command>
						<command class_type='decision' title='Decision' exp='Mins &lt; 10' swap='0' >
							<flowline >
								<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintAscii' >
									<argument exp='&apos;0&apos;' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintNumber' >
							<argument exp='Mins' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintAscii' >
							<argument exp='&apos;:&apos;' />
						</command>
						<command class_type='decision' title='Decision' exp='Secs &lt; 10' swap='0' >
							<flowline >
								<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintAscii' >
									<argument exp='&apos;0&apos;' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='PrintNumber' >
							<argument exp='Secs' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadTime' description='' >
						<local name='in' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='Start' />
						<command class_type='call' title='Address in write mode' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='0xD0' />
						</command>
						<command class_type='call' title='Read from address 0' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='Restart' />
						<command class_type='call' title='Address in read mode' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='0xD1' />
						</command>
						<command class_type='call' title='Read Byte 0' component='I2C_Master1' macro='ReceiveByte' >
							<return exp='.in' />
							<argument exp='0' />
						</command>
						<command class_type='calculation' title='Calculation' >
							<exp exp='Secs = (.in &amp; 0x0F) + (((.in &amp; 0xF0) &gt;&gt; 4) * 10)' />
						</command>
						<command class_type='call' title='Read Byte 1' component='I2C_Master1' macro='ReceiveByte' >
							<return exp='.in' />
							<argument exp='0' />
						</command>
						<command class_type='calculation' title='Calculation' >
							<exp exp='Mins = (.in &amp; 0x0F) + (((.in &amp; 0xF0) &gt;&gt; 4) * 10)' />
						</command>
						<command class_type='call' title='Read Byte 2 - Last Byte' component='I2C_Master1' macro='ReceiveByte' >
							<return exp='.in' />
							<argument exp='1' />
						</command>
						<command class_type='calculation' title='Calculation' >
							<exp exp='Hours = (.in &amp; 0x0F) + (((.in &amp; 0xF0) &gt;&gt; 4) * 10)' />
						</command>
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadRam' description='' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='Address' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='Start' />
						<command class_type='call' title='Address in write mode' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='0xD0' />
						</command>
						<command class_type='call' title='Send RAM Address' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='.Address' />
						</command>
						<command class_type='call' title='Send Data' component='I2C_Master1' macro='Restart' />
						<command class_type='call' title='Address in read mode' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='0xD1' />
						</command>
						<command class_type='call' title='Address in read mode' component='I2C_Master1' macro='ReceiveByte' >
							<return exp='.Return' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='WriteRam' description='' >
						<param name='Address' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='Data' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='Start' />
						<command class_type='call' title='Address in write mode' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='0xD0' />
						</command>
						<command class_type='call' title='Send RAM Address' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='.Address' />
						</command>
						<command class_type='call' title='Send Data' component='I2C_Master1' macro='TransmitByte' >
							<argument exp='.Data' />
						</command>
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<command class_type='call' title='Call Component Macro' component='lcd_eb005' macro='Start' />
						<command class_type='call' title='Call Component Macro' component='I2C_Master1' macro='Initialise' />
						<command class_type='loop' title='Loop' exp='1' type='0' start='1' count='1' breakend='0' >
							<flowline >
								<command class_type='call' title='Read A Byte From RAM' macro='ReadRam' >
									<return exp='RAMbyte' />
									<argument exp='16' />
								</command>
								<command class_type='call' title='Increment and store back into RAM' macro='WriteRam' >
									<argument exp='16' />
									<argument exp='RAMbyte + 1' />
								</command>
								<command class_type='call' title='Read Time Registers' macro='ReadTime' />
								<command class_type='call' title='Display Time' macro='DisplayTime' />
								<command class_type='delay' title='Delay' exp='100' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='24219805-113d-4b12-b6bd-e1b0b0c33981' vmin='1' vmaj='1' codename='I2C_Master1' x='0.12414' y='-0.12414' z='0' xsz='60' ysz='26' zsz='1.51' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='000' />
					<value target='BAUD_LIST' data='001' />
					<value target='SRC' data='000' />
					<value target='SMB' data='000' />
					<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='421' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='8d670813-9a40-4891-accc-c1bf864b8217' vmin='0' vmaj='1' codename='InjectorDS1307' x='0.12414' y='26.9384' z='0' xsz='20' ysz='20' zsz='20' 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='CircularBufferSize' data='1000' />
					<value target='TermChar' data='013' />
					<value target='DeviceAddress' data='104' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='d29dda88-17de-4008-991a-c881890d4c57' vmin='1' vmaj='1' codename='lcd_eb005' x='0.12414' y='-37.8627' 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 >
					<value target='Pin_Data_0' data='$PORTB.0' />
					<value target='Pin_Data_1' data='$PORTB.1' />
					<value target='Pin_Data_2' data='$PORTB.2' />
					<value target='Pin_Data_3' data='$PORTB.3' />
					<value target='Pin_RS' data='$PORTB.4' />
					<value target='Pin_E' data='$PORTB.5' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='0' brightness='0' perspective='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='0' ye='-10' ze='153.734' xt='0' yt='-10' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAOQUAAOwCAAA' zoom='75' scrollx='0' scrolly='39' flags='0' />
		<view type='0' name='DisplayTime' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAOQUAAOwCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ReadRam' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAOQUAAOwCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='WriteRam' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAOQUAAOwCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ReadTime' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAOQUAAOwCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
