<root>
<document schema='101' license='1,FRANCISCO_CABRERA,K94URX' title='Prueba general' description='' target='PIC.18F.18F4550' >
	<config data='!0,ff!8,fc!10,ff!18,fe!20,ff!28,fd!30,9b!38,ff!40,ff!48,ff!50,ff!58,ff!60,ff!68,ff%5,1%3,3%0,7%8,c%e,1%f,1%15,1%10,1%11,3%13,3%18,0%19,f%28,1%29,0%2a,1%2f,1%30,1%32,0%35,0%36,0%37,1%40,1%41,1%42,1%43,1%4f,1%4e,1%50,1%51,1%52,1%53,1%5f,1%5e,1%5d,1%60,1%61,1%62,1%63,1%6e,1' clkspd='20000000' simspd='3' 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 >
		<watch expr='conta_1sg' />
		<watch expr='Flag_T1s' />
	</debug>
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='688a61b7-2a40-4f16-b36f-027d6041029d' 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' macronames='$(type)_$(module)__$(macro)' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='Flag_T1s' type='b1' description='Valor de retorno macro de base de tiempo de 1sg.' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Conta_1sg' type='u8' description='Valor a cargar en TMR1 para delay de interrupción de 1sg' 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='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Int_TMR1_1sg' description='fff' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Incrementar contador 1sg' >
							<exp exp='Conta_1sg = Conta_1sg + 1' />
							<exp exp='' />
						</command>
						<command class_type='decision' title='Preguntar si el contador ha llegado al maximo' exp='Conta_1sg &gt;= 200' swap='0' >
							<flowline >
								<command class_type='decision' title='Decisión' exp='Flag_T1s = 0' swap='0' >
									<flowline >
										<command class_type='calculation' title=' Activar flag de fin de cuenta' >
											<exp exp='Flag_T1s = 1' />
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title=' Activar flag de fin de cuenta' >
											<exp exp='Flag_T1s = 0' />
										</command>
									</flowline>
								</command>
								<command class_type='calculation' title='Resetear contador' >
									<exp exp='Conta_1sg = 0' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Inicializar variables' >
							<exp exp='Conta_1sg = 0' />
							<exp exp='Flag_T1s = 0' />
							<exp exp='' />
						</command>
						<command class_type='output' title='Salida' mode='1' port='1048576' mask='1' exp='1' />
						<command class_type='interrupt' title='Interrupción' enable='1' name='' call='Int_TMR1_100sg' >
							<custom name='Int_TMR1_1sg' handler='if (pir1 y (1 &lt;&lt; TMR1IF))  
{
FCM_% n ();  
pir1.TMR1IF = 0;  
}
' enable='t1con = 0xF9; 
tmr1h=0x0b;
tmr1l=0xdc;
intcon.PEIE = 1; 
intcon.GIE = 1;  
pie1.TMR1IE = 1; // Habilita las interrupciones del temporizador 
' disable='pie1.TMR1IE = 0; // Deshabilita las interrupciones del temporizador ' />
						</command>
						<command class_type='loop' title='Bucle' type='0' exp='1' >
							<flowline >
								<command class_type='decision' title='Ha passado 1sg' exp='Flag_T1s = 1' swap='0' >
									<flowline >
										<command class_type='output' title='Salida' mode='1' port='1048576' mask='1' exp='0' />
									</flowline>
									<flowline >
										<command class_type='output' title='Salida' mode='1' port='1048576' mask='1' exp='1' />
									</flowline>
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Int_TMR1_100sg' description='fff' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Incrementar contador 1sg' >
							<exp exp='Conta_1sg = Conta_1sg + 1' />
							<exp exp='' />
						</command>
						<command class_type='decision' title='Preguntar si el contador ha llegado al maximo' exp='Conta_1sg &gt;= 10' swap='0' >
							<flowline >
								<command class_type='calculation' title=' Activar flag de fin de cuenta' >
									<exp exp='Flag_T1s = 1' />
								</command>
								<command class_type='calculation' title='Resetear contador' >
									<exp exp='Conta_1sg = 0' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='d92e8259-f3a8-4176-a8c4-fe7ca42b2c3f' vmin='1' vmaj='1' codename='led_5mm1' x='-64' y='40' z='0' xsz='2.75229' ysz='2.54237' 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 >
					<value target='pin' data='$PORTA.0' />
					<value target='polarity' data='001' />
					<value target='on_color' data='65535' />
					<value target='length' data='4.000000' />
					<value target='show_label' data='000' />
					<value target='label_property' data='pin' />
					<value target='label_color' data='16777215' />
					<value target='label_scale' data='1.000000' />
					<value target='label_auto_scale' data='0' />
					<value target='label_position' data='003' />
				</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---------------------wAAAAAUAAAASQQAAFkCAAA' zoom='75' scrollx='0' scrolly='50' flags='0' />
		<view type='0' name='Int_TMR1_1sg' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAASQQAAFkCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
