<root>
<document schema='101' license='1,iaingillies,UG1TPV' title='' description='' target='PIC.16F.16F1939' >
	<config data='!0,9e2!10,1633%0,2%3,0%5,1%6,1%7,1%8,1%9,0%b,1%c,0%d,0%10,3%14,3%18,0%19,1%1a,1%1c,1%1d,0' clkspd='19660800' simspd='1' usewdt='0' constif='0' />
	<plugins >
		<dll_dbg_icd enabled='0' >
			<data name='debug' value='1' />
			<data name='userpins' value='0' />
			<data name='speed' value='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 />
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='b353d399-3cbf-4383-8fb2-006b0555d039' 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='Count' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Switch' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Dir' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Interrupt_Routine' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='Switch = 1' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='comment' title='' comment='Enable four PWM channels
Enable INT0' textarea='12,0,12,0' />
						<command class_type='call' title='Call Component Macro' component='PWM1' macro='Enable' />
						<command class_type='call' title='Call Component Macro' component='PWM2' macro='Enable' />
						<command class_type='call' title='Call Component Macro' component='PWM3' macro='Enable' />
						<command class_type='call' title='Call Component Macro' component='PWM4' macro='Enable' />
						<command class_type='comment' title='' comment='Perform Interrupt Routine when button is pressed' textarea='12,0,12,0' />
						<command class_type='interrupt' title='Interrupt' enable='1' name='INT0' call='Interrupt_Routine' >
							<settings timer='0' prescale='-1' postscale='-1' rollover='-1' bitcount='-1' trigger='1' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='0' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
							</settings>
						</command>
						<command class_type='comment' title='' comment='Main Loop
