<root>
<document schema='101' license='50,Dev User,XDKHX7' title='' description='' target='PIC.18F.18F14K50' >
	<config data='!0,ff!8,ff!10,ff!18,ff!20,ff!28,ff!30,ff!38,ff!40,ff!48,ff!50,ff!58,ff!60,ff!68,ff%3,3%5,1%8,f%c,1%d,1%e,1%f,1%10,1%11,3%13,3%18,1%19,f%2b,1%2f,1%30,1%32,1%33,1%36,1%37,1%40,1%41,1%4e,1%4f,1%50,1%51,1%5d,1%5e,1%5f,1%60,1%61,1%6e,1' clkspd='48000000' 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='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='bcd6a955-12c6-4ed4-a22f-f16eb62e0762' vstate='40' vmin='1' vmaj='1' srcleaf='LCD I2C.fcfx' visiblename='LCD (I2C)' description='Standard alphanumeric LCD based on a standard I2C control bus.' category='' catenable='0' author='Matrix Ltd' manuname='' manucode='' sysinfo='1053547' keywords='' dynamic='1' expose='LCD' exposeid='0953aac0-9c23-4c2f-9843-88954a4191ea' iconpath='' />
		<component class_type='root' codename='lcd_I2C' 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 >
				<file name='LCD_EB005_Bezel.mesh' source='..\models\outputs\LCD\LCD_EB005_Bezel.mesh' />
				<file name='LCD_EB005_PCB.mesh' source='..\models\outputs\LCD\LCD_EB005_PCB.mesh' />
			</resources>
			<properties >
				<property name='Connections' hidden='0' >
					<property name='Channel' target='Channel' typeid='16' hidden='0' locked='0' info='' filter='000Software
001Channel 1
' />
					<property name='I2C Data (SDA)' target='SDA' typeid='5' hidden='0' locked='0' info='' />
					<property name='I2C Clock (SCL)' target='SCL' typeid='5' hidden='0' locked='0' info='' />
				</property>
				<property name='I2C Config' folder='property_1' hidden='0' >
					<property name='LCD Address' target='Address' typeid='21' hidden='0' locked='0' info='' />
				</property>
				<property name='LCD Configuration' folder='property_2' hidden='0' >
					<property name='Rows' target='Rows' typeid='16' hidden='0' locked='0' info='' filter='0011
0022
0033
0044' />
					<property name='Columns' target='Columns' typeid='16' hidden='0' locked='0' info='' filter='0055
