<root>
<document scada='0' schema='103' license='1,81910992,MF66JZ' title='' description='' fcversion='655616' target='PIC.12F.12F617' >
	<config data='!0,3f94%0,4%3,0%4,1%5,0%6,0%7,1%8,3%a,3' clkspd='8000000' simspd='1' usewdt='1' constif='0' 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='0' />
			<data name='ClockPin' value='1' />
			<data name='DataPort' value='0' />
			<data name='DataPin' value='0' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='21' />
			<data name='CalculatedCommsDelay' value='21' />
			<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='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='' category2='' category3='' bIs2dOnly='0' bIs3dOnly='0' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='0' scadaCompatible='0' embeddedCompatible='1' showmacros='1' iconpath='' />
		<component class_type='root' codename='panel' panelId='-1' 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' comp2dType='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='comparator_timer_counter_bit' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='mono_time_led_bit' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='versionsanzeige_on_off' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='versionsanzeige_100ms' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='versionsanzeige_2000ms' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='versionsanzeige_revision_init' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='comparator_timer_counter' type='s16' description='value x int = 586 x 512us = 150ms016' isconst='1' isHidden='0' isinit='1' usrinit='293' setinit='293' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='led_bit' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='versionsanzeige_counter' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='versionsanzeige_version' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='versionsanzeige_bit' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='versionsanzeige_300ms' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='versionsanzeige_version_init' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='comparator_flag_counter_temp' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='comparator_ref_temp' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='versionsanzeige_revision' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='versionsanzeige_ablauf' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='comparator_flag_counter' type='s16' description='' isconst='1' isHidden='0' isinit='1' usrinit='10' setinit='10' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='mono_time_counter_bit' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='mono_time_counter' type='s16' description='value x int = 5859 x 512us = 2s999808' isconst='1' isHidden='0' isinit='1' usrinit='5859' setinit='5859' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='mono_time_counter_temp' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='mono_reset_3s_uint' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='comparator_timer_counter_temp' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='comparator_flag_bit' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='int_trm0_00' description='cpu: 12f675
int oscillator 8mhz
timer interrupt at 512us' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='decision' title='Entscheidung' textarea='36,0,511,300' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_on_off = 0' swap='0' >
							<flowline >
								<command class_type='comment' title='' comment='flag bearbeiten' textarea='12,0,487,300' cmdcolor='13499135' cmdcolor_sec='11370621' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' />
								<command class_type='native' title='comparator flag abfragen' textarea='36,0,511,300' ccode='// comparator flag abfragen und übergeben
FCV_COMPARATOR_FLAG_BIT = PIR1bits.CMIF;//(pir1,3)' cmdcolor='13959039' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' language='C' />
								<command class_type='decision' title='flag gesetzt' textarea='36,0,511,300' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='comparator_flag_bit = 1' swap='0' >
									<flowline >
										<command class_type='native' title='comp flag erase' textarea='36,0,511,300' ccode='//PIR1: PERIPHERAL INTERRUPT REQUEST REGISTER 1
