<root>
<document schema='101' license='1,Martin Whitlock,JQE1YE' 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='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='' 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='Ypos' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Count' type='u8' description='' isconst='0' isinit='1' usrinit='75' setinit='75' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='KeyPressed' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Letter' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Enable' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='TimerTick' type='s16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='XPos' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='HiddenCount' type='s16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='KeyStored' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Loop' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Hidden' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Update' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Timer' description='' >
						<command class_type='decision' title='Decision' exp='Enable' swap='0' >
							<flowline >
								<command class_type='decision' title='Decision' exp='HiddenCount &lt; 8000' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' >
											<exp exp='HiddenCount = HiddenCount + 1' />
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title='Calculation' >
											<exp exp='HiddenCount = 0' />
											<exp exp='Hidden = !Hidden' />
										</command>
									</flowline>
								</command>
								<command class_type='calculation' title='Calculation' >
									<exp exp='TimerTick = TimerTick + 1' />
									<exp exp='' />
								</command>
								<command class_type='decision' title='Decision' exp='TimerTick &lt; 30000' swap='0' >
									<flowline />
									<flowline >
										<command class_type='calculation' title='Calculation' >
											<exp exp='Enable = 0' />
											<exp exp='TimerTick = 0' />
											<exp exp='Update = 1' />
											<exp exp='Hidden = 0' />
											<exp exp='Loop = 0' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<command class_type='delay' title='Delay' exp='50' type='1' />
						<command class_type='call' title='' textarea='36,0,511,300' component='v5__lcddisplay0' macro='Start' />
						<command class_type='interrupt' title='Interrupt' enable='1' name='TMR0' call='Timer' >
							<settings timer='1' prescale='256' postscale='-1' rollover='-1' bitcount='-1' trigger='3' 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='8' />
								<option value='-1' />
							</settings>
						</command>
						<command class_type='loop' title='Loop' textarea='36,0,511,300' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='See which key has been pressed' textarea='36,0,511,300' component='v5__keypad0' macro='GetAscii' >
									<return exp='KeyPressed' />
								</command>
								<command class_type='decision' title='Decision' exp='KeyPressed &lt;&gt; 255' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' >
											<exp exp='KeyStored = KeyPressed' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='call' title='Call Component Macro' component='v5__lcddisplay0' macro='Cursor' >
									<argument exp='XPos' />
									<argument exp='Ypos' />
								</command>
								<command class_type='decision' title='Decision' exp='Hidden' swap='0' >
									<flowline >
										<command class_type='call' title='Show key (in ascii)' textarea='73,37,548,337' component='v5__lcddisplay0' macro='PrintString' >
											<argument exp='&quot; &quot;' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Show key (in ascii)' textarea='36,0,511,300' component='v5__lcddisplay0' macro='PrintASCII' >
											<argument exp='Letter' />
										</command>
									</flowline>
								</command>
								<command class_type='decision' title='Any key at all' exp='(KeyPressed &lt;&gt; 255) || (KeyPressed &lt; 58)' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' >
											<exp exp='Enable = 1' />
											<exp exp='TimerTick = 0' />
										</command>
										<command class_type='decision' title='Decision' exp='(KeyPressed = 35) &amp;&amp; (XPos &lt; 16)' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' >
													<exp exp='Letter = 32' />
													<exp exp='TimerTick = 90' />
												</command>
												<command class_type='decision' title='Decision' exp='XPos = 15' swap='0' >
													<flowline >
														<command class_type='call' title='Call Component Macro' component='v5__lcddisplay0' macro='Cursor' >
															<argument exp='0' />
															<argument exp='1' />
														</command>
														<command class_type='call' title='Call Component Macro' component='v5__lcddisplay0' macro='PrintString' >
															<argument exp='&quot;_&quot;' />
														</command>
														<command class_type='delay' title='Delay' exp='200' type='1' />
														<command class_type='call' title='Call Component Macro' component='v5__lcddisplay0' macro='Cursor' >
															<argument exp='XPos+1' />
															<argument exp='Ypos' />
														</command>
													</flowline>
													<flowline >
														<command class_type='call' title='Call Component Macro' component='v5__lcddisplay0' macro='Cursor' >
															<argument exp='XPos+1' />
															<argument exp='Ypos' />
														</command>
														<command class_type='call' title='Call Component Macro' component='v5__lcddisplay0' macro='PrintString' >
															<argument exp='&quot;_&quot;' />
														</command>
														<command class_type='delay' title='Delay' exp='200' type='1' />
														<command class_type='call' title='Call Component Macro' component='v5__lcddisplay0' macro='Cursor' >
															<argument exp='XPos+1' />
															<argument exp='Ypos' />
														</command>
													</flowline>
												</command>
												<command class_type='call' title='Call Component Macro' component='v5__lcddisplay0' macro='PrintString' >
													<argument exp='&quot; &quot;' />
												</command>
											</flowline>
											<flowline >
												<command class_type='decision' title='Decision' exp='(KeyPressed = 42)' swap='0' >
													<flowline >
														<command class_type='decision' title='Decision' exp='(XPos &gt; 0) || (Ypos &gt; 0)' swap='0' >
															<flowline >
																<command class_type='decision' title='Decision' exp='(XPos &gt; 0)' swap='0' >
																	<flowline >
																		<command class_type='calculation' title='Calculation' >
																			<exp exp='XPos = XPos - 1' />
																		</command>
																	</flowline>
																	<flowline >
																		<command class_type='decision' title='Decision' exp='Ypos &gt; 1' swap='0' >
																			<flowline />
																			<flowline >
																				<command class_type='calculation' title='Calculation' >
																					<exp exp='Ypos = Ypos - 1' />
																					<exp exp='XPos = 15' />
																				</command>
																			</flowline>
																		</command>
																	</flowline>
																</command>
																<command class_type='calculation' title='Calculation' >
																	<exp exp='Letter = 32' />
																</command>
															</flowline>
															<flowline />
														</command>
														<command class_type='calculation' title='Calculation' >
															<exp exp='TimerTick = 90' />
														</command>
													</flowline>
													<flowline >
														<command class_type='decision' title='Decision' exp='KeyPressed &lt;&gt; KeyStored' swap='0' >
															<flowline >
																<command class_type='calculation' title='Calculation' >
																	<exp exp='KeyStored = KeyPressed' />
																</command>
																<command class_type='calculation' title='Calculation' >
																	<exp exp='Count = 0' />
																</command>
															</flowline>
															<flowline />
														</command>
														<command class_type='decision' title='Decision' exp='Count &lt; 4' swap='0' >
															<flowline >
																<command class_type='calculation' title='Calculation' >
																	<exp exp='Count = Count + 1' />
																</command>
															</flowline>
															<flowline >
																<command class_type='calculation' title='Calculation' >
																	<exp exp='Count = 1' />
																</command>
															</flowline>
														</command>
														<command class_type='decision' title='Decision' exp='(Count &lt; 4) &amp;&amp; (KeyPressed &lt;&gt; 48)' swap='0' >
															<flowline >
																<command class_type='calculation' title='Calculation' >
																	<exp exp='Letter = (KeyPressed - 49) * 2 + KeyPressed + 15 + Count' />
																</command>
															</flowline>
															<flowline >
																<command class_type='calculation' title='Calculation' >
																	<exp exp='Letter = KeyPressed' />
																</command>
															</flowline>
														</command>
														<command class_type='decision' title='Decision' exp='Letter &gt; 90' swap='0' >
															<flowline >
																<command class_type='calculation' title='Calculation' >
																	<exp exp='Letter = 90' />
																</command>
															</flowline>
															<flowline />
														</command>
													</flowline>
												</command>
											</flowline>
										</command>
										<command class_type='loop' title='Wait for key to be released' textarea='36,0,511,300' type='0' exp='KeyPressed &lt;&gt; 255' >
											<flowline >
												<command class_type='delay' title='Delay' exp='5' type='1' />
												<command class_type='call' title='' textarea='36,0,511,300' component='v5__keypad0' macro='GetAscii' >
													<return exp='KeyPressed' />
												</command>
											</flowline>
										</command>
									</flowline>
									<flowline >
										<command class_type='decision' title='Decision' exp='(Update) &amp;&amp; (Hidden = 0) &amp;&amp; (Loop = 1)' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' >
													<exp exp='Update = 0' />
													<exp exp='Hidden = 1' />
													<exp exp='Count = 0' />
												</command>
												<command class_type='decision' title='Decision' exp='KeyStored = 42' swap='0' >
													<flowline />
													<flowline >
														<command class_type='decision' title='Decision' exp='XPos &lt; 15' swap='0' >
															<flowline >
																<command class_type='calculation' title='Calculation' >
																	<exp exp='XPos = XPos + 1' />
																</command>
															</flowline>
															<flowline >
																<command class_type='calculation' title='Calculation' >
																	<exp exp='XPos = 0' />
																	<exp exp='Ypos = 1' />
																</command>
															</flowline>
														</command>
													</flowline>
												</command>
											</flowline>
											<flowline >
												<command class_type='decision' title='Decision' exp='Update' swap='0' >
													<flowline >
														<command class_type='calculation' title='Calculation' >
															<exp exp='Loop = Loop + 1' />
														</command>
													</flowline>
													<flowline />
												</command>
											</flowline>
										</command>
									</flowline>
								</command>
								<command class_type='delay' title='Delay' exp='100' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='0953aac0-9c23-4c2f-9843-88954a4191ea' vmin='2' vmaj='2' codename='v5__lcddisplay0' x='2.28571' y='-10.2857' z='0' xsz='78.2857' ysz='13.1429' zsz='1.14286' 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='$PORTC0.0' />
					<value target='Pin_Data_1' data='$PORTC0.1' />
					<value target='Pin_Data_2' data='$PORTC0.2' />
					<value target='Pin_Data_3' data='$PORTC0.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='$PORTC0.4' />
					<value target='Pin_E' data='$PORTC0.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='0x808080' />
					<value target='LineColor' data='0' />
					<value target='TextColor' data='0x000000' />
					<value target='Font' data='Fixedsys' />
					<value target='CursorPosX' data='3' />
					<value target='CursorPosY' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='b07090da-50a4-41ed-97d8-99016c092a14' vmin='0' vmaj='1' codename='v5__keypad0' x='64' y='32' z='0' xsz='1' ysz='1' zsz='1' xang='-18.5254' yang='0' zang='0' xquat='-0.160962' yquat='0' zquat='0' wquat='0.986961' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='port' data='5' />
					<value target='pin_col1' data='$PORTB0.0' />
					<value target='pin_col2' data='$PORTB0.1' />
					<value target='pin_col3' data='$PORTB0.2' />
					<value target='pin_row1' data='$PORTB0.4' />
					<value target='pin_row2' data='$PORTB0.5' />
					<value target='pin_row3' data='$PORTB0.6' />
					<value target='pin_row4' data='$PORTB0.7' />
				</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---------------------wAAAAAUAAAAGgUAAKQCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Timer' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAGgUAAKQCAAA' zoom='75' scrollx='0' scrolly='105' flags='0' />
	</layout>
</document>
</root>