0088
01010
01212
01616
01818
02020
02828
04040' />
				</property>
			</properties>
			<values >
				<value target='Channel' data='000' />
				<value target='SDA' data='$PORTC.4' />
				<value target='SCL' data='$PORTC.3' />
				<value target='Address' data='32' />
				<value target='Rows' data='004' />
				<value target='Columns' data='020' />
			</values>
			<events >
				<event class='Components' event='Initialise' target='Ev_Property' />
				<event class='Components' event='Property' target='Ev_Property' />
			</events>
			<apis >
				<api name='Clear' alt='ClearSim' type='1' proto='1' />
				<api name='PrintString' alt='PrintStringSim' type='1' proto='1' />
				<api name='PrintAscii' alt='PrintAsciiSim' type='1' proto='1' />
				<api name='PrintNumber' alt='PrintNumberSim' type='1' proto='1' />
				<api name='RAMWrite' alt='RAMWrite' type='1' proto='1' />
				<api name='BacklightControl' alt='BacklightControlSim' type='1' proto='1' />
				<api name='ClearLine' alt='ClearLineSim' type='1' proto='1' />
				<api name='Cursor' alt='CursorSim' type='1' proto='1' />
				<api name='Command' alt='Command' type='1' proto='1' />
				<api name='ScrollDisplay' alt='ScrollDisplay' type='1' proto='1' />
				<api name='Start' alt='StartSim' type='1' proto='1' />
			</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='I2C_Address' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</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='Clear' description='' >
						<command class_type='call' title='Call Macro' macro='RawSend' >
							<argument exp='0x01' />
							<argument exp='0' />
						</command>
						<command class_type='delay' title='Delay' exp='2' type='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='ClearSim' description='' >
						<command class_type='call' title='Call Component Macro' component='LCD' macro='Clear' />
					</flowline>
				</macro>
				<macro >
					<flowline name='PrintString' description='' >
						<param name='Text' type='T8*' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<local name='Idx' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
						<local name='Count' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='.count = Length$ (.Text)' />
						</command>
						<command class_type='loop' title='Loop' textarea='36,0,511,300' type='0' exp='.Idx &lt; .count' >
							<flowline >
								<command class_type='call' title='Call Macro' macro='RawSend' >
									<argument exp='.Text[.Idx]' />
									<argument exp='0x10' />
								</command>
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
									<exp exp='.Idx = .Idx + 1' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='PrintAscii' description='Takes the ascii value for a character and prints the character' >
						<param name='character' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='RawSend' >
							<argument exp='.character' />
							<argument exp='0x10' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='PrintNumber' description='Allows you to print a number. This is limited to a signed-INT, -32768 to 32767' >
						<param name='Number' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='s' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='10' />
						</local>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
							<exp exp='.s = ToString$ (.Number)' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='PrintString' >
							<argument exp='.s' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='RAMWrite' description='Modifies the internal memory of the LCD to allow for up to 8 customised characters to be created and stored in the device memory' >
						<param name='Index' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='d0' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='d1' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='d2' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='d3' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='d4' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='d5' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='d6' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='d7' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='RawSend' >
							<argument exp='64 + (.Index &lt;&lt; 3)' />
							<argument exp='0' />
						</command>
						<command class_type='delay' title='Delay' textarea='36,0,511,300' exp='2' type='1' />
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='RawSend' >
							<argument exp='.d0' />
							<argument exp='0x10' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='RawSend' >
							<argument exp='.d1' />
							<argument exp='0x10' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='RawSend' >
							<argument exp='.d2' />
							<argument exp='0x10' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='RawSend' >
							<argument exp='.d3' />
							<argument exp='0x10' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='RawSend' >
							<argument exp='.d4' />
							<argument exp='0x10' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='RawSend' >
							<argument exp='.d5' />
							<argument exp='0x10' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='RawSend' >
							<argument exp='.d6' />
							<argument exp='0x10' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='RawSend' >
							<argument exp='.d7' />
							<argument exp='0x10' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='Clear' />
					</flowline>
				</macro>
				<macro >
					<flowline name='BacklightControl' description='' >
						<param name='State' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='Address &lt;&lt; 1' />
						</command>
						<command class_type='call' title='Call Component Macro' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='0' />
						</command>
						<command class_type='decision' title='Decision' exp='.State' swap='0' >
							<flowline >
								<command class_type='call' title='Call Component Macro' component='cal_i2c1' macro='Master_TxByte' >
									<argument exp='0x08' />
								</command>
							</flowline>
							<flowline >
								<command class_type='call' title='Call Component Macro' component='cal_i2c1' macro='Master_TxByte' >
									<argument exp='0' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Call Component Macro' component='cal_i2c1' macro='Master_Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='ClearLine' description='' >
						<param name='Line' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='x' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' exp='.line &lt; Rows' swap='0' >
							<flowline >
								<command class_type='call' title='Call Macro' macro='Cursor' >
									<argument exp='0' />
									<argument exp='.Line' />
								</command>
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
									<exp exp='.x = 0' />
								</command>
								<command class_type='loop' title='Loop' textarea='36,0,511,300' type='0' exp='.x &lt; Columns' >
									<flowline >
										<command class_type='call' title='0x10' textarea='36,0,511,300' macro='RawSend' >
											<argument exp='&apos; &apos;' />
											<argument exp='0x10' />
										</command>
										<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
											<exp exp='.x = .x + 1' />
										</command>
									</flowline>
								</command>
								<command class_type='call' title='Call Macro' macro='Cursor' >
									<argument exp='0' />
									<argument exp='.Line' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='BacklightControlSim' description='' >
						<param name='State' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' exp='.State' swap='0' >
							<flowline >
								<command class_type='sim' title='Simulation' macro='Component.Property.SetValue' >
									<argument exp='LCD' />
									<argument exp='&quot;BackgroundColor&quot;' />
									<argument exp='0x00C000' />
								</command>
							</flowline>
							<flowline >
								<command class_type='sim' title='Simulation' macro='Component.Property.SetValue' >
									<argument exp='LCD' />
									<argument exp='&quot;BackgroundColor&quot;' />
									<argument exp='0x006100' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Cursor' description='Moves the cursor on the LCD Display' >
						<param name='x' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='y' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='Rows == 1' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
									<exp exp='.y = 0x80' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='Rows == 2' swap='0' >
							<flowline >
								<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='.y == 0' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
											<exp exp='.y = 0x80' />
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
											<exp exp='.y = 0xC0' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='Rows == 4' swap='0' >
							<flowline >
								<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='.y == 0' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
											<exp exp='.y = 0x80' />
										</command>
									</flowline>
									<flowline >
										<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='.y == 1' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
													<exp exp='.y = 0xC0' />
												</command>
											</flowline>
											<flowline >
												<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='Columns == 16' swap='0' >
													<flowline >
														<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='.y == 2' swap='0' >
															<flowline >
																<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
																	<exp exp='.y = 0x90' />
																</command>
															</flowline>
															<flowline >
																<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
																	<exp exp='.y = 0xd0' />
																</command>
															</flowline>
														</command>
													</flowline>
													<flowline >
														<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='Columns == 20' swap='0' >
															<flowline >
																<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='.y == 2' swap='0' >
																	<flowline >
																		<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
																			<exp exp='.y = 0x94' />
																		</command>
																	</flowline>
																	<flowline >
																		<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
																			<exp exp='.y = 0xd4' />
																		</command>
																	</flowline>
																</command>
															</flowline>
															<flowline />
														</command>
													</flowline>
												</command>
											</flowline>
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='RawSend' >
							<argument exp='.y + .x' />
							<argument exp='0' />
						</command>
						<command class_type='delay' title='Delay' textarea='36,0,511,300' exp='2' type='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='StartSim' description='Startup routine required by the hardware device.' >
						<command class_type='call' title='Call Component Macro' component='LCD' macro='Start' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Command' description='Use this method/macro to send a specific command to the LCD. Refer to the Matrix Multimedia EB006 datasheet for a list of supported instructions. For Non-Matrix LCD&apos;s refer to the manufacturers datasheet.' >
						<param name='instruction' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='RawSend' >
							<argument exp='.instruction' />
							<argument exp='0' />
						</command>
						<command class_type='delay' title='Delay' textarea='36,0,511,300' exp='2' type='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='EnablePulse' description='' >
						<param name='data' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='hi' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='lo' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='tbyte' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='comment' title='' comment='Swaps upper and lower nibbles, so lower 4 are now cleared vs upper 4.' textarea='12,0,12,0' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='.hi = (.data &amp; 0x0F) &lt;&lt; 4' />
							<exp exp='.lo = (.data &amp; 0xF0) &gt;&gt; 4' />
							<exp exp='.tbyte = (.hi | .lo)' />
						</command>
						<command class_type='call' title='Call Component Macro' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='Address &lt;&lt; 1' />
						</command>
						<command class_type='call' title='Call Component Macro' ccode='// Call Component Macro