PIR1bits.CMIF = 0; //comp flag = 0' cmdcolor='13959039' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' language='C' />
										<command class_type='calculation' title='flag counter + 1' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
											<exp exp='comparator_flag_counter_temp = comparator_flag_counter_temp + 1 // increase' />
											<exp exp='comparator_flag_bit = 0 // init' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='comment' title='' comment='? flags in ? time' textarea='12,0,487,300' cmdcolor='13499135' cmdcolor_sec='11370621' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' />
								<command class_type='decision' title='comparator timer' textarea='36,0,511,300' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='comparator_timer_counter_temp = 0' swap='0' >
									<flowline >
										<command class_type='calculation' title='setup' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
											<exp exp='comparator_timer_counter_temp = comparator_timer_counter // reload' />
											<exp exp='' />
										</command>
										<command class_type='decision' title='enough flags ?' textarea='36,0,511,300' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='comparator_flag_counter_temp &gt; comparator_flag_counter' swap='0' >
											<flowline >
												<command class_type='calculation' title='start mono' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
													<exp exp='mono_time_counter_bit = 1 // start mono' />
													<exp exp='mono_time_counter_temp = mono_time_counter // init' />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='calculation' title='init flag counter' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
											<exp exp='comparator_flag_counter_temp = 0 // init' />
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title='counter - 1' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
											<exp exp='comparator_timer_counter_temp = comparator_timer_counter_temp - 1 // decrease' />
										</command>
									</flowline>
								</command>
								<command class_type='comment' title='' comment='monoflop' textarea='12,0,487,300' cmdcolor='13499135' cmdcolor_sec='11370621' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' />
								<command class_type='decision' title='start ?' textarea='36,0,511,300' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='mono_time_counter_bit = 1' swap='0' >
									<flowline >
										<command class_type='output' title='led mono on' textarea='36,0,511,300' cmdcolor='15794160' cmdcolor_sec='3781962' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' mode='1' port='1048576' mask='32' exp='1' usechipref='1' />
										<command class_type='output' title='träger on' textarea='36,0,511,300' cmdcolor='15794160' cmdcolor_sec='3781962' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' mode='1' port='1048576' mask='16' exp='1' usechipref='1' />
										<command class_type='decision' title='counter = 0 ?' textarea='36,0,511,300' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='mono_time_counter_temp = 0' swap='0' >
											<flowline >
												<command class_type='calculation' title='setup' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
													<exp exp='mono_time_counter_bit = 0 // mono disable' />
													<exp exp='' />
												</command>
											</flowline>
											<flowline >
												<command class_type='calculation' title='counter - 1' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
													<exp exp='mono_time_counter_temp = mono_time_counter_temp - 1' />
												</command>
											</flowline>
										</command>
									</flowline>
									<flowline >
										<command class_type='output' title='led mono off' textarea='36,0,511,300' cmdcolor='15794160' cmdcolor_sec='3781962' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' mode='1' port='1048576' mask='32' exp='0' usechipref='1' />
										<command class_type='output' title='träger off' textarea='36,0,511,300' cmdcolor='15794160' cmdcolor_sec='3781962' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' mode='1' port='1048576' mask='16' exp='0' usechipref='1' />
									</flowline>
								</command>
							</flowline>
							<flowline >
								<command class_type='comment' title='' comment='Versionsanzeige' textarea='36,10,511,310' cmdcolor='13499135' cmdcolor_sec='11370621' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' />
								<command class_type='decision' title='counter start = 1' textarea='36,0,511,300' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_bit = 1' swap='0' >
									<flowline >
										<command class_type='decision' title='Entscheidung' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_counter = 1' swap='0' >
											<flowline >
												<command class_type='calculation' title='Berechnung' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
													<exp exp='versionsanzeige_bit = 0 // disable' />
													<exp exp='versionsanzeige_ablauf = versionsanzeige_ablauf + 1 // next' />
												</command>
											</flowline>
											<flowline >
												<command class_type='calculation' title='Berechnung' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
													<exp exp='versionsanzeige_counter = versionsanzeige_counter - 1' />
												</command>
											</flowline>
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
						</command>
						<command class_type='decision' title='reset timer extern --&gt; 512usx5859' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='mono_reset_3s_uint = 5859' swap='0' >
							<flowline >
								<command class_type='output' title='reset extern off' cmdcolor='15794160' cmdcolor_sec='3781962' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' mode='1' port='1048576' mask='4' exp='1' usechipref='1' />
							</flowline>
							<flowline >
								<command class_type='calculation' title='Berechnung' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
									<exp exp='mono_reset_3s_uint = mono_reset_3s_uint + 1' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='versionsanzeige' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='decision' title='versionsanzeige timer runs = 1' textarea='36,0,511,300' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_bit = 0' swap='0' >
							<flowline >
								<command class_type='decision' title='ablauf 0 --&gt; 2000ms led on' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_ablauf = 0' swap='0' >
									<flowline >
										<command class_type='calculation' title='Berechnung 2s' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
											<exp exp='versionsanzeige_counter = versionsanzeige_2000ms // init' />
											<exp exp='versionsanzeige_bit = 1 // start timer' />
										</command>
										<command class_type='output' title='led on' textarea='36,0,511,300' cmdcolor='15794160' cmdcolor_sec='3781962' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' mode='1' port='1048576' mask='32' exp='1' usechipref='1' />
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='ablauf 1 --&gt; 300ms led off' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_ablauf = 1' swap='0' >
									<flowline >
										<command class_type='calculation' title='Berechnung 2s' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
											<exp exp='versionsanzeige_counter = versionsanzeige_300ms // init' />
											<exp exp='versionsanzeige_bit = 1 // start timer' />
										</command>
										<command class_type='output' title='led off' textarea='36,0,511,300' cmdcolor='15794160' cmdcolor_sec='3781962' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' mode='1' port='1048576' mask='32' exp='0' usechipref='1' />
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='ablauf 2 --&gt; 100ms led on' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_ablauf = 2' swap='0' >
									<flowline >
										<command class_type='calculation' title='Berechnung 2s' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
											<exp exp='versionsanzeige_counter = versionsanzeige_100ms // init' />
											<exp exp='versionsanzeige_bit = 1 // start timer' />
										</command>
										<command class_type='output' title='led on' textarea='36,0,511,300' cmdcolor='15794160' cmdcolor_sec='3781962' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' mode='1' port='1048576' mask='32' exp='1' usechipref='1' />
									</flowline>
									<flowline />
								</command>
								<command class_type='comment' title='' comment='versions counter' textarea='12,0,487,300' cmdcolor='13499135' cmdcolor_sec='11370621' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' />
								<command class_type='decision' title='ablauf 3 --&gt; version' textarea='36,0,511,300' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_ablauf = 3' swap='0' >
									<flowline >
										<command class_type='decision' title='version counter' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_version &gt; 1' swap='0' >
											<flowline >
												<command class_type='calculation' title='Berechnung' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
													<exp exp='versionsanzeige_version = versionsanzeige_version - 1 // next versions' />
													<exp exp='versionsanzeige_ablauf = 1 // output next puls' />
												</command>
											</flowline>
											<flowline >
												<command class_type='calculation' title='Berechnung' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
													<exp exp='versionsanzeige_ablauf = versionsanzeige_ablauf + 1 // next' />
												</command>
											</flowline>
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='comment' title='' comment='versionscounter ende' textarea='12,0,487,300' cmdcolor='13499135' cmdcolor_sec='11370621' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' />
								<command class_type='decision' title='ablauf 4 --&gt; 2000ms led off' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_ablauf = 4' swap='0' >
									<flowline >
										<command class_type='calculation' title='Berechnung 1s' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
											<exp exp='versionsanzeige_counter = versionsanzeige_2000ms // init' />
											<exp exp='versionsanzeige_bit = 1 // start timer' />
										</command>
										<command class_type='output' title='led off' textarea='36,0,511,300' cmdcolor='15794160' cmdcolor_sec='3781962' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' mode='1' port='1048576' mask='32' exp='0' usechipref='1' />
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='ablauf 5 --&gt; 100ms led on' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_ablauf = 5' swap='0' >
									<flowline >
										<command class_type='calculation' title='Berechnung 100ms' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
											<exp exp='versionsanzeige_counter = versionsanzeige_100ms // init' />
											<exp exp='versionsanzeige_bit = 1 // start timer' />
										</command>
										<command class_type='output' title='led off' textarea='36,0,511,300' cmdcolor='15794160' cmdcolor_sec='3781962' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' mode='1' port='1048576' mask='32' exp='1' usechipref='1' />
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='ablauf 6 --&gt; 300ms led off' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_ablauf = 6' swap='0' >
									<flowline >
										<command class_type='calculation' title='Berechnung 300ms' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
											<exp exp='versionsanzeige_counter = versionsanzeige_300ms // init' />
											<exp exp='versionsanzeige_bit = 1 // start timer' />
										</command>
										<command class_type='output' title='led off' textarea='36,0,511,300' cmdcolor='15794160' cmdcolor_sec='3781962' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' mode='1' port='1048576' mask='32' exp='0' usechipref='1' />
									</flowline>
									<flowline />
								</command>
								<command class_type='comment' title='' comment='revisions counter' textarea='12,0,487,300' cmdcolor='13499135' cmdcolor_sec='11370621' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' />
								<command class_type='decision' title='ablauf 7 --&gt; revision' textarea='36,0,511,300' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_ablauf = 7' swap='0' >
									<flowline >
										<command class_type='decision' title='revision counter' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_revision &gt; 1' swap='0' >
											<flowline >
												<command class_type='calculation' title='Berechnung' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
													<exp exp='versionsanzeige_revision = versionsanzeige_revision - 1 // next revision' />
													<exp exp='versionsanzeige_ablauf = 5 // output next puls' />
												</command>
											</flowline>
											<flowline >
												<command class_type='calculation' title='Berechnung' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
													<exp exp='versionsanzeige_ablauf = versionsanzeige_ablauf + 1 // next' />
												</command>
											</flowline>
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='comment' title='' comment='revisions counter ende' textarea='12,0,487,300' cmdcolor='13499135' cmdcolor_sec='11370621' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' />
								<command class_type='decision' title='ablauf 8 --&gt; init' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='versionsanzeige_ablauf = 8' swap='0' >
									<flowline >
										<command class_type='calculation' title='init' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
											<exp exp='versionsanzeige_on_off = 0 // ende' />
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='output' title='reset extern on' textarea='36,0,511,300' cmdcolor='15794160' cmdcolor_sec='3781962' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' mode='1' port='1048576' mask='4' exp='0' usechipref='1' />
						<command class_type='native' title='setup cpu / ### comparator ref ###' textarea='36,0,511,300' ccode='/* comparator setup
