<root>
<document scada='0' schema='102' license='1,mnfisher,5YZWG2' title='' description='' fcversion='524802' target='ARD.ATMEGA.Arduino Mega 2560 R3' >
	<config data='' clkspd='16000000' simspd='1' usewdt='0' constif='0' commport='4' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug />
	<traces />
	<ghost >
		<FK2 >
			<data name='FK2D0' port='4294967295' pin='4294967295' />
			<data name='FK2D1' port='4294967295' pin='4294967295' />
			<data name='FK2D2' port='4294967295' pin='4294967295' />
			<data name='FK2D3' port='4294967295' pin='4294967295' />
			<data name='FK2D4' port='4294967295' pin='4294967295' />
			<data name='FK2D5' port='4294967295' pin='4294967295' />
			<data name='FK2D6' port='4294967295' pin='4294967295' />
			<data name='FK2D7' port='4294967295' pin='4294967295' />
			<data name='FK2D8' port='4294967295' pin='4294967295' />
			<data name='FK2D9' port='4294967295' pin='4294967295' />
			<data name='FK2D10' port='4294967295' pin='4294967295' />
			<data name='FK2D11' port='4294967295' pin='4294967295' />
			<data name='FK2D12' port='4294967295' pin='4294967295' />
			<data name='FK2D13' port='4294967295' pin='4294967295' />
			<data name='FK2D14' port='4294967295' pin='4294967295' />
			<data name='FK2D15' port='4294967295' pin='4294967295' />
			<data name='FK2A0' port='4294967295' pin='4294967295' />
			<data name='FK2A1' port='4294967295' pin='4294967295' />
			<data name='FK2A2' port='4294967295' pin='4294967295' />
			<data name='FK2A3' port='4294967295' pin='4294967295' />
			<data name='FK2A4' port='4294967295' pin='4294967295' />
			<data name='FK2A5' port='4294967295' pin='4294967295' />
		</FK2>
		<ICD >
			<data name='AnalogPrescaleValue' value='19' />
			<data name='DigitalSampleRate' value='100000' />
			<data name='BreakpointCount' value='8' />
			<data name='CallStackDepthCount' value='8' />
			<data name='ClockPort' value='7' />
			<data name='ClockPin' value='6' />
			<data name='DataPort' value='7' />
			<data name='DataPin' value='5' />
			<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' />
			<data name='AnalogEB2PrescaleValue' value='2' />
			<data name='DigitalEB2SampleRate' value='100000' />
		</ICD>
		<pins >
			<digital A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
			<analog A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
		</pins>
	</ghost>
	<components >
		<settings autoimg='0' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='df7ed39b-b400-403e-ba53-ad60d48f2e59' vstate='40' vmin='0' vmaj='1' srcleaf='ds3231.fcfx' visiblename='DS3231' description='RTC Clock component for DS3231/2' category='Data' catenable='1' author='Martin Fisher' manuname='' manucode='' sysinfo='267' keywords='' dynamic='1' scadaCompatible='0' embeddedCompatible='1' iconpath='' />
		<component class_type='root' codename='DS3231' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='0' poslock='0' >
			<resources />
			<properties >
				<property name='i2c address of DS3231' target='rtc_address' typeid='21' hidden='0' locked='0' info='' />
				<property name='Channel' target='cal_i2c1::CHANNEL' typeid='16' hidden='0' locked='0' info='Channel selection' filter='000Software
001Channel 1
' />
				<property name='SDA' target='cal_i2c1::SDA' typeid='5' hidden='0' locked='1' info='Pin used for SDA (data signal)' />
				<property name='SCL' target='cal_i2c1::SCL' typeid='5' hidden='0' locked='1' info='Pin used for SCL (clock signal)' />
				<property name='Baud Select' target='cal_i2c1::BAUD_LIST' typeid='16' hidden='0' locked='0' info='Baud rate option selector' filter='000Custom
