<root>
<document schema='101' license='1,Dev User,VAJXZ1' title='' description='' target='PIC.16F.16F877A' >
	<config data='!0,3f72%0,2%2,0%3,0%6,1%7,0%9,3%b,1%8,1%d,1' 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='1000' />
			<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='1' />
			<data name='ictrate' value='1000' />
			<data name='ictmask' value='-1' />
			<data name='anlpres' value='19' />
			<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='2dabcb43-7212-4bba-b81a-20437a8072e3' 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='s16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Counter' type='s16' 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='CountError' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='LCD_Write' type='u16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='changed' 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='Main' description='Example program showing how to use a quadrature encoder component.' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='16744448' cmdcolor_sec='16760919' component='LCD' macro='Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='16744448' cmdcolor_sec='16760919' component='quadenc' macro='Enable' />
						<command class_type='interrupt' title='Interrupt' cmdcolor='8415488' cmdcolor_sec='14994788' enable='1' name='TMR0' call='TimerInterrupt' >
							<settings timer='1' prescale='1' postscale='-1' rollover='-1' bitcount='-1' trigger='3' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='1' />
								<option value='0' />
								<option value='0' />
								<option value='-1' />
							</settings>
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12582912' cmdcolor_sec='14994788' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='16744448' cmdcolor_sec='16760919' component='LCD' macro='Clear' />
								<command class_type='decision' title='Check for any errors' cmdcolor='32896' cmdcolor_sec='6612196' exp='CountError &gt; 0' swap='0' >
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='16744448' cmdcolor_sec='16760919' component='LCD' macro='PrintString' >
											<argument exp='&quot;Count Error&quot;' />
										</command>
										<command class_type='comment' title='' comment='Count error - we missed a transition.
Timer interrupt is running too slowly for rate the encoder changes.' textarea='12,0,12,0' cmdcolor='16760919' cmdcolor_sec='16777147' />
									</flowline>
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='16744448' cmdcolor_sec='16760919' component='quadenc' macro='ReadCounter' >
											<return exp='Count' />
										</command>
										<command class_type='call' title='Call Component Macro' cmdcolor='16744448' cmdcolor_sec='16760919' component='LCD' macro='PrintNumber' >
											<argument exp='Count' />
										</command>
									</flowline>
								</command>
								<command class_type='delay' title='Delay' cmdcolor='8415488' cmdcolor_sec='14994788' exp='200' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='TimerInterrupt' description='Called to service the timer interrupt' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='change' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='16744448' cmdcolor_sec='16760919' component='quadenc' macro='CheckForChanges' >
							<return exp='.change' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='32896' cmdcolor_sec='6612196' exp='.change = 255' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='8415488' cmdcolor_sec='14994788' >
									<exp exp='CountError = 1' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='3531a68d-7686-44b7-a3a5-67afda8467dc' vmin='3' vmaj='1' codename='quadenc' x='1.77715' y='0' z='0' xsz='32' ysz='32' zsz='17.3333' 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_a' data='$PORTD.4' />
					<value target='pin_b' data='$PORTD.5' />
					<value target='reprate' data='075' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='0953aac0-9c23-4c2f-9843-88954a4191ea' vmin='3' vmaj='2' codename='LCD' x='1.50375' y='30.3483' z='0' xsz='80' ysz='8' zsz='1.00668' 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='LCD_Mode' data='000' />
					<value target='Pin_Data_0' data='$PORTB.0' />
					<value target='Pin_Data_1' data='$PORTB.1' />
					<value target='Pin_Data_2' data='$PORTB.2' />
					<value target='Pin_Data_3' data='$PORTB.3' />
					<value target='Pin_Data_4' data='$PORTA.1' />
					<value target='Pin_Data_5' data='$PORTA.1' />
					<value target='Pin_Data_6' data='$PORTA.1' />
					<value target='Pin_Data_7' data='$PORTA.1' />
					<value target='LCD_Port' data='$PORTA' />
					<value target='Pin_RS' data='$PORTB.4' />
					<value target='Pin_E' data='$PORTB.5' />
					<value target='LCD_Use_Write' data='0' />
					<value target='Pin_RW' data='$PORTA.0' />
					<value target='Rows' data='2' />
					<value target='Columns' data='16' />
					<value target='BackgroundColor' data='24832' />
					<value target='LineColor' data='0' />
					<value target='TextColor' data='0' />
					<value target='Font' data='Fixedsys' />
					<value target='CursorPosX' data='1' />
					<value target='CursorPosY' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='0' brightness='0' perspective='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='0' brightness='0' perspective='0' >
		<background rgb='12582912' img='..\icons\solar\space.gif' style='0' />
		<table rgb='49280' img='' style='0' size='0' />
		<camera xe='0' ye='0' ze='141.437' 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---------------------wUAAAAYAAAA8gQAAH4DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='TimerInterrupt' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA8gQAAH4DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