10000000 = CMON --&gt; Comparator Enable bit
                    1 = Comparator is enabled
                    0 = Comparator is disabled
01000000 = COUT --&gt; Comparator Output bit
                 If C1POL = 1 (inverted polarity):
                    COUT  = 0 when CMVIN+ &gt; CMVINCOUT
                          = 1 when CMVIN+ &lt; CMVINIf
                    C1POL = 0 (non-inverted polarity):
                    COUT  = 1 when CMVIN+ &gt; CMVINCOUT
                          = 0 when CMVIN+ &lt; CMVIN
00100000 = CMOE --&gt; Comparator Output Enable bit
                    1 = COUT is present on the COUT pin(1)
                    0 = COUT is internal only
00010000 = CMPOL --&gt; Comparator Output Polarity Select bit
                     1 = COUT logic is inverted
                     0 = COUT logic is not inverted
00001000 = Unimplemented --&gt; Read as ‘0’
00000100 = CMR --&gt; Comparator Reference Select bit (non-inverting input)
                   1 = CMVIN+ connects to CMVREF output
                   0 = CMVIN+ connects to CIN+ pin
00000010 = Unimplemented --&gt; Read as ‘0’
00000001 = CMCH --&gt; Comparator C1 Channel Select bit
                    0 = CMVIN- pin of the Comparator connects to CIN0-
                    1 = CMVIN- pin of the Comparator connects to CIN1-