001100KHz
002400KHz
0031MHz' />
				<property name='LED' target='led' typeid='5' hidden='0' locked='0' info='' />
			</properties>
			<values >
				<value target='rtc_address' data='208' />
				<value target='cal_i2c1::CHANNEL' data='001' />
				<value target='cal_i2c1::SDA' data='$PORTD.1' />
				<value target='cal_i2c1::SCL' data='$PORTD.0' />
				<value target='cal_i2c1::BAUD_LIST' data='001' />
				<value target='led' data='$PORTB.7' />
			</values>
			<events />
			<apis >
				<api name='GetDateString' alt='GetDateString' type='1' proto='1' />
				<api name='SetAlarmTime' alt='SetAlarmTime' type='1' proto='1' />
				<api name='GetTempStr' alt='GetTempStr' type='1' proto='1' />
				<api name='WriteByte' alt='WriteByte' type='1' proto='1' />
				<api name='SetAlarm' alt='SetAlarm' type='1' proto='1' />
				<api name='GetTimeNow' alt='GetTimeNow' type='1' proto='1' />
				<api name='SetTimeHMS' alt='SetTimeHMS' type='1' proto='1' />
				<api name='CheckAlarm' alt='CheckAlarm' type='1' proto='1' />
				<api name='SetAlarmDate' alt='SetAlarmDate' type='1' proto='1' />
				<api name='GetTemperature' alt='GetTemperature' type='1' proto='1' />
				<api name='Enable32kHz' alt='Enable32kHz' type='1' proto='1' />
				<api name='RestartRTC' alt='RestartRTC' type='1' proto='1' />
				<api name='GetTimeString' alt='GetTimeString' type='1' proto='1' />
				<api name='SetDate' alt='SetDate' type='1' proto='1' />
				<api name='EnableSQW' alt='EnableSQW' type='1' proto='1' />
				<api name='GetDate' alt='GetDate' type='1' proto='1' />
				<api name='SetAlarmFlags' alt='SetAlarmFlags' type='1' proto='1' />
				<api name='GetByte' alt='GetByte' type='1' proto='1' />
				<api name='GetAlarm' alt='GetAlarm' type='1' proto='1' />
				<api name='SetDayOfWeek' alt='SetDayOfWeek' type='1' proto='1' />
				<api name='Initialise' alt='Initialise' type='1' proto='1' />
			</apis>
			<variables >
				<variable public='0' >
					<def class_type='variable' name='PM' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='led_state' type='b1' description='' isconst='0' isinit='1' usrinit='1' setinit='true' />
				</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='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='BinToBCD' description='Convert a 8 bit binary number to BCD representation' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='bin' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Should be a macro?' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.Return = .bin + 6 * (.bin / 10)' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetDateString' description='Get current date as DD/MM/YY' >
						<return name='Return' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' />
						<local name='dmy' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</local>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='GetDate' >
							<argument exp='.dmy' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='FormatString' >
							<return exp='.Return' />
							<argument exp='.dmy' />
							<argument exp='3' />
							<argument exp='&apos;/&apos;' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetAlarmTime' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='alarm' type='u8' description='alarm number (1 or 2)' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='hms' type='u8' description='Hours, minutes (and for alarm 1) seconds' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</param>
						<local name='addr' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='n' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='x' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='tim' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</local>
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.alarm = 1' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.addr = 0x07' />
									<exp exp='.n = 3' />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.addr = 0x0B' />
									<exp exp='.n = 2' />
								</command>
							</flowline>
						</command>
						<command class_type='loop' title='Copy data and convert to BCD' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='.n' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.tim[.i] = BinToBCD (.hms[.n - .i - 1])' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Write the time to alarm control regs' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SendBytes' >
							<argument exp='.addr' />
							<argument exp='.n' />
							<argument exp='.tim' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetTempStr' description='Get temperature as a string - updated every 64s - force true to reconvert immediately' >
						<return name='Return' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' />
						<param name='force' type='b1' description='Set to true to force temp conversion' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='t' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='tstr' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='10' />
						</local>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='GetTemperature' >
							<return exp='.t' />
							<argument exp='.force' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.tstr = FloatToString$ (.t,2)' />
							<exp exp='.Return = .tstr' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetFlags' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='addr' type='u8' description='start address of flag control regs' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='n' type='u8' description='Number of flags (4 or 3 or alarm no?)' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='flags' type='u8' description='Flags to set in bottom 3/4 bits' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='data' type='T8' description='Buffer to hold current data' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='4' />
						</local>
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Read the alarm regs first' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadBytes' >
							<argument exp='.addr' />
							<argument exp='.n' />
							<argument exp='.data' />
						</command>
						<command class_type='loop' title='For 3 or 4 alarm flags set bit 7 of reg' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='.n' >
							<flowline >
								<command class_type='decision' title='If flag bit is set ' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.flags &amp; 1' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='.data[.i] = .data[.i] | 0x80' />
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='.data[.i] = .data[.i] &amp; 0x7f' />
										</command>
									</flowline>
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.flags = .flags &gt;&gt; 1' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Rewrite alarm regs' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SendBytes' >
							<argument exp='.addr' />
							<argument exp='.n' />
							<argument exp='.data' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='WriteByte' description='Write a byte to the ram on the DS3232 chip' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='addr' type='u8' description='address - 0 ..235' 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 Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SendByte' >
							<argument exp='.addr - 0x14' />
							<argument exp='.data' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetAlarm' description='Turn Alarm on or off (1, 2 or 3 for both)' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='alarm' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='on' type='b1' description='Set true to turn alarm on' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='data' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='2' />
						</local>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadBytes' >
							<argument exp='0x0E' />
							<argument exp='2' />
							<argument exp='.data' />
						</command>
						<command class_type='decision' title='On or off' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.on' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.data[0] = .alarm &amp; 0b11 | 0b100' />
									<exp exp='.data[1] = .data[1] &amp; (~ (.alarm &amp; 0b11))' />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Swap the alarm bits' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.data[0] = (.data[0] &amp; 0b11111100) | ((~ .alarm) &amp; 0b11)' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SendBytes' >
							<argument exp='0x0E' />
							<argument exp='2' />
							<argument exp='.data' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SendByte' description='Send a single byte to RTC chip' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='addr' type='u8' description='Address to control register' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='data' type='u8' description='data to send' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='rtc_address' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.addr' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.data' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='SendBytes' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='addr' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='n' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='data' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</param>
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='rtc_address' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.addr' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='.n' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_TxByte' >
									<argument exp='.data[.i]' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='GetTimeNow' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='now' type='u8' description='Get Hours, Minutes and Seconds of Now' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</param>
						<local name='smh' type='u8' description='data read from RTC' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</local>
						<local name='h12' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadBytes' >
							<argument exp='0' />
							<argument exp='3' />
							<argument exp='.smh' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.h12 = .smh[2] &amp; 0b01000000' />
							<exp exp='' />
							<exp exp='.now[1] = BCDToBin (.smh[1])' />
							<exp exp='.now[2] = BCDToBin (.smh[0])' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.h12' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.now[0] = BCDToBin (.smh[2] &amp; 0x1F) | ((.smh[2] &amp; 0b00100000) &lt;&lt; 2)' />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.now[0] = BCDToBin (.smh[2] &amp; 0x3F)' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='TimerInt' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='output' title='Output' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048577' mask='32' exp='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='SetTime' description='Set time (hours mins secs) - if 12h mode bit 7 of hours should be set to 1' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='hms' type='u8' description='Hours minutes and seconds' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</param>
						<local name='data' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</local>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.data[2] = BinToBCD (.hms[0])' />
							<exp exp='.data[1] = BinToBCD (.hms[1])' />
							<exp exp='.data[0] = BinToBCD (.hms[2])' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SendBytes' >
							<argument exp='0' />
							<argument exp='3' />
							<argument exp='.data' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetTimeHMS' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='h' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='m' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='s' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='hms' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</local>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.hms[0] = .h' />
							<exp exp='.hms[1] = .m' />
							<exp exp='.hms[2] = .s' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SetTime' >
							<argument exp='.hms' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='BCDToBin' description='Convert a BCD two digit number to binary representation' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='bcd' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='should be a macro?' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.Return = .bcd - 6 * (.bcd &gt;&gt; 4)' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='CheckAlarm' description='Did alarm go off - clear the flag (to allow a repeat) and return true if set' >
						<return name='Return' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='alarm' type='u8' description='1 or 2' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='control_byte' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadByte' >
							<return exp='.control_byte' />
							<argument exp='0x0F' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.alarm = .alarm &amp; 0b11' />
							<exp exp='.Return = (.control_byte &amp; .alarm) != 0' />
							<exp exp='.control_byte = .control_byte &amp; (~ .alarm)' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SendByte' >
							<argument exp='0x0F' />
							<argument exp='.control_byte' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='FormatString' description='' >
						<return name='Return' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' />
						<param name='data' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</param>
						<param name='n' type='u8' description='Number of Bytes' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='seperator' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='pos' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='digit' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='.n' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.digit = .data[.i]' />
									<exp exp='.Return[.pos] = (.digit / 10) + &apos;0&apos;' />
									<exp exp='.Return[.pos + 1] = (.digit % 10) + &apos;0&apos;' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.Return[.pos + 2] = .seperator' />
									<exp exp='.pos = .pos + 3' />
								</command>
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.Return[.pos - 1] = 0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetAlarmDate' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='alarm' type='u8' description='Alarm 1 or 2' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='day' type='u8' description='Day (0 to 7) weekly = true or Date (0..31) if weekly = false' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='weekly' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='addr' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='data' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Check which alarm' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.alarm = 1' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.addr = 0x0A' />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.addr = 0x0D' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadByte' >
							<return exp='.data' />
							<argument exp='.addr' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.data = .data | .weekly &lt;&lt; 6 | BinToBCD (.day)' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SendByte' >
							<argument exp='.addr' />
							<argument exp='.data' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Pulse2' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='led_state = !led_state' />
							<exp exp='led = led_state' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetTemperature' description='Get  temperature from RTC sensor' >
						<return name='Return' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<param name='force' type='b1' description='Set true to force a conversion (else every 64s)' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='data' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='2' />
						</local>
						<local name='hi' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='lo' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='status' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='temp_read' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='false' />
						<local name='conv_now' type='u8' description='Has a conversion started' isconst='0' isinit='1' usrinit='0' setinit='false' />
						<local name='busy' type='u8' description='Temp conversion occurring' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.force' swap='0' >
							<flowline >
								<command class_type='loop' title='Wait till we have temp  conversion occurring' comment='Check for bsy flag - if set a conversion is underway - if not then force a conversion by setting conv flag
