<root>
<document schema='101' license='1,Marcel Palmen,TRJ70N' title='' description='' target='PIC.18F.18F4520' >
	<config data='!0,ff!8,76!10,f7!18,fe!20,ff!28,f9!30,bb!38,ff!40,f0!48,3f!50,ff!58,ff!60,ff!68,ff%8,6%e,1%f,0%10,1%11,3%13,2%18,0%19,f%28,1%29,0%2a,0%2f,1%30,1%32,0%36,0%37,1%40,0%41,0%42,0%43,0%4f,0%4e,0%50,1%51,1%52,1%53,1%5f,1%5e,1%5d,1%60,1%61,1%62,1%63,1%6e,1' clkspd='32000000' simspd='1' usewdt='0' constif='0' />
	<plugins >
		<dll_dbg_icd enabled='0' >
			<data name='debug' value='1' />
			<data name='userpins' value='0' />
			<data name='speed' value='0' />
			<data name='usev9' value='0' />
			<data name='breaks' value='8' />
			<data name='stacks' value='8' />
			<data name='clkport' value='1' />
			<data name='clkbit' value='6' />
			<data name='dataport' value='1' />
			<data name='databit' value='7' />
			<data name='ghostype' value='0' />
			<data name='monitor' value='1' />
			<data name='ictloop' value='0' />
			<data name='ictrate' value='20000' />
			<data name='ictmask' value='0' />
			<data name='anlpres' value='255' />
			<data name='digmask1' value='-1' />
			<data name='digmask2' value='-1' />
		</dll_dbg_icd>
		<dll_models enabled='1' />
		<dll_upgrader enabled='1' />
		<dll_webhelp enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='Teller' />
		<watch expr='Periode' />
	</debug>
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='4d5d48c2-42cc-4c10-9437-2b84e0465daf' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='0' iconpath='' />
		<component class_type='root' codename='panel' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Output' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Teller' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Potmeter' type='u8' description='Potmeter op ADC' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Period' type='u8' description='Period of PWM (scale)' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Frequency' type='u16' description='Output frequency' isconst='0' isinit='1' usrinit='16390' setinit='16390' />
				</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='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='output' title='Uitvoer' mode='0' port='1048576' mask='0' exp='0' />
						<command class_type='output' title='Uitvoer' mode='0' port='1048577' mask='0' exp='0' />
						<command class_type='output' title='Uitvoer' mode='0' port='1048578' mask='0' exp='0' />
						<command class_type='output' title='Uitvoer' mode='0' port='1048579' mask='0' exp='0' />
						<command class_type='output' title='Uitvoer' mode='0' port='1048580' mask='0' exp='0' />
						<command class_type='calculation' title='Berekening' >
							<exp exp='Period = 121' />
							<exp exp='Teller = 121' />
						</command>
						<command class_type='call' title='Component Macro Aanroepen' component='PWM1' macro='ChangePeriod' >
							<argument exp='121' />
							<argument exp='4' />
						</command>
						<command class_type='call' title='Component Macro Aanroepen' component='PWM1' macro='Enable' />
						<command class_type='delay' title='Vertraging' exp='50' type='1' />
						<command class_type='call' title='Component Macro Aanroepen' component='PWM1' macro='SetDutyCycle' >
							<argument exp='61' />
						</command>
						<command class_type='comment' title='' comment='50% Duty Cycle ??????? Why not 127 or 128' textarea='12,0,12,0' />
						<command class_type='delay' title='Vertraging' exp='50' type='1' />
						<command class_type='call' title='Component Macro Aanroepen' component='lcd_eb005' macro='Start' />
						<command class_type='delay' title='Vertraging' exp='50' type='1' />
						<command class_type='call' title='Component Macro Aanroepen' component='' macro='' />
						<command class_type='loop' title='Lus' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Component Macro Aanroepen' component='slider_plastic1' macro='GetByte' >
									<return exp='Potmeter' />
								</command>
								<command class_type='delay' title='Vertraging' exp='50' type='1' />
								<command class_type='decision' title='Beslissing' exp='Potmeter &lt; 40' swap='0' >
									<flowline >
										<command class_type='calculation' title='Berekening' >
											<exp exp='Period = 121 //F=16470' />
										</command>
									</flowline>
									<flowline >
										<command class_type='decision' title='Beslissing' exp='Potmeter &lt; 50' swap='0' >
											<flowline >
												<command class_type='calculation' title='Berekening' >
													<exp exp='Period = 120' />
												</command>
											</flowline>
											<flowline >
												<command class_type='decision' title='Beslissing' exp='Potmeter &lt; 75' swap='0' >
													<flowline >
														<command class_type='calculation' title='Berekening' >
															<exp exp='Period = 119' />
															<exp exp='' />
														</command>
													</flowline>
													<flowline >
														<command class_type='decision' title='Beslissing' exp='Potmeter &lt; 100' swap='0' >
															<flowline >
																<command class_type='calculation' title='Berekening' >
																	<exp exp='Period = 118' />
																</command>
															</flowline>
															<flowline >
																<command class_type='decision' title='Beslissing' exp='Potmeter &lt; 125' swap='0' >
																	<flowline >
																		<command class_type='calculation' title='Berekening' >
																			<exp exp='Period = 117' />
																		</command>
																	</flowline>
																	<flowline >
																		<command class_type='decision' title='Beslissing' exp='Potmeter &lt; 160' swap='0' >
																			<flowline >
																				<command class_type='calculation' title='Berekening' >
																					<exp exp='Period = 116' />
																				</command>
																			</flowline>
																			<flowline >
																				<command class_type='decision' title='Beslissing' exp='Potmeter &lt; 175' swap='0' >
																					<flowline >
																						<command class_type='calculation' title='Berekening' >
																							<exp exp='Period = 115' />
																							<exp exp='' />
																						</command>
																					</flowline>
																					<flowline >
																						<command class_type='decision' title='Beslissing' exp='Potmeter &lt; 200' swap='0' >
																							<flowline >
																								<command class_type='calculation' title='Berekening' >
																									<exp exp='Period = 114' />
																								</command>
																							</flowline>
																							<flowline >
																								<command class_type='decision' title='Beslissing' exp='Potmeter &lt; 225' swap='0' >
																									<flowline >
																										<command class_type='calculation' title='Berekening' >
																											<exp exp='Period = 113' />
																										</command>
																									</flowline>
																									<flowline >
																										<command class_type='decision' title='Beslissing' exp='Potmeter &lt; 240' swap='0' >
																											<flowline >
																												<command class_type='calculation' title='Berekening' >
																													<exp exp='Period = 112' />
																												</command>
																											</flowline>
																											<flowline >
																												<command class_type='decision' title='Beslissing' exp='Potmeter &lt;= 255' swap='0' >
																													<flowline >
																														<command class_type='calculation' title='Berekening' >
																															<exp exp='Period = 111' />
																														</command>
																													</flowline>
																													<flowline />
																												</command>
																											</flowline>
																										</command>
																									</flowline>
																								</command>
																							</flowline>
																						</command>
																					</flowline>
																				</command>
																			</flowline>
																		</command>
																	</flowline>
																</command>
															</flowline>
														</command>
													</flowline>
												</command>
											</flowline>
										</command>
									</flowline>
								</command>
								<command class_type='decision' title='Beslissing' exp='Teller &lt;&gt; Period' swap='0' >
									<flowline >
										<command class_type='comment' title='' comment='PWM will only be adapted when potmeter is turned' textarea='12,0,12,0' />
										<command class_type='call' title='Component Macro Aanroepen' component='PWM1' macro='Disable' />
										<command class_type='call' title='Component Macro Aanroepen' break='1' component='PWM1' macro='ChangePeriod' >
											<argument exp='Period' />
											<argument exp='4' />
										</command>
										<command class_type='call' title='Component Macro Aanroepen' component='PWM1' macro='Enable' />
										<command class_type='call' title='Component Macro Aanroepen' component='PWM1' macro='SetDutyCycle' >
											<argument exp='61' />
										</command>
										<command class_type='delay' title='Vertraging' exp='50' type='1' />
										<command class_type='calculation' title='Berekening' >
											<exp exp='Teller = Period' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='switch' title='Schakel' textarea='36,25,36,25' exp='Period' >
									<case >
										<flowline />
									</case>
									<case exp='111' >
										<flowline >
											<command class_type='calculation' title='Berekening' >
												<exp exp='Frequency = 17857' />
											</command>
										</flowline>
									</case>
									<case exp='112' >
										<flowline >
											<command class_type='calculation' title='Berekening' >
												<exp exp='Frequency = 17699' />
											</command>
										</flowline>
									</case>
									<case exp='113' >
										<flowline >
											<command class_type='calculation' title='Berekening' >
												<exp exp='Frequency = 17544' />
											</command>
										</flowline>
									</case>
									<case exp='114' >
										<flowline >
											<command class_type='calculation' title='Berekening' >
												<exp exp='Frequency = 17391' />
											</command>
										</flowline>
									</case>
									<case exp='115' >
										<flowline >
											<command class_type='calculation' title='Berekening' >
												<exp exp='Frequency = 17241' />
											</command>
										</flowline>
									</case>
									<case exp='116' >
										<flowline >
											<command class_type='calculation' title='Berekening' >
												<exp exp='Frequency = 17094' />
											</command>
										</flowline>
									</case>
									<case exp='117' >
										<flowline >
											<command class_type='calculation' title='Berekening' >
												<exp exp='Frequency = 16949' />
											</command>
										</flowline>
									</case>
									<case exp='118' >
										<flowline >
											<command class_type='calculation' title='Berekening' >
												<exp exp='Frequency = 16806' />
											</command>
										</flowline>
									</case>
									<case exp='119' >
										<flowline >
											<command class_type='calculation' title='Berekening' >
												<exp exp='Frequency = 16667' />
											</command>
										</flowline>
									</case>
									<case exp='120' >
										<flowline >
											<command class_type='calculation' title='Berekening' >
												<exp exp='Frequency = 16529' />
											</command>
										</flowline>
									</case>
								</command>
								<command class_type='decision' title='Beslissing' exp='Period = 121' swap='0' >
									<flowline >
										<command class_type='calculation' title='Berekening' >
											<exp exp='Frequency = 16393' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='call' title='Component Macro Aanroepen' component='lcd_eb005' macro='Cursor' >
									<argument exp='0' />
									<argument exp='0' />
								</command>
								<command class_type='call' title='Component Macro Aanroepen' component='lcd_eb005' macro='PrintString' >
									<argument exp='&quot;Frequentie &quot;' />
								</command>
								<command class_type='call' title='Component Macro Aanroepen' component='lcd_eb005' macro='PrintNumber' >
									<argument exp='Frequency' />
								</command>
								<command class_type='call' title='Component Macro Aanroepen' component='lcd_eb005' macro='Cursor' >
									<argument exp='0' />
									<argument exp='1' />
								</command>
								<command class_type='call' title='Component Macro Aanroepen' component='lcd_eb005' macro='PrintString' >
									<argument exp='&quot;Potmeter &quot;' />
								</command>
								<command class_type='call' title='Component Macro Aanroepen' component='lcd_eb005' macro='PrintNumber' >
									<argument exp='Potmeter' />
								</command>
								<command class_type='call' title='Component Macro Aanroepen' component='lcd_eb005' macro='PrintString' >
									<argument exp='&quot;      &quot;' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='1a8c2bb7-8bed-4a1c-9186-ba24688c8840' vmin='3' vmaj='1' codename='slider_plastic1' x='-64.95' y='16' z='0' xsz='12.502' ysz='112.5' zsz='10' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='tang_col' data='2960685' />
					<value target='mark_col' data='255' />
					<value target='ScopeTraces' data='0' />
					<value target='channel' data='0' />
					<value target='vrefvol' data='500' />
					<value target='vrefop' data='000' />
					<value target='convspd' data='006' />
					<value target='actime' data='40' />
					<value target='bits' data='10' />
					<value target='bitmul' data='0.004883' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='444fb704-814c-4707-a15c-759ba088505c' vmin='6' vmaj='1' codename='PWM1' x='20' y='20' z='1.70617' xsz='2.93333' ysz='2.93333' zsz='2.93333' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='1' >
				<resources />
				<properties />
				<values >
					<value target='channel' data='002' />
					<value target='altpin' data='0' />
					<value target='pwm_pin' data='$PORTC.1' />
					<value target='RemapPin' data='' />
					<value target='timer' data='002' />
					<value target='period' data='118' />
					<value target='prescale' data='2' />
					<value target='period_calc' data='59.499996' />
					<value target='frequency_calc' data='16.806723' />
					<value target='pwm_prescale' data='4' />
					<value target='SimRep' data='001' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='d29dda88-17de-4008-991a-c881890d4c57' vmin='1' vmaj='1' codename='lcd_eb005' x='16' y='-73.85' z='0' xsz='2.2' ysz='1.5427' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Pin_Data_0' data='$PORTB.4' />
					<value target='Pin_Data_1' data='$PORTB.5' />
					<value target='Pin_Data_2' data='$PORTB.6' />
					<value target='Pin_Data_3' data='$PORTB.7' />
					<value target='Pin_RS' data='$PORTB.2' />
					<value target='Pin_E' data='$PORTB.3' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='7fdaec78-394e-4ec9-a578-4f1a12a12076' vmin='1' vmaj='1' codename='led_5mm_clip1' x='-96' y='32' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTC.2' />
					<value target='polarity' data='001' />
					<value target='on_color' data='8453975' />
					<value target='show_label' data='002' />
					<value target='label_property' data='pin' />
					<value target='label_color' data='16777215' />
					<value target='label_scale' data='1.000000' />
					<value target='label_auto_scale' data='0' />
					<value target='label_position' data='003' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='7fdaec78-394e-4ec9-a578-4f1a12a12076' vmin='1' vmaj='1' codename='led_5mm_clip2' x='-96' y='48' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTC.1' />
					<value target='polarity' data='001' />
					<value target='on_color' data='8453975' />
					<value target='show_label' data='002' />
					<value target='label_property' data='pin' />
					<value target='label_color' data='16777215' />
					<value target='label_scale' data='1.000000' />
					<value target='label_auto_scale' data='0' />
					<value target='label_position' data='003' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='7fdaec78-394e-4ec9-a578-4f1a12a12076' vmin='1' vmaj='1' codename='led_5mm_clip3' x='-96' y='64' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTC.0' />
					<value target='polarity' data='001' />
					<value target='on_color' data='8453975' />
					<value target='show_label' data='002' />
					<value target='label_property' data='pin' />
					<value target='label_color' data='16777215' />
					<value target='label_scale' data='1.000000' />
					<value target='label_auto_scale' data='0' />
					<value target='label_position' data='003' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAXwcAALEDAAA' zoom='75' scrollx='0' scrolly='3377' flags='0' />
	</layout>
</document>
</root>
