<root>
<document schema='101' license='1,Joerg Gueldner,0BBM29' title='' description='' target='PIC16.24F.24FV32KA304' >
	<config data='!0,fff8!10,ffff!20,ff7a!30,ffbe!40,ff5f!50,ffb7!60,ffff!70,ff3f%0,0%1,4%10,1%11,1%20,2%25,1%26,1%27,0%30,2%32,1%33,3%35,1%36,2%40,f%44,1%45,0%46,1%50,3%52,1%53,0%54,1%55,1%57,1%60,3%67,1%70,f%74,1%76,0%77,0' clkspd='22118400' simspd='1' usewdt='1' 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='ad9833_temp' />
		<watch expr='f1_value' />
		<watch expr='display_temp3' />
		<watch expr='fram_crc_temp' />
		<watch expr='fram_address_h' />
		<watch expr='fram_address_l' />
		<watch expr='fram_byte' />
	</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='ack' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='fram_address' type='u16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='fram_byte' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='fram_byte_last' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='_07_fram_read' description='' >
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1' macro='Start' />
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1' macro='TransmitByte' >
							<return exp='ack' />
							<argument exp='0xa0' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1' macro='TransmitByte' >
							<return exp='ack' />
							<argument exp='0x00' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1' macro='Restart' />
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1' macro='TransmitByte' >
							<return exp='ack' />
							<argument exp='0xa1' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1' macro='ReceiveByte' >
							<return exp='fram_byte' />
							<argument exp='fram_byte_last' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1' macro='Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='_08_fram_write' description='' >
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1' macro='Start' />
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1' macro='TransmitByte' >
							<return exp='ack' />
							<argument exp='0xa1' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1' macro='TransmitByte' >
							<return exp='ack' />
							<argument exp='0x00' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1' macro='TransmitByte' >
							<return exp='ack' />
							<argument exp='fram_byte' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1' macro='Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='clock 22mhz1184' >
						<command class_type='comment' title='' comment='fram = FM24C16B

advice:
in the device address are 3 bits for page select
--&gt; receive and send byte transaction is not working ?!?!?

slave ID = 0x50 --&gt; shiftet to left = 0xa0 for write
and 0xa1 for read' textarea='12,0,12,0' />
						<command class_type='native' title='setup oscillator' ccode='REFOCON = 0b1000010000000000;' language='C' />
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1' macro='Initialise' />
						<command class_type='loop' title='loop' textarea='36,0,511,300' type='0' exp='1' >
							<flowline >
								<command class_type='output' title='Ausgang --&gt; disable write protect fram' mode='1' port='1048577' mask='128' exp='0' />
								<command class_type='comment' title='' comment='write' textarea='12,0,12,0' />
								<command class_type='calculation' title='Berechnung' >
									<exp exp='fram_byte = 0x70' />
								</command>
								<command class_type='call' title='Makro-Aufruf' macro='_08_fram_write' />
								<command class_type='comment' title='' comment='read' textarea='12,0,12,0' />
								<command class_type='call' title='Makro-Aufruf' macro='_07_fram_read' />
								<command class_type='decision' title='Entscheidung' exp='fram_byte = 0x70' swap='0' >
									<flowline >
										<command class_type='output' title='Ausgang' mode='1' port='135266305' mask='4' exp='1' />
									</flowline>
									<flowline >
										<command class_type='output' title='Ausgang' mode='1' port='135266305' mask='4' exp='0' />
									</flowline>
								</command>
								<command class_type='output' title='Ausgang --&gt; enable write protect fram' mode='1' port='1048577' mask='128' exp='1' />
								<command class_type='comment' title='' comment='generate sync signals for oscilloscope' textarea='12,0,12,0' />
								<command class_type='output' title='Ausgang' mode='1' port='1048576' mask='128' exp='1' />
								<command class_type='delay' title='Warten' exp='1' type='1' />
								<command class_type='output' title='Ausgang' mode='1' port='1048576' mask='128' exp='0' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='24219805-113d-4b12-b6bd-e1b0b0c33981' vmin='3' vmaj='1' codename='I2C_Master1' x='0' y='0' z='27.2055' xsz='60' ysz='26' zsz='1.51' 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='CHANNEL' data='001' />
					<value target='BAUD_LIST' data='001' />
					<value target='SRC' data='000' />
					<value target='SMB' data='000' />
					<value target='BAUD' data='20000' />
					<value target='SDA' data='$PORTB.9' />
					<value target='SCL' data='$PORTB.8' />
					<value target='label' data='I2C Master' />
					<value target='ScopeTraces' data='0' />
					<value target='ConsoleData' data='1' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='' />
				</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='210.495' 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---------------------wAAAAAUAAAA6AUAAKMDAAA' zoom='65' scrollx='0' scrolly='33' flags='0' />
		<view type='0' name='_07_fram_read' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAA6AUAAKMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='_08_fram_write' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAA6AUAAKMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