// Call Component Macro: cal_i2c1::Master_TxByte(.tbyte | 0x04)
FC_CAL_I2C_Master_TxByte_1(FCL_TBYTE | 0x04);
' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.tbyte| 0x0C' />
						</command>
						<command class_type='call' title='Call Component Macro' component='cal_i2c1' macro='Master_Stop' />
						<command class_type='delay' title='Delay' exp='100' type='0' />
						<command class_type='call' title='Call Component Macro' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='Address &lt;&lt; 1' />
						</command>
						<command class_type='call' title='Call Component Macro' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.tbyte | 0x08' />
						</command>
						<command class_type='call' title='Call Component Macro' component='cal_i2c1' macro='Master_Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='ScrollDisplay' description='Scrolls the display left or right by a number of given positions.' >
						<param name='position' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='direction' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='cmd' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
							<exp exp='.cmd = -1' />
						</command>
						<command class_type='switch' title='Switch' textarea='36,25,511,325' exp='.direction' >
							<case >
								<flowline />
							</case>
							<case exp='0' >
								<flowline >
									<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
										<exp exp='.cmd = 0x18' />
									</command>
								</flowline>
							</case>
							<case exp='&apos;l&apos;' >
								<flowline >
									<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
										<exp exp='.cmd = 0x18' />
									</command>
								</flowline>
							</case>
							<case exp='&apos;L&apos;' >
								<flowline >
									<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
										<exp exp='.cmd = 0x18' />
									</command>
								</flowline>
							</case>
							<case exp='1' >
								<flowline >
									<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
										<exp exp='.cmd = 0x1C' />
									</command>
								</flowline>
							</case>
							<case exp='&apos;r&apos;' >
								<flowline >
									<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
										<exp exp='.cmd = 0x1C' />
									</command>
								</flowline>
							</case>
							<case exp='&apos;R&apos;' >
								<flowline >
									<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
										<exp exp='.cmd = 0x1C' />
									</command>
								</flowline>
							</case>
						</command>
						<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='.cmd != -1 &amp; .Position != 0' swap='0' >
							<flowline >
								<command class_type='loop' title='Loop' textarea='36,0,511,300' type='0' exp='.Position != 0' >
									<flowline >
										<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='RawSend' >
											<argument exp='.cmd' />
											<argument exp='0' />
										</command>
										<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
											<exp exp='.Position = .Position - 1' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Ev_Property' description='Sent when a property has been changed by the User' >
						<return name='Return' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='temp_str' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<command class_type='sim' title='Simulation' component='cal_i2c1' macro='GetList' >
							<return exp='.temp_str' />
							<argument exp='&quot;CHANNEL&quot;' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.SetFilter' >
							<argument exp='this' />
							<argument exp='&quot;Channel&quot;' />
							<argument exp='.temp_str' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.GetValue' >
							<return exp='.temp_str' />
							<argument exp='this' />
							<argument exp='&quot;Channel&quot;' />
						</command>
						<command class_type='sim' title='Simulation' component='cal_i2c1' macro='SetValue' >
							<argument exp='&quot;CHANNEL&quot;' />
							<argument exp='.temp_str' />
						</command>
						<command class_type='decision' title='Decision' exp='Channel = 0' swap='0' >
							<flowline >
								<command class_type='sim' title='Simulation' macro='Component.Property.SetWritable' >
									<argument exp='this' />
									<argument exp='&quot;SDA&quot;' />
									<argument exp='1' />
								</command>
								<command class_type='sim' title='Simulation' macro='Component.Property.SetWritable' >
									<argument exp='this' />
									<argument exp='&quot;SCL&quot;' />
									<argument exp='1' />
								</command>
								<command class_type='sim' title='Simulation' macro='Component.Property.GetValue' >
									<return exp='.temp_str' />
									<argument exp='this' />
									<argument exp='&quot;SCL&quot;' />
								</command>
								<command class_type='sim' title='Simulation' component='cal_i2c1' macro='SetValue' >
									<argument exp='&quot;SCL&quot;' />
									<argument exp='.temp_str' />
								</command>
								<command class_type='sim' title='Simulation' macro='Component.Property.GetValue' >
									<return exp='.temp_str' />
									<argument exp='this' />
									<argument exp='&quot;SDA&quot;' />
								</command>
								<command class_type='sim' title='Simulation' component='cal_i2c1' macro='SetValue' >
									<argument exp='&quot;SDA&quot;' />
									<argument exp='.temp_str' />
								</command>
							</flowline>
							<flowline >
								<command class_type='sim' title='Simulation' macro='Component.Property.SetWritable' >
									<argument exp='this' />
									<argument exp='&quot;SDA&quot;' />
									<argument exp='0' />
								</command>
								<command class_type='sim' title='Simulation' macro='Component.Property.SetWritable' >
									<argument exp='this' />
									<argument exp='&quot;SCL&quot;' />
									<argument exp='0' />
								</command>
								<command class_type='sim' title='Simulation' component='cal_i2c1' macro='GetValue' >
									<return exp='.temp_str' />
									<argument exp='&quot;SDA&quot;' />
								</command>
								<command class_type='sim' title='Simulation' macro='Component.Property.SetValue' >
									<argument exp='this' />
									<argument exp='&quot;SDA&quot;' />
									<argument exp='.temp_str' />
								</command>
								<command class_type='sim' title='Simulation' component='cal_i2c1' macro='GetValue' >
									<return exp='.temp_str' />
									<argument exp='&quot;SCL&quot;' />
								</command>
								<command class_type='sim' title='Simulation' macro='Component.Property.SetValue' >
									<argument exp='this' />
									<argument exp='&quot;SCL&quot;' />
									<argument exp='.temp_str' />
								</command>
							</flowline>
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.GetValue' >
							<return exp='.temp_str' />
							<argument exp='this' />
							<argument exp='&quot;SDA&quot;' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.SetValue' >
							<argument exp='LCD' />
							<argument exp='&quot;Pin_Data_0&quot;' />
							<argument exp='.temp_str' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.SetValue' >
							<argument exp='LCD' />
							<argument exp='&quot;Pin_Data_1&quot;' />
							<argument exp='.temp_str' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.SetValue' >
							<argument exp='LCD' />
							<argument exp='&quot;Pin_Data_2&quot;' />
							<argument exp='.temp_str' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.SetValue' >
							<argument exp='LCD' />
							<argument exp='&quot;Pin_Data_3&quot;' />
							<argument exp='.temp_str' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.SetValue' >
							<argument exp='LCD' />
							<argument exp='&quot;Pin_RS&quot;' />
							<argument exp='.temp_str' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.SetValue' >
							<argument exp='LCD' />
							<argument exp='&quot;Pin_E&quot;' />
							<argument exp='.temp_str' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.GetFilter' >
							<return exp='.temp_str' />
							<argument exp='LCD' />
							<argument exp='&quot;Rows&quot;' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.SetFilter' >
							<argument exp='this' />
							<argument exp='&quot;Rows&quot;' />
							<argument exp='.temp_str' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.GetFilter' >
							<return exp='.temp_str' />
							<argument exp='LCD' />
							<argument exp='&quot;Columns&quot;' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.SetFilter' >
							<argument exp='this' />
							<argument exp='&quot;Columns&quot;' />
							<argument exp='.temp_str' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.GetValue' >
							<return exp='.temp_str' />
							<argument exp='this' />
							<argument exp='&quot;Columns&quot;' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.SetValue' >
							<argument exp='LCD' />
							<argument exp='&quot;Columns&quot;' />
							<argument exp='.temp_str' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.GetValue' >
							<return exp='.temp_str' />
							<argument exp='this' />
							<argument exp='&quot;Rows&quot;' />
						</command>
						<command class_type='sim' title='Simulation' macro='Component.Property.SetValue' >
							<argument exp='LCD' />
							<argument exp='&quot;Rows&quot;' />
							<argument exp='.temp_str' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='PrintAsciiSim' description='Takes the ascii value for a character and prints the character' >
						<param name='character' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' component='LCD' macro='PrintAscii' >
							<argument exp='.character' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='RawSend' description='Sends data to the LCD display' >
						<param name='data' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='mask' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='nibble' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='i2data' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='comment' title='' comment='Clears lower 4 bits and shift upper bits to right x 4' textarea='12,0,12,0' />
						<command class_type='calculation' title='Calculation' ccode='// Calculation
