<root>
<document schema='101' license='1,HansJuergenHalder,UU6UYG' title='' description='' guid='8ab707a5-24d2-473d-a9f5-04a4aecfa4f9' target='PIC16.24F.24FJ64GB002' >
	<config data='!0,ff18!10,f4ff!20,89af!30,3f7f%0,8%4,1%5,0%6,0%7,0%8,ff%10,3f%16,3%18,0%1a,1%1c,1%1d,1%1e,1%1f,1%20,3%22,1%23,1%24,0%25,1%26,2%28,1%2b,1%2c,0%2f,1%30,f%34,1%35,1%36,1%37,0%38,3%3a,1%3b,1%3c,1%3d,1%3e,0%3f,0' clkspd='32000000' 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='firmware' value='0000000000000000' />
			<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='monitor' value='1' />
			<data name='ictloop' value='1' />
			<data name='ictrate' value='1000' />
			<data name='ictmask' value='-1' />
		</dll_dbg_icd>
		<dll_dbg_ict enabled='0' >
			<data name='speed' value='1000' />
			<data name='firmware' value='0000000000000000' />
			<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='userpins' value='0' />
		</dll_dbg_ict>
		<dll_models enabled='1' />
		<dll_upgrader enabled='1' />
		<dll_webhelp enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='Baudrate_24FJ64GB002.Baudrate' />
		<watch expr='Baudrate_24FJ64GB002.Channel' />
		<watch expr='Baudrate_24FJ64GB002.BRG' />
		<watch expr='Baudrate_24FJ64GB002.FOSC' />
	</debug>
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='8ab707a5-24d2-473d-a9f5-04a4aecfa4f9' vmin='0' vmaj='1' visiblename='' description='' category='' author='' 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' >
			<resources />
			<properties />
			<values />
			<events />
			<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='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Baudrate_24FJ64GB002' description='' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='Baudrate' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='Channel' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='FOSC' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='BRG' type='u32' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
						<command class_type='comment' title='' comment='*******************************************
*
*  Copyright IrisSoft 
* 
*  24.11.2013
*
*  Baudrate einstellen
*  Input Baudrate 110 - 115200; Channel 1 - 2
*
*  Output ok = 0; Fehler = 255
*
*******************************************' textarea='12,0,12,259' />
						<command class_type='native' title='' ccode='FCL_FOSC = MX_CLK_SPEED;
FCL_BRG = FCL_FOSC / (8 * FCL_BAUDRATE) - 1; //8v  wegen FSCY = FOSC / 2

FCR_RETVAL = 255;