Ramps all four PWM channels up to maximum then down to zero before repeating.
Pressing Button halts the ramp, outputs zero, waits five
seconds then resumes where it left off.' textarea='12,0,12,0' />
						<command class_type='loop' title='Loop' type='0' exp='1' >
							<flowline >
								<command class_type='switch' title='Switch' textarea='36,25,36,25' exp='Switch' >
									<case >
										<flowline >
											<command class_type='call' title='Call Component Macro' component='PWM1' macro='SetDutyCycle' >
												<argument exp='Count' />
											</command>
											<command class_type='call' title='Call Component Macro' component='PWM2' macro='SetDutyCycle' >
												<argument exp='Count' />
											</command>
											<command class_type='call' title='Call Component Macro' component='PWM3' macro='SetDutyCycle' >
												<argument exp='Count' />
											</command>
											<command class_type='call' title='Call Component Macro' component='PWM4' macro='SetDutyCycle' >
												<argument exp='Count' />
											</command>
											<command class_type='decision' title='Decision' exp='Dir = 1' swap='0' >
												<flowline >
													<command class_type='comment' title='' comment='Ramp Down' textarea='12,0,12,0' />
													<command class_type='calculation' title='Calculation' >
														<exp exp='Count = count - 5' />
													</command>
												</flowline>
												<flowline >
													<command class_type='comment' title='' comment='Ramp Up' textarea='12,0,12,0' />
													<command class_type='calculation' title='Calculation' >
														<exp exp='Count = count + 5' />
													</command>
												</flowline>
											</command>
											<command class_type='comment' title='' comment='Change direction when Maximum output is reached' textarea='12,0,12,0' />
											<command class_type='decision' title='Decision' exp='Count = 255' swap='0' >
												<flowline >
													<command class_type='calculation' title='Calculation' >
														<exp exp='Dir = 1' />
													</command>
												</flowline>
												<flowline />
											</command>
											<command class_type='comment' title='' comment='Change direction when Minimum output is reached' textarea='12,0,12,0' />
											<command class_type='decision' title='Decision' exp='Count = 0' swap='0' >
												<flowline >
													<command class_type='calculation' title='Calculation' >
														<exp exp='Dir = 0' />
													</command>
												</flowline>
												<flowline />
											</command>
										</flowline>
									</case>
									<case exp='1' >
										<flowline >
											<command class_type='call' title='Call Component Macro' component='PWM1' macro='SetDutyCycle' >
												<argument exp='0' />
											</command>
											<command class_type='call' title='Call Component Macro' component='PWM2' macro='SetDutyCycle' >
												<argument exp='0' />
											</command>
											<command class_type='call' title='Call Component Macro' component='PWM3' macro='SetDutyCycle' >
												<argument exp='0' />
											</command>
											<command class_type='call' title='Call Component Macro' component='PWM4' macro='SetDutyCycle' >
												<argument exp='0' />
											</command>
											<command class_type='delay' title='Delay' exp='5' type='2' />
											<command class_type='calculation' title='Calculation' >
												<exp exp='Switch = 0' />
											</command>
										</flowline>
									</case>
								</command>
								<command class_type='delay' title='Delay' exp='250' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='444fb704-814c-4707-a15c-759ba088505c' vmin='6' vmaj='1' codename='PWM1' x='-80' y='64' z='0.8825' 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='1' poslock='1' >
				<resources />
				<properties />
				<values >
					<value target='channel' data='001' />
					<value target='altpin' data='0' />
					<value target='pwm_pin' data='$PORTC.2' />
					<value target='RemapPin' data='' />
					<value target='timer' data='002' />
					<value target='period' data='255' />
					<value target='prescale' data='0' />
					<value target='period_calc' data='52.083332' />
					<value target='frequency_calc' data='19.200001' />
					<value target='pwm_prescale' data='1' />
					<value target='SimRep' data='001' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='444fb704-814c-4707-a15c-759ba088505c' vmin='6' vmaj='1' codename='PWM2' x='-80' y='32' z='2.1325' 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='1' 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='2' />
					<value target='period' data='255' />
					<value target='prescale' data='000' />
					<value target='period_calc' data='52.083332' />
					<value target='frequency_calc' data='19.200001' />
					<value target='pwm_prescale' data='1' />
					<value target='SimRep' data='001' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='444fb704-814c-4707-a15c-759ba088505c' vmin='6' vmaj='1' codename='PWM3' x='-80' y='0' z='2.8725' 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='1' poslock='1' >
				<resources />
				<properties />
				<values >
					<value target='channel' data='003' />
					<value target='altpin' data='0' />
					<value target='pwm_pin' data='$PORTE.0' />
					<value target='RemapPin' data='' />
					<value target='timer' data='2' />
					<value target='period' data='255' />
					<value target='prescale' data='000' />
					<value target='period_calc' data='52.083332' />
					<value target='frequency_calc' data='19.200001' />
					<value target='pwm_prescale' data='1' />
					<value target='SimRep' data='001' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='444fb704-814c-4707-a15c-759ba088505c' vmin='6' vmaj='1' codename='PWM4' x='-80' y='-32' z='0.8825' 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='1' poslock='1' >
				<resources />
				<properties />
				<values >
					<value target='channel' data='004' />
					<value target='altpin' data='0' />
					<value target='pwm_pin' data='$PORTD.1' />
					<value target='RemapPin' data='' />
					<value target='timer' data='2' />
					<value target='period' data='255' />
					<value target='prescale' data='000' />
					<value target='period_calc' data='52.083332' />
					<value target='frequency_calc' data='19.200001' />
					<value target='pwm_prescale' data='1' />
					<value target='SimRep' data='001' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='5c1da48f-ce54-4622-bdd9-fc812e373696' vmin='0' vmaj='1' codename='sw_push_rnd_pnl1' x='-24' y='64' z='-6.175' 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='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTB.0' />
					<value target='polarity' data='000' />
					<value target='debounce' data='10' />
					<value target='operation' data='000' />
				</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---------------------wAAAAAUAAAA4QMAAIgBAAA' zoom='75' scrollx='0' scrolly='785' flags='0' />
		<view type='0' name='Interrupt_Routine' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAA4QMAAIgBAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
