<root>
<document schema='101' license='10,C04B9607-34AA-AE8C-B369-A7F373D01935,YKHPEN' title='' description='' target='AVR.ATMEGA.Arduino Mega 2560 R3' >
	<config data='' clkspd='16000000' simspd='1' usewdt='0' constif='0' />
	<plugins >
		<dll_dbg_icd enabled='0' >
			<data name='debug' value='1' />
			<data name='userpins' value='0' />
			<data name='speed' value='0' />
			<data name='usev9' value='0' />
			<data name='breaks' value='8' />
			<data name='stacks' value='8' />
			<data name='clkport' value='1' />
			<data name='clkbit' value='6' />
			<data name='dataport' value='1' />
			<data name='databit' value='7' />
			<data name='ghostype' value='0' />
			<data name='monitor' value='1' />
			<data name='ictloop' value='0' />
			<data name='ictrate' value='20000' />
			<data name='ictmask' value='0' />
			<data name='anlpres' value='255' />
			<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='rxd' />
		<watch expr='data' />
		<watch expr='rxd' />
		<watch expr='tmp' />
		<watch expr='affichage.CHR_aff' />
		<watch expr='affichage.CHR_tmp' />
		<watch expr='affichage.i' />
		<watch expr='affichage.tmp' />
		<watch expr='affichage.CHR_aff' />
		<watch expr='affichage.tmp' />
		<watch expr='affichage.tmp' />
	</debug>
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='Misc' catenable='1' author='' manuname='' manucode='' 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' poslock='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='mois' type='T8' description='' isconst='1' isinit='1' usrinit='&quot;JanFevMarAvrMaiJunJuiAouSepOctNovDec&quot;' setinit='&quot;JanFevMarAvrMaiJunJuiAouSepOctNovDec&quot;' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='data' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='8' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='tmp' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='adresse' type='s16' description='' isconst='1' isinit='1' usrinit='104' setinit='0x68' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='rxd' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='jour' type='T8' description='' isconst='1' isinit='1' usrinit='&quot;DimLunMarMerJeuVenSam&quot;' setinit='&quot;DimLunMarMerJeuVenSam&quot;' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='lecture_heure' description='' >
						<command class_type='call' title='' textarea='36,0,511,300' component='I2C_RTC' macro='Start' />
						<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='TransmitByte' >
							<argument exp='(adresse &lt;&lt;1)' />
						</command>
						<command class_type='comment' title='' comment='adresse de départ' textarea='12,0,12,0' />
						<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='TransmitByte' >
							<argument exp='0' />
						</command>
						<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='Restart' />
						<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='TransmitByte' >
							<argument exp='(adresse &lt;&lt;1)+1' />
						</command>
						<command class_type='loop' title='Boucle' type='2' forvar='tmp' exp='7' >
							<flowline >
								<command class_type='call' title='lecture registres' component='I2C_RTC' macro='ReceiveByte' >
									<return exp='data[tmp]' />
									<argument exp='0' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='cloture trame i2C' component='I2C_RTC' macro='ReceiveByte' >
							<return exp='data[6]' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Initialisation' description='' >
						<command class_type='call' title='Appel de la Routine Composant' textarea='36,0,511,300' component='I2C_RTC' macro='Initialise' />
						<command class_type='call' title='Appel de la Routine Composant' component='RS232' macro='Initialise' />
						<command class_type='comment' title='' comment='activation horloge' textarea='12,0,12,0' />
						<command class_type='call' title='' textarea='36,0,511,300' component='I2C_RTC' macro='Start' />
						<command class_type='call' title='adresse = 68' component='I2C_RTC' macro='TransmitByte' >
							<argument exp='(adresse &lt;&lt;1)' />
						</command>
						<command class_type='comment' title='' comment='adresse de départ' textarea='12,0,12,0' />
						<command class_type='call' title='Control' component='I2C_RTC' macro='TransmitByte' >
							<argument exp='0x00' />
						</command>
						<command class_type='call' title='Mot de controle out 32768Hz' component='I2C_RTC' macro='TransmitByte' >
							<argument exp='0' />
						</command>
						<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='Stop' />
						<command class_type='call' title='' textarea='36,0,511,300' component='I2C_RTC' macro='Start' />
						<command class_type='call' title='adresse = 68' component='I2C_RTC' macro='TransmitByte' >
							<argument exp='(adresse &lt;&lt;1)' />
						</command>
						<command class_type='comment' title='' comment='adresse de départ' textarea='12,0,12,0' />
						<command class_type='call' title='Control' component='I2C_RTC' macro='TransmitByte' >
							<argument exp='0x07' />
						</command>
						<command class_type='call' title='Mot de controle out 32768Hz' component='I2C_RTC' macro='TransmitByte' >
							<argument exp='0b00010010' />
						</command>
						<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='Stop' />
						<command class_type='call' title='Appel de la Routine Composant' component='gLCD_EBM001' macro='Initialise' />
						<command class_type='call' title='Appel de la Routine Composant' component='gLCD_EBM001' macro='BacklightOn' />
						<command class_type='call' title='Appel de la Routine Composant' component='gLCD_EBM001' macro='Print' >
							<argument exp='&quot;RTC DS1307&quot;' />
							<argument exp='0' />
							<argument exp='0' />
							<argument exp='0' />
							<argument exp='0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='affichage' description='' >
						<local name='tmp' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
						<local name='CHR_tmp' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</local>
						<local name='CHR_aff' type='T8' description='' isconst='0' isinit='1' usrinit='&quot;&quot;' setinit='&quot;&quot;' >
							<array size='16' />
						</local>
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='jour' type='T8' description='' isconst='1' isinit='1' usrinit='&quot;DimLunMarMerJeuVenSam&quot;' setinit='&quot;DimLunMarMerJeuVenSam&quot;' />
						<command class_type='comment' title='' comment='heure' textarea='12,0,12,0' />
						<command class_type='call' title='Appel de la Routine Composant' component='gLCD_EBM001' macro='Print' >
							<argument exp='&quot;Heure&quot;' />
							<argument exp='10' />
							<argument exp='20' />
							<argument exp='2' />
							<argument exp='0' />
						</command>
						<command class_type='calculation' title='Heure' >
							<exp exp='.tmp = data[2] AND 0xf0 //heure x10' />
							<exp exp='.tmp = .tmp &gt;&gt; 4' />
							<exp exp='.CHR_tmp = ToString$ (.tmp)' />
							<exp exp='.CHR_aff = .CHR_aff + .CHR_tmp' />
							<exp exp='.tmp = data[2] AND 0x0F //heure x1' />
							<exp exp='.CHR_tmp = ToString$ (.tmp)' />
							<exp exp='.CHR_aff = .CHR_aff + .CHR_tmp + &quot;:&quot;' />
						</command>
						<command class_type='calculation' title='min' >
							<exp exp='.tmp = data[1] AND 0xf0 //heure x10' />
							<exp exp='.tmp = .tmp &gt;&gt; 4' />
							<exp exp='.CHR_tmp = ToString$ (.tmp)' />
							<exp exp='.CHR_aff = .CHR_aff + .CHR_tmp' />
							<exp exp='.tmp = data[1] AND 0x0F //heure x1' />
							<exp exp='.CHR_tmp = ToString$ (.tmp)' />
							<exp exp='.CHR_aff = .CHR_aff + .CHR_tmp + &quot;:&quot;' />
						</command>
						<command class_type='calculation' title='sec' >
							<exp exp='.tmp = data[0] AND 0xf0 //heure x10' />
							<exp exp='.tmp = .tmp &gt;&gt; 4' />
							<exp exp='.CHR_tmp = ToString$ (.tmp)' />
							<exp exp='.CHR_aff = .CHR_aff + .CHR_tmp' />
							<exp exp='.tmp = data[0] AND 0x0F //heure x1' />
							<exp exp='.CHR_tmp = ToString$ (.tmp)' />
							<exp exp='.CHR_aff = .CHR_aff + .CHR_tmp + &quot;    &quot;' />
						</command>
						<command class_type='call' title='Appel de la Routine Composant' component='gLCD_EBM001' macro='Print' >
							<argument exp='.CHR_aff' />
							<argument exp='10' />
							<argument exp='40' />
							<argument exp='2' />
							<argument exp='0' />
						</command>
						<command class_type='comment' title='' comment='Date' textarea='12,0,12,0' />
						<command class_type='call' title='Appel de la Routine Composant' break='1' component='gLCD_EBM001' macro='Print' >
							<argument exp='&quot;Date&quot;' />
							<argument exp='10' />
							<argument exp='80' />
							<argument exp='2' />
							<argument exp='0' />
						</command>
						<command class_type='calculation' title='jour semaine' >
							<exp exp='.tmp = data[3] AND 0x07 //jour semaine' />
							<exp exp='.CHR_aff = Mid$ (jour, (.tmp * 3),3)' />
							<exp exp='.CHR_aff = .CHR_aff + &quot; &quot;' />
						</command>
						<command class_type='calculation' title='date' >
							<exp exp='.tmp = data[4] AND 0x30 //jour x10' />
							<exp exp='.tmp = .tmp &gt;&gt; 4' />
							<exp exp='.CHR_tmp = ToString$ (.tmp)' />
							<exp exp='.CHR_aff = .CHR_aff + .CHR_tmp' />
							<exp exp='.tmp = data[4] AND 0x0F //jour x1' />
							<exp exp='.CHR_tmp = ToString$ (.tmp)' />
							<exp exp='.CHR_aff = .CHR_aff + .CHR_tmp + &quot; &quot;' />
						</command>
						<command class_type='calculation' title='mois' >
							<exp exp='.tmp = data[5] AND 0x0F //mois' />
							<exp exp='.tmp = .tmp + 10 * ((data[5] AND 0x10) &gt;&gt; 4)' />
							<exp exp='.CHR_tmp = Mid$ (mois, (.tmp * 3),3)' />
							<exp exp='.CHR_aff = .CHR_aff + .CHR_tmp + &quot; &quot;' />
						</command>
						<command class_type='calculation' title='annee' >
							<exp exp='.tmp = data[6] AND 0xf0 //annee x10' />
							<exp exp='.tmp = .tmp &gt;&gt; 4' />
							<exp exp='.CHR_tmp = ToString$ (.tmp)' />
							<exp exp='.CHR_aff = .CHR_aff + &quot;2&quot; + .CHR_tmp' />
							<exp exp='.tmp = data[6] AND 0x0F //annee x1' />
							<exp exp='.CHR_tmp = ToString$ (.tmp)' />
							<exp exp='.CHR_aff = .CHR_aff + .CHR_tmp + &quot; &quot;' />
						</command>
						<command class_type='call' title='Appel de la Routine Composant' component='gLCD_EBM001' macro='Print' >
							<argument exp='.CHR_aff' />
							<argument exp='10' />
							<argument exp='100' />
							<argument exp='3' />
							<argument exp='0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='interruption' description='' >
						<command class_type='call' title='Appel de la Routine Composant' component='RS232' macro='ReceiveChar' >
							<return exp='rxd' />
							<argument exp='10' />
						</command>
						<command class_type='switch' title='Multi-Décision' textarea='36,25,36,25' exp='rxd' >
							<case >
								<flowline />
							</case>
							<case exp='0xaa' >
								<flowline >
									<command class_type='comment' title='' comment='début de trame lecture' textarea='12,0,12,0' />
									<command class_type='call' title='' textarea='36,0,511,300' component='I2C_RTC' macro='Start' />
									<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='TransmitByte' >
										<argument exp='(adresse &lt;&lt;1)' />
									</command>
									<command class_type='comment' title='' comment='adresse de départ' textarea='12,0,12,0' />
									<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='TransmitByte' >
										<argument exp='0' />
									</command>
									<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='Restart' />
									<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='TransmitByte' >
										<argument exp='(adresse &lt;&lt;1)+1' />
									</command>
									<command class_type='loop' title='Boucle' type='2' exp='7' >
										<flowline >
											<command class_type='call' title='lecture registres' component='I2C_RTC' macro='ReceiveByte' >
												<return exp='tmp' />
												<argument exp='0' />
											</command>
											<command class_type='call' title='Appel de la Routine Composant' component='RS232' macro='SendChar' >
												<argument exp='tmp' />
											</command>
										</flowline>
									</command>
									<command class_type='call' title='cloture trame i2C' component='I2C_RTC' macro='ReceiveByte' >
										<return exp='tmp' />
										<argument exp='1' />
									</command>
									<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='Stop' />
									<command class_type='call' title='cloture de trame' component='RS232' macro='SendChar' >
										<argument exp='0x0A' />
									</command>
								</flowline>
							</case>
							<case exp='0xbb' >
								<flowline >
									<command class_type='comment' title='' comment='début de trame ecriture' textarea='12,0,12,0' />
									<command class_type='call' title='' textarea='36,0,511,300' component='I2C_RTC' macro='Start' />
									<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='TransmitByte' >
										<argument exp='(adresse &lt;&lt;1)' />
									</command>
									<command class_type='comment' title='' comment='adresse de départ' textarea='12,0,12,0' />
									<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='TransmitByte' >
										<argument exp='0' />
									</command>
									<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='Restart' />
									<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='TransmitByte' >
										<argument exp='(adresse &lt;&lt;1)' />
									</command>
									<command class_type='loop' title='Boucle' type='2' exp='7' >
										<flowline >
											<command class_type='call' title='Appel de la Routine Composant' component='RS232' macro='ReceiveChar' >
												<return exp='tmp' />
												<argument exp='2' />
											</command>
											<command class_type='call' title='lecture registres' component='I2C_RTC' macro='TransmitByte' >
												<argument exp='tmp' />
											</command>
										</flowline>
									</command>
									<command class_type='call' title='Appel de la Routine Composant' component='I2C_RTC' macro='Stop' />
									<command class_type='call' title='cloture de trame' component='RS232' macro='SendChar' >
										<argument exp='0x0A' />
									</command>
								</flowline>
							</case>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<command class_type='call' title='Appel d&apos;une Macro' textarea='36,0,511,300' macro='Initialisation' />
						<command class_type='loop' title='Boucle' textarea='36,0,511,300' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Appel d&apos;une Macro' macro='lecture_heure' />
								<command class_type='calculation' title='Calcul' >
									<exp exp='data[2] = 0x14 //heure' />
									<exp exp='data[1] = 0x23 //minute' />
									<exp exp='data[0] = 0x41 //seconde' />
									<exp exp='' />
									<exp exp='data[3] = 0x00 //jour' />
									<exp exp='data[4] = 0x09 //date' />
									<exp exp='data[5] = 0x08 //mois' />
									<exp exp='data[6] = 0x0e //année' />
								</command>
								<command class_type='call' title='Appel d&apos;une Macro' macro='affichage' />
								<command class_type='delay' title='Pause' exp='1' type='2' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='24219805-113d-4b12-b6bd-e1b0b0c33981' vmin='2' vmaj='1' codename='I2C_RTC' x='-80' y='64' z='0' xsz='55.9999' ysz='24' 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' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='001' />
					<value target='BAUD_LIST' data='002' />
					<value target='SRC' data='0' />
					<value target='SMB' data='0' />
					<value target='BAUD' data='50000' />
					<value target='SDA' data='$PORTD.1' />
					<value target='SCL' data='$PORTD.0' />
					<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='c73616d1-7ad0-45d9-aada-69ccfa4c5efc' vmin='3' vmaj='1' codename='RS232' x='-80' y='32' 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' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='001' />
					<value target='BAUD_LIST' data='009' />
					<value target='BAUD' data='9600' />
					<value target='DBITS' data='008' />
					<value target='RETURN' data='000' />
					<value target='ToutVal' data='255' />
					<value target='FLOWEN' data='000' />
					<value target='ECHO' data='000' />
					<value target='TX' data='$PORTE.1' />
					<value target='RX' data='$PORTE.0' />
					<value target='CTS' data='$PORTB.1' />
					<value target='RTS' data='$PORTB.2' />
					<value target='TXRemap' data='' />
					<value target='RXRemap' data='' />
					<value target='label' data='RS232' />
					<value target='ScopeTraces' data='0' />
					<value target='ConsoleData' data='0' />
					<value target='ConsoleColumns' data='64' />
					<value target='DataSource' data='001' />
					<value target='com_port' data='003' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='5a6d2f2e-da92-49b4-ad5c-71f51e8fe24b' vmin='6' vmaj='1' codename='gLCD_EBM001' x='32' y='32' z='0.88' xsz='1.97487' ysz='2.08717' 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 >
					<value target='pixel_height' data='160' />
					<value target='pixel_width' data='128' />
					<value target='monochrome' data='0' />
					<value target='foreground_colour' data='0' />
					<value target='background_colour' data='16777215' />
					<value target='colour_bit_depth' data='16' />
					<value target='red_bit_depth' data='5' />
					<value target='green_bit_depth' data='6' />
					<value target='blue_bit_depth' data='5' />
					<value target='data_pin' data='$PORTF.2' />
					<value target='clock_pin' data='$PORTF.1' />
					<value target='chip_sel_pin' data='$PORTF.0' />
					<value target='a0_pin' data='$PORTF.3' />
					<value target='reset_pin' data='$PORTF.4' />
					<value target='led_pin' data='$PORTF.5' />
					<value target='DisplayMethod' data='000' />
				</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='1' lighting='1' brightness='0' perspective='0' >
		<background rgb='16777215' img='' style='0' />
		<table rgb='16777215' img='' style='0' size='26' />
		<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='affichage' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAA0gIAAGsEAAA' zoom='75' scrollx='0' scrolly='374' flags='0' />
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAA0gIAAGsEAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='lecture_heure' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAA0gIAAGsEAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Initialisation' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAA0gIAAGsEAAA' zoom='75' scrollx='0' scrolly='177' flags='0' />
		<view type='0' name='interruption' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAA0gIAAGsEAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