' cmdcolor='12615680' cmdcolor_sec='15376912' type='1' exp='.busy' start='0' >
									<flowline >
										<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadByte' >
											<return exp='.status' />
											<argument exp='0x0F' />
										</command>
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='.busy = .status &amp; 0b100' />
										</command>
										<command class_type='decision' title='If a conversion is underway wait till finished else initiale one' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.busy' swap='0' >
											<flowline />
											<flowline >
												<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadByte' >
													<return exp='.status' />
													<argument exp='0x0E' />
												</command>
												<command class_type='calculation' title='Force CONV bit high' cmdcolor='16760919' cmdcolor_sec='16760832' >
													<exp exp='.status = .status | 0b100000' />
												</command>
												<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SendByte' >
													<argument exp='0x0E' />
													<argument exp='.status' />
												</command>
												<command class_type='delay' title='At least 2ms delay before bsy goes high' cmdcolor='12632064' cmdcolor_sec='16769676' exp='2' type='1' />
											</flowline>
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='loop' title='Wait for conversion to finish' cmdcolor='12615680' cmdcolor_sec='15376912' type='1' exp='! .busy' start='0' >
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadByte' >
									<return exp='.status' />
									<argument exp='0x0F' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.busy = .status &amp; 0b100' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='1' type='1' />
							</flowline>
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadBytes' >
							<argument exp='0x11' />
							<argument exp='2' />
							<argument exp='.data' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.hi = .data[0]' />
							<exp exp='.lo = .data[1]' />
							<exp exp='.Return = (.hi &lt;&lt; 2) | (.lo &gt;&gt; 6)' />
							<exp exp='.Return = .Return / 4.0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Enable32kHz' description='Turn the 32kHz square wave on (true) or off (false)' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='on' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='control_byte' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadByte' >
							<return exp='.control_byte' />
							<argument exp='0x0F' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.on' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.control_byte = .control_byte | 0b00001000' />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.control_byte = .control_byte &amp; 0b11110111' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SendByte' >
							<argument exp='0x0F' />
							<argument exp='.control_byte' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='RestartRTC' description='Reset the oscillator flag  - restarts the RTC if this is set' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='control' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Get control byte' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadByte' >
							<return exp='.control' />
							<argument exp='0x0E' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.control = .control &amp; 0b000100100' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SendByte' >
							<argument exp='0x0F' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SendByte' >
							<argument exp='0x0E' />
							<argument exp='.control' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='DumpRegisters' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='data' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='19' />
						</local>
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='str' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<local name='bit' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='mask' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadBytes' >
							<argument exp='0' />
							<argument exp='0x13' />
							<argument exp='.data' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='0x13' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.str = NumberToHex$ (.i)' />
									<exp exp='.mask = 0b10000000' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='UART1' macro='SendString' >
									<argument exp='.str' />
								</command>
								<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.bit' exp='8' >
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='UART1' macro='SendChar' >
											<argument exp='&apos;\t&apos;' />
										</command>
										<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='UART1' macro='SendNumber' >
											<argument exp='(.data[.i] &amp; .mask) != 0' />
										</command>
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='.mask = .mask &gt;&gt; 1' />
										</command>
									</flowline>
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='UART1' macro='SendString' >
									<argument exp='&quot;\r\n&quot;' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='UART1' macro='SendString' >
							<argument exp='&quot;\r\n&quot;' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='100' type='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='SetDate' description='Set the current date' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='day' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='month' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='year' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='dmy' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</local>
						<command class_type='comment' title='' comment='to-do 