// Calculation:
//  .i2data = (.data &amp; 0xF0) &gt;&gt; 4
FCL_I2DATA = (FCL_DATA &amp; 0xF0) &gt;&gt; 4;
' >
							<exp exp='.i2data = (.data &amp; 0xF0) &gt;&gt; 4' />
						</command>
						<command class_type='comment' title='' comment='Comment' textarea='12,0,12,0' />
						<command class_type='call' title='Call Macro' macro='EnablePulse' >
							<argument exp='.i2data | .mask' />
						</command>
						<command class_type='comment' title='' comment='Clears upper 4 bits' textarea='12,0,12,0' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='.nibble = (.data &amp; 0xF0)' />
							<exp exp='.i2data = .data ^ .nibble' />
						</command>
						<command class_type='call' title='Call Macro' macro='EnablePulse' >
							<argument exp='.i2data | .mask' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='CursorSim' description='Moves the cursor on the LCD Display' >
						<param name='x' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='y' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' component='LCD' macro='Cursor' >
							<argument exp='.x' />
							<argument exp='.y' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ClearLineSim' description='' >
						<param name='Line' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='x' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' component='LCD' macro='ClearLine' >
							<argument exp='.Line' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='PrintStringSim' description='' >
						<param name='Text' type='T8*' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<local name='Idx' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
						<local name='Count' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' component='LCD' macro='PrintString' >
							<argument exp='.Text' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Start' description='Startup routine required by the hardware device.' >
						<command class_type='call' title='Call Component Macro' component='cal_i2c1' macro='Master_Init' />
						<command class_type='delay' title='Delay' exp='12' type='1' />
						<command class_type='call' title='Call Component Macro' macro='EnablePulse' >
							<argument exp='3' />
						</command>
						<command class_type='delay' title='Delay' exp='4' type='1' />
						<command class_type='call' title='Call Component Macro' macro='EnablePulse' >
							<argument exp='3' />
						</command>
						<command class_type='call' title='Call Component Macro' macro='EnablePulse' >
							<argument exp='3' />
						</command>
						<command class_type='delay' title='Delay' exp='4' type='1' />
						<command class_type='call' title='Call Component Macro' macro='EnablePulse' >
							<argument exp='2' />
						</command>
						<command class_type='call' title='Call Macro' macro='RawSend' >
							<argument exp='0x2C' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' macro='RawSend' >
							<argument exp='0x06' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' macro='RawSend' >
							<argument exp='0x0C' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' macro='RawSend' >
							<argument exp='0x01' />
							<argument exp='0' />
						</command>
						<command class_type='delay' title='Delay' exp='2' type='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='PrintNumberSim' description='Allows you to print a number. This is limited to a signed-INT, -32768 to 32767' >
						<param name='Number' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='s' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='10' />
						</local>
						<command class_type='call' title='Call Component Macro' component='LCD' macro='PrintNumber' >
							<argument exp='.Number' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<command class_type='call' title='Call Component Macro' macro='StartSim' />
						<command class_type='call' title='Call Component Macro' macro='PrintStringSim' >
							<argument exp='&quot;ABCDEFGjhdsfu&quot;' />
						</command>
						<command class_type='loop' title='Loop' type='0' exp='1' >
							<flowline >
								<command class_type='delay' title='Delay' exp='20' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='0953aac0-9c23-4c2f-9843-88954a4191ea' vmin='2' vmaj='2' codename='LCD' x='0' y='0' z='4.9' xsz='64.5' ysz='13.75' 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='$PORTC.4' />
					<value target='Pin_Data_1' data='$PORTC.4' />
					<value target='Pin_Data_2' data='$PORTC.4' />
					<value target='Pin_Data_3' data='$PORTC.4' />
					<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='$PORTC.4' />
					<value target='Pin_E' data='$PORTC.4' />
					<value target='LCD_Use_Write' data='0' />
					<value target='Pin_RW' data='$PORTA.0' />
					<value target='Rows' data='004' />
					<value target='Columns' data='020' />
					<value target='BackgroundColor' data='7575680' />
					<value target='LineColor' data='5534559' />
					<value target='TextColor' data='0' />
					<value target='Font' data='Fixedsys' />
					<value target='CursorPosX' data='26' />
					<value target='CursorPosY' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='shape' codename='shape' x='0' y='1.35' z='-0.8' xsz='80' ysz='36.3' zsz='1.6' 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='Shape' data='201' />
					<value target='Color' data='192' />
					<value target='Outline' data='0' />
					<value target='Thickness' data='0' />
					<value target='Image' data='' />
					<value target='Model' data='this:LCD_EB005_PCB.mesh' />
					<value target='Unit' data='1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='shape' codename='shape1' x='0' y='0' z='2.775' xsz='73.4' ysz='27' zsz='5.55' 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='Shape' data='201' />
					<value target='Color' data='192' />
					<value target='Outline' data='0' />
					<value target='Thickness' data='0' />
					<value target='Image' data='' />
					<value target='Model' data='this:LCD_EB005_Bezel.mesh' />
					<value target='Unit' data='1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='ed3a5141-43bb-43e0-86b0-2243fd1147ca' vmin='3' vmaj='1' codename='cal_i2c1' x='56' y='0' z='-0.481325' xsz='16' ysz='16' zsz='16' 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='REF' data='1' />
					<value target='CHANNEL' data='000' />
					<value target='SDA' data='$PORTC.4' />
					<value target='SCL' data='$PORTC.3' />
					<value target='BAUD_LIST' data='000' />
					<value target='BAUD' data='100000' />
					<value target='SRC' data='000' />
					<value target='SMB' data='000' />
					<value target='BMODE' data='0' />
					<value target='SDA_PORT' data='$PORTC.4' />
					<value target='SDA_TRIS' data='$PORTC.4' />
					<value target='SDA_PIN' data='4' />
					<value target='SCL_PORT' data='$PORTC.3' />
					<value target='SCL_TRIS' data='$PORTC.3' />
					<value target='SCL_PIN' data='3' />
					<value target='MASTER' data='1' />
					<value target='ScopeTraces' data='0' />
					<value target='ConsoleData' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='0' brightness='0' perspective='0' >
		<background rgb='3158064' 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='1' lighting='0' brightness='0' perspective='0' >
		<background rgb='8409120' img='' style='4' />
		<table rgb='7884836' img='' style='0' size='0' />
		<camera xe='8.69968' ye='1.74207' ze='135.365' xt='8.69968' yt='1.74207' zt='-0.481325' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='StartSim' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Start' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='49' flags='0' />
		<view type='0' name='PrintStringSim' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='PrintString' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Ev_Property' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='80' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='EnablePulse' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='RawSend' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Clear' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Cursor' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='BacklightControl' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Command' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='PrintAscii' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ClearLine' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='RAMWrite' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='PrintNumber' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='BacklightControlSim' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ScrollDisplay' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='PrintNumberSim' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='PrintAsciiSim' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ClearSim' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='CursorSim' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ClearLineSim' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAgwQAALkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