if(FCL_CHANNEL = 1)
{
 _BRGH = 1;
 U1BRG = FCL_BRG;
 FCR_RETVAL = 0;
}
if(FCL_CHANNEL = 1)
{
 U2MODEbits.BRGH = 1;
 U2BRG = FCL_BRG;
 FCR_RETVAL = 0;
}' textarea='36,0,511,300' customize='1' language='C' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<local name='USART' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='RC5val' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='comment' title='' comment='*******************************************
*
*  Copyright IrisSoft 
* 
*  24.11.2013
*
*  Basic
*
*******************************************' textarea='12,0,12,0' />
						<command class_type='call' title='' textarea='36,0,511,300' component='RS232' macro='Initialise' />
						<command class_type='call' title='' textarea='36,0,511,300' component='RC5' macro='RXEnable' />
						<command class_type='call' title='' textarea='36,0,511,300' component='RC5' macro='TXEnable' />
						<command class_type='call' title='' macro='Baudrate_24FJ64GB002' >
							<argument exp='115200' />
							<argument exp='2' />
						</command>
						<command class_type='loop' title='' textarea='36,0,511,300' exp='1' type='0' start='1' count='1' breakend='0' >
							<flowline >
								<command class_type='call' title='' textarea='36,0,511,300' component='RS232' macro='ReceiveChar' >
									<return exp='.USART' />
									<argument exp='100' />
								</command>
								<command class_type='output' title='' textarea='36,0,511,300' mode='1' port='2097153' mask='32' exp='0' />
								<command class_type='delay' title='' textarea='36,0,511,300' exp='500' type='1' />
								<command class_type='output' title='' textarea='36,0,511,300' mode='1' port='2097153' mask='32' exp='1' />
								<command class_type='delay' title='' textarea='36,0,511,300' exp='500' type='1' />
								<command class_type='calculation' title='' textarea='36,0,511,300' >
									<exp exp='.USART = .USART + 1' />
								</command>
								<command class_type='call' title='' textarea='36,0,511,300' component='RC5' macro='CollectData' >
									<return exp='.RC5val' />
									<argument exp='0' />
								</command>
								<command class_type='call' title='' textarea='36,0,511,300' component='RS232' macro='SendChar' >
									<argument exp='.USART' />
								</command>
								<command class_type='call' title='TEST' textarea='36,0,511,300' disable='1' component='RS232' macro='SendString' >
									<argument exp='&quot;Test... &quot;' />
								</command>
								<command class_type='call' title='DEBUG' textarea='36,0,511,300' disable='1' component='RS232' macro='SendChar' >
									<argument exp='85' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='c73616d1-7ad0-45d9-aada-69ccfa4c5efc' vmin='1' vmaj='1' codename='RS232' x='-60' y='40' z='1.005' 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' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='002' />
					<value target='BAUD_LIST' data='009' />
					<value target='BAUD' data='9600' />
					<value target='DBITS' data='008' />
					<value target='RETURN' data='000' />
					<value target='ToutVal' data='255' />
					<value target='FLOWEN' data='000' />
					<value target='ECHO' data='000' />
					<value target='TX' data='$PORTB.14' />
					<value target='RX' data='$PORTB.15' />
					<value target='CTS' data='$PORTB.1' />
					<value target='RTS' data='$PORTB.2' />
					<value target='TXRemap' data='013' />
					<value target='RXRemap' data='015' />
					<value target='label' data='RS232' />
					<value target='ConsoleColumns' data='64' />
					<value target='DataSource' data='001' />
					<value target='com_port' data='003' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='81e90a9f-1594-4b34-8aef-5dd671dddc30' vmin='1' vmaj='1' codename='RC5' x='0' y='0' z='1.005' 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='0' layer='0' >
				<resources />
				<properties />
				<values >
					<value target='ir_freq' data='36000' />
					<value target='timer_enval' data='2' />
					<value target='timer_avr_enval' data='' />
					<value target='timer_pre_val' data='33' />
					<value target='timer_arm_enval' data='' />
					<value target='lwidth' data='3' />
					<value target='hwidth' data='23' />
					<value target='cwidth' data='11' />
					<value target='pwm_period' data='222' />
					<value target='pwm_duty' data='111' />
					<value target='pwm_scaler' data='0' />
					<value target='rx_mode' data='001' />
					<value target='rx_invert_signal' data='1' />
					<value target='rx_addr_mask' data='000' />
					<value target='rx_addr_val' data='0' />
					<value target='rx_a0' data='0' />
					<value target='rx_a1' data='0' />
					<value target='rx_a2' data='0' />
					<value target='rx_a3' data='0' />
					<value target='rx_a4' data='0' />
					<value target='rx_pin' data='$PORTB.4' />
					<value target='v5rxaddress' data='0' />
					<value target='tx_mode' data='001' />
					<value target='tx_modulation' data='001' />
					<value target='tx_pwm_chan' data='001' />
					<value target='tx_pin' data='$PORTB.5' />
					<value target='tx_pwm_pin' data='$PORTA.0' />
					<value target='label' data='RC5' />
				</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='16771561' img='' style='0' />
		<table rgb='7884836' 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---------------------wAAAAAUAAAAYAQAAHkCAAA' zoom='75' scrollx='0' scrolly='523' flags='0' />
		<view type='0' name='Baudrate_24FJ64GB002' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAYAQAAHkCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