Set Century bit if year &gt;&gt; 99
currently assumes year is 0..99' textarea='12,0,12,0' cmdcolor='10944511' cmdcolor_sec='11465458' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.dmy[0] = BinToBCD (.day)' />
							<exp exp='.dmy[1] = BinToBCD (.month)' />
							<exp exp='.dmy[2] = BinToBCD (.year % 100)' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SendBytes' >
							<argument exp='0x04' />
							<argument exp='3' />
							<argument exp='.dmy' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetTimeString' description='Get th current time as
HH:MM:SS' >
						<return name='Return' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' />
						<param name='seconds' type='b1' description='Set true to include secs' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='hms' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</local>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='GetTimeNow' >
							<argument exp='.hms' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='FormatString' >
							<return exp='.Return' />
							<argument exp='.hms' />
							<argument exp='2+.seconds' />
							<argument exp='&apos;:&apos;' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadByte' description='' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='addr' type='u8' description='Address of control register to read' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='rtc_address' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.addr' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_Restart' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='rtc_address | 1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_RxByte' >
							<return exp='.Return' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='EnableSQW' description='Enable square wave - disables alarms
Rate set by RS2RS1' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='rate' type='u8' description='0 = 1hz. 1 = 1kHz, 2 = 4kHz and 3 = 8kHz' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='battery' type='b1' description='Output SQW on battery power too' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='control' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadByte' >
							<return exp='.control' />
							<argument exp='0x0E' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.control = .control &amp; 0b10100011 // Clear INTCN and RS1/2' />
							<exp exp='.rate = .rate &amp; 0b11' />
							<exp exp='.control = .control | (.rate &lt;&lt; 3) | (.battery &lt;&lt; 6)' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SendByte' >
							<argument exp='0x0E' />
							<argument exp='.control' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetDate' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='date' type='u8' description='On return holds day of week, day, month and year' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='4' />
						</param>
						<local name='data' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='4' />
						</local>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadBytes' >
							<argument exp='0x04' />
							<argument exp='3' />
							<argument exp='.data' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.date[0] = BCDToBin (.data[0])' />
							<exp exp='.date[1] = BCDToBin (.data[1] &amp; 0x7F)' />
							<exp exp='.date[2] = BCDToBin (.data[2])' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetAlarmFlags' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='alarm' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='flags' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Alarm 1 or 2' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.alarm = 1' swap='0' >
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SetFlags' >
									<argument exp='0x07' />
									<argument exp='4' />
									<argument exp='.flags' />
								</command>
							</flowline>
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SetFlags' >
									<argument exp='0x0B' />
									<argument exp='3' />
									<argument exp='.flags' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetByte' description='Read a byte from DS3232 memory ' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='addr' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadByte' >
							<return exp='.Return' />
							<argument exp='.addr - 0x14' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadBytes' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='addr' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='n' type='u8' description='Number of bytes to read' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='data' type='u8' description='Bytes read from RTC' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</param>
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='rtc_address' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.addr' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_Restart' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='rtc_address | 1' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='.n' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_RxByte' >
									<return exp='.data[.i]' />
									<argument exp='.i = .n - 1' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='GetAlarm' description='Get an alarm time as hm and for alarm 1 seconds