note: Comparator output requires the following three conditions --&gt; 
      CMOE = 1, CMON = 1 and corresponding port TRIS bit = 0.
*/
CMCON0 = 0b10000100; // externe ref = 0b10000000


/*  REGISTER VRCON --&gt; VOLTAGE REFERENCE CONTROL REGISTER
bit 7 CMVREN: Comparator Voltage Reference Enable bit(1, 2)
              1 = CVREF circuit powered on and routed to CVREF input of the Comparator
              0 = 0.6 Volt constant reference routed to CVREF input of the Comparator
bit 6 Unimplemented: Read as ‘0’
bit 5 VRR: CVREF Range Selection bit
           1 = Low range
           0 = High range
bit 4 FVREN: 0.6V Reference Enable bit(2)
             1 = Enabled
             0 = Disabled
bit 3-0 VR&lt;3:0&gt;: Comparator Voltage Reference CVREF Value Selection bits (0  VR&lt;3:0&gt;  15)
                 When VRR = 1: CVREF = (VR&lt;3:0&gt;/24) * VDD
                 When VRR = 0: CVREF = VDD/4 + (VR&lt;3:0&gt;/32) * VDD
Note 1: When CMVREN is low, the CVREF circuit is powered down and does not contribute
        to IDD current.
Note 2: When CMVREN is low and the FVREN bit is low, the CVREF signal should provide
        Vss to the comparator.
*/
VRCON = 0b10100011; // low range --&gt; 3 /24x3300mV = 412mV5
//            xxxx = comparator ref
//            xxxx = bits 0...1111 --&gt; 1bit = 137,5mV


//set_bit(trisa, 1); //set bit 1 to an input
//TRISIObits.1 = 1; // erase flag
TRISIO = TRISIO &amp; 0b00000010;