for alarm 2 - s is set to 0' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='alarm' type='u8' description='alarm 1 or 2' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='hms' type='u8' description='Hours mins and secs for alarm 1 time' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</param>
						<local name='data' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</local>
						<local name='h12' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='addr' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='n' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.alarm = 1' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.addr = 0x07' />
									<exp exp='.n = 3' />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.addr = 0x0B' />
									<exp exp='.n = 2' />
									<exp exp='.data[0] = 0' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ReadBytes' >
							<argument exp='.addr' />
							<argument exp='.n' />
							<argument exp='.data' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.h12 = .data[2] &amp; 0b01000000' />
							<exp exp='' />
							<exp exp='.hms[1] = BCDToBin (.data[1] &amp; 0x7F)' />
							<exp exp='.hms[2] = BCDToBin (.data[0] &amp; 0x7F)' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.h12' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.hms[0] = BCDToBin (.data[2] &amp; 0x1F) | ((.data[2] &amp; 0b00100000) &lt;&lt; 2)' />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.hms[0] = BCDToBin (.data[2] &amp; 0x3F)' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetDayOfWeek' description='Set current day of week (1..7)' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='day' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SendByte' >
							<argument exp='0x03' />
							<argument exp='.day' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Pulse' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='led_state = !led_state' />
							<exp exp='led = led_state' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='now' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</local>
						<local name='str' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='UART1' macro='Initialise' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='UART1' macro='SendString' >
							<argument exp='&quot;DS3231 SQW Test\r\n&quot;' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='led = 1' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='1' type='2' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Initialise' />
						<command class_type='interrupt' title='Enable interrupt to wake MCU' cmdcolor='17151' cmdcolor_sec='355583' enable='1' name='INT4' call='Pulse' >
							<settings timer='0' prescale='-1' postscale='-1' rollover='-1' bitcount='-1' trigger='1' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
							</settings>
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='UART1' macro='SendString' >
									<argument exp='&quot;1Hz flash\r\n&quot;' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='EnableSQW' >
									<argument exp='0' />
									<argument exp='false' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='DumpRegisters' />
								<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='5' type='2' />
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='UART1' macro='SendString' >
									<argument exp='&quot;1kHz flash\r\n&quot;' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='EnableSQW' >
									<argument exp='1' />
									<argument exp='false' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='DumpRegisters' />
								<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='5' type='2' />
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='UART1' macro='SendString' >
									<argument exp='&quot;4kHz flash\r\n&quot;' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='EnableSQW' >
									<argument exp='2' />
									<argument exp='false' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='DumpRegisters' />
								<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='5' type='2' />
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='UART1' macro='SendString' >
									<argument exp='&quot;8kHz flash\r\n&quot;' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='EnableSQW' >
									<argument exp='3' />
									<argument exp='false' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='DumpRegisters' />
								<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='5' type='2' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Initialise' description='Initialise i2c bus for RTC' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_i2c1' macro='Master_Init' />
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='ed3a5141-43bb-43e0-86b0-2243fd1147ca' vmin='1' vmaj='2' codename='cal_i2c1' x='0' y='0' z='0' xsz='20' ysz='20' zsz='20' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='ENABLED' data='1' />
					<value target='REF' data='1' />
					<value target='CHANNEL' data='001' />
					<value target='Mode' data='000' />
					<value target='SDA' data='$PORTD.1' />
					<value target='SDAPins' data='000' />
					<value target='SCL' data='$PORTD.0' />
					<value target='SCLPins' data='000' />
					<value target='StopDel' data='1' />
					<value target='BAUD_LIST' data='001' />
					<value target='BAUD' data='100000' />
					<value target='SRC' data='000' />
					<value target='SMB' data='000' />
					<value target='ClockStretching' data='1' />
					<value target='BMODE' data='0' />
					<value target='SDA_PORT' data='$PORTD.1' />
					<value target='SDA_TRIS' data='$PORTD.1' />
					<value target='SDA_PIN' data='1' />
					<value target='SCL_PORT' data='$PORTD.0' />
					<value target='SCL_TRIS' data='$PORTD.0' />
					<value target='SCL_PIN' data='0' />
					<value target='MASTER' data='1' />
					<value target='ScopeTraces' data='1' />
					<value target='ConsoleData' data='1' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='0' />
					<value target='REMAPPABLE' data='' />
					<value target='SDABank' data='b' />
					<value target='SDABank2' data='c' />
					<value target='SCLBank' data='b' />
					<value target='SCLBank2' data='c' />
					<value target='SDARPNUM' data='21' />
					<value target='SCLRPNUM' data='20' />
					<value target='SDARPREG' data='SSP1DATPPS' />
					<value target='SCLRPREG' data='SSP1CLKPPS' />
					<value target='SDAREG' data='000' />
					<value target='SCLREG' data='001' />
					<value target='Sim' data='1' />
					<value target='ParentName' data='' />
					<value target='BitDelay' data='10' />
					<value target='SDAAlts' data='000' />
					<value target='SCLAlts' data='000' />
					<value target='SDAAlt' data='4' />
					<value target='SCLAlt' data='4' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c73616d1-7ad0-45d9-aada-69ccfa4c5efc' vmin='0' vmaj='2' codename='UART1' x='0' y='0' z='10.765' xsz='64' ysz='32' zsz='1.53' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='cal_uart::CHANNEL' data='001' />
					<value target='cal_uart::BAUD_LIST' data='004' />
					<value target='cal_uart::BAUD' data='9600' />
					<value target='cal_uart::DBITS' data='008' />
					<value target='cal_uart::RETURN' data='000' />
					<value target='cal_uart::ECHO' data='000' />
					<value target='cal_uart::UseTX' data='1' />
					<value target='cal_uart::TX' data='$PORTE.1' />
					<value target='cal_uart::OutputPins' data='007' />
					<value target='cal_uart::TXAlt' data='0' />
					<value target='cal_uart::UseRX' data='1' />
					<value target='cal_uart::RX' data='$PORTE.0' />
					<value target='cal_uart::InputPins' data='013' />
					<value target='cal_uart::RXAlt' data='0' />
					<value target='cal_uart::FLOWEN' data='000' />
					<value target='cal_uart::RTS' data='$PORTB.2' />
					<value target='cal_uart::CTS' data='$PORTB.1' />
					<value target='label' data='UART' />
					<value target='cal_uart::ScopeTraces' data='0' />
					<value target='cal_uart::ConsoleData' data='0' />
					<value target='cal_uart::ConsoleFormat' data='000' />
					<value target='cal_uart::ConsoleColumns' data='64' />
					<value target='cal_uart::DataSource' data='000' />
					<value target='cal_uart::com_port' data='000' />
					<value target='cal_uart::Injector' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='7292207' 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='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='0' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='100' scrollx='0' scrolly='220' flags='0' />
		<view type='0' name='Pulse2' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Pulse' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='DumpRegisters' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetByte' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='WriteByte' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Initialise' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetAlarmDate' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetTempStr' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='90' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetAlarm' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='EnableSQW' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetDayOfWeek' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='CheckAlarm' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Enable32kHz' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetAlarm' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetTemperature' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='RestartRTC' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='85' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ReadByte' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='105' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SendByte' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='105' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetTimeHMS' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='90' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetTime' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetAlarmFlags' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='TimerInt' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetFlags' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='BinToBCD' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='BCDToBin' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetAlarmTime' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetTimeString' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetDate' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetDateString' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetTimeNow' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetDate' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SendBytes' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAbwUAAFgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