//PIR1: PERIPHERAL INTERRUPT REQUEST REGISTER 1
//clear_bit (pir1,3); //comp flag = 0
PIR1bits.CMIF = 0;' cmdcolor='13959039' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' language='C' />
						<command class_type='output' title='led mono off' textarea='36,0,511,300' cmdcolor='15794160' cmdcolor_sec='3781962' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' mode='1' port='1048576' mask='32' exp='0' usechipref='1' />
						<command class_type='output' title='träger off' textarea='36,0,511,300' cmdcolor='15794160' cmdcolor_sec='3781962' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' mode='1' port='1048576' mask='16' exp='0' usechipref='1' />
						<command class_type='calculation' title=' variable preset' textarea='36,0,511,300' cmdcolor='3329434' cmdcolor_sec='1544914' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' >
							<exp exp='comparator_flag_counter_temp = 0 //ini' />
							<exp exp='comparator_flag_bit = 0 // ini' />
							<exp exp='' />
							<exp exp='mono_time_counter_temp = 0 // ini' />
							<exp exp='mono_time_counter_bit = 0 // ini' />
							<exp exp='' />
							<exp exp='comparator_timer_counter_temp = comparator_timer_counter // ini' />
							<exp exp='comparator_timer_counter_bit = 0 // ini' />
							<exp exp='' />
							<exp exp='comparator_flag_bit = 0 // ini' />
							<exp exp='' />
							<exp exp='//int=512us' />
							<exp exp='versionsanzeige_on_off = 1 // start' />
							<exp exp='versionsanzeige_version_init = 1 // 1 puls' />
							<exp exp='versionsanzeige_version = versionsanzeige_version_init // init' />
							<exp exp='versionsanzeige_revision_init = 1 // 1 puls' />
							<exp exp='versionsanzeige_revision = versionsanzeige_revision_init // init' />
							<exp exp='versionsanzeige_bit = 0 // init' />
							<exp exp='versionsanzeige_ablauf = 0 // init' />
							<exp exp='versionsanzeige_100ms = 195 //  195 x int =  99ms84' />
							<exp exp='versionsanzeige_300ms = 586 //  586 x int =  300ms032' />
							<exp exp='//versionsanzeige_800ms = 1563 // 1563 x int = 800ms256' />
							<exp exp='versionsanzeige_2000ms = 3906 // 3906 x int =  1999ms872' />
						</command>
						<command class_type='delay' title='Warten' textarea='36,0,511,300' cmdcolor='255' cmdcolor_sec='255' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' exp='1' type='2' />
						<command class_type='interrupt' title='Interrupt' textarea='36,0,511,300' cmdcolor='14697803' cmdcolor_sec='14697803' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' enable='1' name='TMR0' call='int_trm0_00' >
							<settings timer='1' prescale='4' postscale='-1' rollover='-1' bitcount='-1' trigger='3' ppsport='-1' ppspin='-1' maskhi='-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAA' masklo='-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAD-AAAA-wAAAP8AAAA' >
								<option value='1' />
								<option value='0' />
								<option value='2' />
								<option value='-1' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
							</settings>
						</command>
						<command class_type='loop' title='Schleife' textarea='36,0,511,300' cmdcolor='16494651' cmdcolor_sec='16494651' cmdcolor_txt='0' cmdgradient='1' cmdopacity='1' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Makro-Aufruf' textarea='36,0,511,300' cmdcolor='65407' cmdcolor_sec='8864659' cmdcolor_txt='0' cmdgradient='0' cmdopacity='1' macro='versionsanzeige' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='0' ye='0' ze='543.75' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='232' dy='857' zoom='51.6267' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='7360576' />
		<winpos ID='7005' RectRecentFloat='524,288,1174,738' RectRecentDocked='0,0,232,880' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
		<winpos ID='7004' RectRecentFloat='556,304,1206,754' RectRecentDocked='0,0,484,450' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel3d>
	<panels2d count='0' />
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA6QUAAGsDAAA' zoom='95' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='int_trm0_00' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA6QUAAGsDAAA' zoom='95' scrollx='0' scrolly='1099' flags='0' />
		<view type='0' name='versionsanzeige' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA6QUAAGsDAAA' zoom='105' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
