<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8669384304254148461</id><updated>2012-01-24T06:03:26.544-08:00</updated><category term='Programación'/><category term='PIC'/><category term='Electrónica'/><category term='ASM'/><title type='text'>Electronica y PIC's</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jimjim17.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669384304254148461/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jimjim17.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>jim17</name><uri>http://www.blogger.com/profile/14798455564467508492</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://bp3.blogger.com/_yvdJ9xGcs2Q/SBIIaKYzkYI/AAAAAAAAAAk/yuzGrftgPek/S220/imagen+022.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8669384304254148461.post-6697185257639935528</id><published>2009-07-20T09:08:00.000-07:00</published><updated>2009-07-20T09:38:11.898-07:00</updated><title type='text'>Tercer Programa PIC contador 0-99, 99-0</title><content type='html'>&lt;span style="font-family: trebuchet ms;"&gt;Aquí tenemos el Tercer programa PIC, como estábamos utilizando displays de 7 Segmentos pues seguimos utilizándolos. Esta vez he realizado un código de un contador 7-Segmentos. Cuenta de 0-99 y de 99-0.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codeheader"&gt;Código&lt;/div&gt;&lt;pre class="geshi"&gt;&lt;div style="border-bottom: 1px solid gray; margin-bottom: 0.3em;"&gt;GeSHi (asm):&lt;/div&gt;&lt;ol&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;*** Autor: Miguel Angel Borrego Trujillo           ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;*** Titulo: 2 Display 7 seg PORTB    0-99,99-0     ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;*** Fecha: 25/06/2009            ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;*** PIC 16F84A   4MHZ,XT,CPOFF,WDTOFF              ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**   CONFIGURACION DEL DISPOSITIVO    ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;LIST&lt;/span&gt; &lt;span style="color: rgb(128, 128, 192);"&gt;P&lt;/span&gt;=16f84a   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Seleccionamos el tipo de procesador&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#include&lt;/span&gt; &amp;lt;p16f84a.inc&amp;gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Incluimos el archivo p16f84a&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;__CONFIG _CP_OFF&amp;amp;_PWRTE_ON&amp;amp;_WDT_OFF&amp;amp;_XT_OSC&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**   ASIGNAMOS LAS VARIABLES DE LOS REGISTROS DE RAM ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;DECENAS  &lt;span style="color: rgb(0, 0, 255);"&gt;EQU&lt;/span&gt;  0X0C &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;REGISTRO PARA DISPLAY1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;UNIDADES &lt;span style="color: rgb(0, 0, 255);"&gt;EQU&lt;/span&gt;  0X0D &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;REGISTRO PARA DISPLAY2&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;PDel0  &lt;span style="color: rgb(0, 0, 255);"&gt;EQU&lt;/span&gt;  0X0E &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;REGISTRO PARA DELAY&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;CONTADOR &lt;span style="color: rgb(0, 0, 255);"&gt;EQU&lt;/span&gt;  0X0F &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;REGISTRO PARA CONTADOR&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;CONTADOR_U &lt;span style="color: rgb(0, 0, 255);"&gt;EQU&lt;/span&gt;  0X10 &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;REGISTRO PARA UNIDADES&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;CONTADOR_D &lt;span style="color: rgb(0, 0, 255);"&gt;EQU&lt;/span&gt;  0X11 &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;REGISTRO PARA DECENAS&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**   ESCRITURA DEL PROGRAMA DEL PIC    ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;org&lt;/span&gt;  0x00   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Vector de Reset&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;goto&lt;/span&gt;  INICIO  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;vamos a la etiqueta Main&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**   CONFIGURAMOS PUERTOS DEL PIC     ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;INICIO &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BSF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;STATUS&lt;/span&gt;,&lt;span style="color: rgb(128, 128, 192);"&gt;RP0&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;SELECCIONAMOS EL BANCO 1 &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CLRF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;TRISB&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LIMPIAMOS EL REGISTRO TRISB&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'11111100'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;ENTRADAS RA2-RA4, SALIDAS RA0-RA1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;TRISA&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;PONEMOS EL VALOR DE W EN TRISA&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BCF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;STATUS&lt;/span&gt;,&lt;span style="color: rgb(128, 128, 192);"&gt;RP0&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;SELECCIONAMOS EL BANCO 0&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BCF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTA&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;PONEMOS A 0 EL RA0&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BCF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTA&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;PONEMOS A 0 EL RA1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;BUCLE &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt; UP   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LLAMAMOS A LA RUTINA DOWN 9-0&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt;  DOWN  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;GOTO&lt;/span&gt;  BUCLE  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;GENERAMOS UN BUCLE INFINITO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**   EMPEZAMOS CON EL PROGRAMA 7SEG     ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;DOWN  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVLW&lt;/span&gt; .&lt;span style="color: rgb(255, 0, 0);"&gt;10&lt;/span&gt;   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 10 A DECENAS&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; DECENAS  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;RESETU &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVLW&lt;/span&gt; .&lt;span style="color: rgb(255, 0, 0);"&gt;10&lt;/span&gt;   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 10 A UNIDADES&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; UNIDADES &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;RESETC &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVLW&lt;/span&gt; .&lt;span style="color: rgb(255, 0, 0);"&gt;250&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 250 A CONTADOR&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; CONTADOR &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;REFRESCO &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVF&lt;/span&gt; DECENAS,&lt;span style="color: rgb(255, 0, 0);"&gt;W&lt;/span&gt;    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;MOVEMOS DECENAS A W&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt; DISPLAY7SEG    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LLAMAMOS AL NUMERO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTB&lt;/span&gt;     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LO MOSTRAMOS POR EL DISPLAY&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BSF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTA&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;ENCENDEMOS DISPLAY_DECENAS&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt;  DOS_MILISEGUNDOS  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;2ms ENCENDIDO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BCF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTA&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;APAGAMOS DISPLAY&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVF&lt;/span&gt; UNIDADES,&lt;span style="color: rgb(255, 0, 0);"&gt;W&lt;/span&gt;    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;MOVEMOS UNIDADES A W&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt; DISPLAY7SEG    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LLAMAMOS AL NUMERO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTB&lt;/span&gt;     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LO MOSTRAMOS POR EL DISPLAY&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BSF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTA&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;ENCENDEMOS DISPLAY_UNIDADES&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt;  DOS_MILISEGUNDOS  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;2ms ENCENDIDO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BCF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTA&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;APAGAMOS DISPLAY&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;DECFSZ&lt;/span&gt; CONTADOR,&lt;span style="color: rgb(255, 0, 0);"&gt;F&lt;/span&gt;    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;DECREMENTAMOS CONTADOR DE REFRESCO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;GOTO&lt;/span&gt; REFRESCO    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;REFRESCAMOS LA IMAGEN TODO EL RATO DURANTE 1 SEG&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;DECFSZ&lt;/span&gt; UNIDADES,&lt;span style="color: rgb(255, 0, 0);"&gt;F&lt;/span&gt;    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;DECREMENTAMOS UNIDADES &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;GOTO&lt;/span&gt; RESETC     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;RESETEAMOS EL CONTADOR DE REFRESCO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;DECFSZ&lt;/span&gt; DECENAS,&lt;span style="color: rgb(255, 0, 0);"&gt;F&lt;/span&gt;    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;SI UNIDADES ES 0 DECREMENTAMOS DECENAS&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;GOTO&lt;/span&gt; RESETU     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;UNA VEZ DECREMENTADA DECENAS, RESETEAMOS UNIDADES&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  RETURN       &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;VOLVEMOS A LA DONDE NOS HAN LLAMADO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;UP  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVLW&lt;/span&gt; .&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 1 A DECENAS&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; DECENAS  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVLW&lt;/span&gt; .&lt;span style="color: rgb(255, 0, 0);"&gt;10&lt;/span&gt;   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 10 A CONTADOR DECENAS&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; CONTADOR_D &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;RESETU1 &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVLW&lt;/span&gt; .&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 1 A UNIDADES&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; UNIDADES &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVLW&lt;/span&gt; .&lt;span style="color: rgb(255, 0, 0);"&gt;10&lt;/span&gt;   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 10 A CONTADOR UNIDADES&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; CONTADOR_U &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;RESETC1 &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVLW&lt;/span&gt; .&lt;span style="color: rgb(255, 0, 0);"&gt;250&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 250 A CONTADOR&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; CONTADOR &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;REFRESCO1 &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVF&lt;/span&gt; DECENAS,&lt;span style="color: rgb(255, 0, 0);"&gt;W&lt;/span&gt;    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;MOVEMOS DECENAS A W&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt; DISPLAY7SEG    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LLAMAMOS AL NUMERO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTB&lt;/span&gt;     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LO MOSTRAMOS POR EL DISPLAY&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BSF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTA&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;ENCENDEMOS DISPLAY_DECENAS&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt;  DOS_MILISEGUNDOS  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;2ms ENCENDIDO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BCF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTA&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;APAGAMOS DISPLAY&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVF&lt;/span&gt; UNIDADES,&lt;span style="color: rgb(255, 0, 0);"&gt;W&lt;/span&gt;    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;MOVEMOS UNIDADES A W&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt; DISPLAY7SEG    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LLAMAMOS AL NUMERO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTB&lt;/span&gt;     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LO MOSTRAMOS POR EL DISPLAY&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BSF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTA&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;ENCENDEMOS DISPLAY_UNIDADES&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt;  DOS_MILISEGUNDOS  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;2ms ENCENDIDO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BCF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTA&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;APAGAMOS DISPLAY&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;DECFSZ&lt;/span&gt; CONTADOR,&lt;span style="color: rgb(255, 0, 0);"&gt;F&lt;/span&gt;    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;DECREMENTAMOS CONTADOR DE REFRESCO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;GOTO&lt;/span&gt; REFRESCO1    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;REFRESCAMOS LA IMAGEN DURANTE 1 SEG&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;INCF&lt;/span&gt; UNIDADES,&lt;span style="color: rgb(255, 0, 0);"&gt;F&lt;/span&gt;    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;INCREMENTAMOS UNIDADES&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;DECFSZ&lt;/span&gt; CONTADOR_U    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;COMPROVAMOS QUE NO SE HA ECHO 9 VECES&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;GOTO&lt;/span&gt; RESETC1     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;RESETEAMOS CONTADOR DE REFRESCO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;INCF&lt;/span&gt; DECENAS,&lt;span style="color: rgb(255, 0, 0);"&gt;F&lt;/span&gt;    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;ECHO 9 VECES, INCREMENTAMOS DECENAS&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;DECFSZ&lt;/span&gt; CONTADOR_D    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;COMPROVAMOS QUE NO SE HAYA ECHO 9 VECES&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;GOTO&lt;/span&gt; RESETU1     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;RESETEAMOS UNIDADES&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  RETURN       &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;VOLVEMOS A DONDE NOS HAN LLAMADO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  &lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  &lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;DISPLAY7SEG&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;ADDWF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PCL&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;F&lt;/span&gt;   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;SUMAMOS EL DATO DE W AL REGISTRO PCL&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;       &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;QUE SIRVE PARA EJECUTAR UNA DE LAS INSTRUCCIONES&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;       &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;QUE SE SITUAN M&amp;amp;#193;S ABAJO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;NOP&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'00111111'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 0&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'00000110'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'01011011'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 2&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'01001111'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 3&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'01100110'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 4&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'01101101'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 5&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'01111101'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 6&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'00000111'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 7&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'01111111'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 8&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'01100111'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 9&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;  &lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;  &lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;DOS_MILISEGUNDOS &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;movlw&lt;/span&gt;     .&lt;span style="color: rgb(255, 0, 0);"&gt;249&lt;/span&gt;      &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 set numero de repeticion &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;           &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;movwf&lt;/span&gt;     PDel0     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 |&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;PLoop0     &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;clrwdt&lt;/span&gt;              &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 clear watchdog&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;PDelL1     &lt;span style="color: rgb(0, 0, 255);"&gt;goto&lt;/span&gt; PDelL2         &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 2 ciclos delay&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;PDelL2     &lt;span style="color: rgb(0, 0, 255);"&gt;goto&lt;/span&gt; PDelL3         &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 2 ciclos delay&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;PDelL3  &lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;           &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;decfsz&lt;/span&gt;    PDel0, &lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 + (1) es el tiempo 0  ?&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;           &lt;span style="color: rgb(0, 0, 255);"&gt;goto&lt;/span&gt;      PLoop0    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 2 no, loop&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;PDelL4     &lt;span style="color: rgb(0, 0, 255);"&gt;goto&lt;/span&gt; PDelL5         &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 2 ciclos delay&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;PDelL5     &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;clrwdt&lt;/span&gt;              &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 ciclo delay&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;        return                 &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 2+2 Fin.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;END&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/h-oAPSXQCZs&amp;hl=es&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/h-oAPSXQCZs&amp;hl=es&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;Todas las instrucciones que hay las he explicado, si me he olvidado de explicar alguna, podéis decírmelo a través de un comentario. Si tenéis cualquier duda ya sabéis.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8669384304254148461-6697185257639935528?l=jimjim17.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jimjim17.blogspot.com/feeds/6697185257639935528/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8669384304254148461&amp;postID=6697185257639935528' title='27 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8669384304254148461/posts/default/6697185257639935528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669384304254148461/posts/default/6697185257639935528'/><link rel='alternate' type='text/html' href='http://jimjim17.blogspot.com/2009/07/tercer-programa-pic-contador-0-99-99-0.html' title='Tercer Programa PIC contador 0-99, 99-0'/><author><name>jim17</name><uri>http://www.blogger.com/profile/14798455564467508492</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://bp3.blogger.com/_yvdJ9xGcs2Q/SBIIaKYzkYI/AAAAAAAAAAk/yuzGrftgPek/S220/imagen+022.jpg'/></author><thr:total>27</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8669384304254148461.post-8141898658108130633</id><published>2009-07-15T17:33:00.000-07:00</published><updated>2009-07-20T09:37:27.470-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PIC'/><category scheme='http://www.blogger.com/atom/ns#' term='Programación'/><category scheme='http://www.blogger.com/atom/ns#' term='ASM'/><category scheme='http://www.blogger.com/atom/ns#' term='Electrónica'/><title type='text'>SEGUNDO PROGRAMA PIC</title><content type='html'>&lt;span style="color: rgb(0, 0, 0);font-family:trebuchet ms;font-size:100%;"  &gt;Aquí tenéis el segundo programa para PIC, no voy a comentar las instrucciones que ya hemos visto, solamente voy a comentar las instrucciones no vistas. La función del programa es escribir números en un 7segmentos y desarrollar un poco el ingenio para realizar un contador descendente y ascendente respectivamente del 9 al 0 y del 0 al 9&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-family:trebuchet ms;font-size:100%;"  &gt;.&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: trebuchet ms;" class="codeheader"&gt;Código&lt;/div&gt;&lt;pre style="font-family: trebuchet ms;" class="geshi"&gt;&lt;div style="border-bottom: 1px solid gray; margin-bottom: 0.3em;"&gt;GeSHi (asm):&lt;/div&gt;&lt;ol&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;*** Autor: Miguel Angel Borrego Trujillo          ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;*** Titulo: 1 Display 7 seg PORTB    9-0,0-9    ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;*** Fecha: 25/06/2009        ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;*** PIC 16F84A   4MHZ,XT,CPOFF,WDTOFF          ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**   CONFIGURACION DEL DISPOSITIVO ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;LIST&lt;/span&gt; &lt;span style="color: rgb(128, 128, 192);"&gt;P&lt;/span&gt;=16f84a   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Seleccionamos el tipo de procesador&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#include&lt;/span&gt; &amp;lt;p16f84a.inc&amp;gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Incluimos el archivo p16f84a&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;__CONFIG _CP_OFF&amp;amp;_PWRTE_ON&amp;amp;_WDT_OFF&amp;amp;_XT_OSC&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;** ASIGNAMOS LAS VARIABLES DE LOS REGISTROS DE RAM &lt;/span&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;    ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;NUMERO_D1 &lt;span style="color: rgb(0, 0, 255);"&gt;EQU&lt;/span&gt;  0X0C &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO_D1 = REGISTRO 0X0D DE RAM&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;PDel0  &lt;span style="color: rgb(0, 0, 255);"&gt;EQU&lt;/span&gt;  0X0D &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;REGISTRO PARA DELAY&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;PDel1  &lt;span style="color: rgb(0, 0, 255);"&gt;EQU&lt;/span&gt;  0X0E &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;REGISTRO PARA DELAY&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;PDel2  &lt;span style="color: rgb(0, 0, 255);"&gt;EQU&lt;/span&gt;  0X0F &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;REGISTRO PARA DELAY&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;CONTADOR  &lt;span style="color: rgb(0, 0, 255);"&gt;EQU&lt;/span&gt;  0X10 &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;REGISTRO PARA CONTADOR&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;** ESCRITURA DEL PROGRAMA DEL PIC   ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;org&lt;/span&gt;  0x00   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Vector de Reset&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;goto&lt;/span&gt;  INICIO  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;vamos a la etiqueta Main&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;** CONFIGURAMOS PUERTOS DEL PIC    ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;INICIO &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BSF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;STATUS&lt;/span&gt;,&lt;span style="color: rgb(128, 128, 192);"&gt;RP0&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;SELECCIONAMOS EL BANCO 1 &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CLRF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;TRISB&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LIMPIAMOS EL REGISTRO TRISB&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'11111110'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;ENTRADAS RA2-RA4, SALIDAS RA0-RA1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;TRISA&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;PONEMOS EL VALOR DE W EN TRISA&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BCF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;STATUS&lt;/span&gt;,&lt;span style="color: rgb(128, 128, 192);"&gt;RP0&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;SELECCIONAMOS EL BANCO 0&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BSF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTA&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;PONEMOS A 1 EL RA0&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;BUCLE &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt; DOWN  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LLAMAMOS A LA RUTINA DOWN 9-0&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt;  UP   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LLAMAMOS A LA RUTINA UP 0-9&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;GOTO&lt;/span&gt;  BUCLE  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;GENERAMOS UN BUCLE INFINITO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt;  &lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**  EMPEZAMOS CON EL PROGRAMA 7SEG   ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt;DOWN &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVLW&lt;/span&gt; 0X0A  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;EL NUMERO 10 A W&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt;  NUMERO_D1 &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;MOVEMOS EL DATO A NUMERO_D1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt;REPEAT_DOWN &lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVF&lt;/span&gt; NUMERO_D1,&lt;span style="color: rgb(255, 0, 0);"&gt;W&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;MOVEMOS EL DATO A W&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt; DISPLAY7SEG &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LLAMAMOS A LA TABLA&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt;  &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTB&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;MOVEMOS EL DATO QUE NOS ENTREGA W AL PUERTOB &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt; DEMORA  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LLAMAMOS UNA RUTINA DE RETARDO DE 1 SEG&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;DECFSZ&lt;/span&gt; NUMERO_D1,&lt;span style="color: rgb(255, 0, 0);"&gt;F&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;DECREMENTAMOS CONTADOR SI ES 0 SALTAMOS INSTRUCCION&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;GOTO&lt;/span&gt;  REPEAT_DOWN &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;REPETIMOS LO ANTERIOR &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;  RETURN&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;UP  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CLRF&lt;/span&gt; NUMERO_D1 &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LIMPIAMOS EL NUMERO A MOSTRAR&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVLW&lt;/span&gt; 0X0A  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 10 A W&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; CONTADOR &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;MOVEMOS 10 A CONTADOR&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;REPEAT_UP&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:lucida grande;color:black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;INCF&lt;/span&gt; NUMERO_D1 &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;INCREMENTAMOS EL NUMERO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:lucida grande;color:black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVF&lt;/span&gt; NUMERO_D1,&lt;span style="color: rgb(255, 0, 0);"&gt;W&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;MOVEMOS EL DATO A W&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:lucida grande;color:black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt; DISPLAY7SEG &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LLAMAMOS A LA TABLA PARA QUE NOS ENTREGUE EL DATO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:lucida grande;color:black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;MOVWF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTB&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;MOVEMOS EL DATO DE RETORNO DE LA TABLA A PORTB&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:lucida grande;color:black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CALL&lt;/span&gt;  DEMORA  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;LLAMAMOS A LA RUTINA DE RETARDO DE 1 SEGUNDO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:lucida grande;color:black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;DECFSZ&lt;/span&gt; CONTADOR,&lt;span style="color: rgb(255, 0, 0);"&gt;F&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;DECREMENTAMOS CONTADOR&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:lucida grande;color:black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;GOTO&lt;/span&gt;  REPEAT_UP&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:lucida grande;color:black;"&gt;&lt;div style="font-weight: normal;"&gt;  RETURN &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:lucida grande;color:black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;/div&gt;&lt;/li&gt;&lt;li face="lucida grande" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;/div&gt;&lt;/li&gt;&lt;li face="lucida grande" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li face="lucida grande" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;DISPLAY7SEG&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: lucida grande; color: black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;ADDWF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PCL&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;F&lt;/span&gt;   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;SUMAMOS EL DATO DE W AL REGISTRO PCL&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: lucida grande; color: black;"&gt;&lt;div style="font-weight: normal;"&gt;       &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;QUE SIRVE PARA EJECUTAR UNA DE LAS INSTRUCCIONES&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: lucida grande; color: black;"&gt;&lt;div style="font-weight: normal;"&gt;       &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;QUE SE SITUAN M&amp;amp;#193;S ABAJO&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: lucida grande; color: black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;NOP&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: lucida grande; color: black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'00111111'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 0&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="lucida grande" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'00000110'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'01011011'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 2&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'01001111'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 3&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'01100110'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 4&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'01101101'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 5&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'01111101'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 6&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'00000111'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 7&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'01111111'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 8&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;RETLW&lt;/span&gt; B&lt;span style="color: rgb(127, 0, 127);"&gt;'01100111'&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;NUMERO 9&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;  &lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;DEMORA  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;movlw&lt;/span&gt;     .&lt;span style="color: rgb(255, 0, 0);"&gt;14&lt;/span&gt;       &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 set numero de repeticion  (C)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt;        &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;movwf&lt;/span&gt;     PDel0     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 |&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt;PLoop0  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;movlw&lt;/span&gt;     .&lt;span style="color: rgb(255, 0, 0);"&gt;72&lt;/span&gt;       &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 set numero de repeticion  (B)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt;        &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;movwf&lt;/span&gt;     PDel1     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 |&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt;PLoop1  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;movlw&lt;/span&gt;     .&lt;span style="color: rgb(255, 0, 0);"&gt;247&lt;/span&gt;      &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 set numero de repeticion  (A)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt;        &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;movwf&lt;/span&gt;     PDel2     &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 |&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;PLoop2  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;clrwdt&lt;/span&gt;              &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 clear watchdog&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;        &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;decfsz&lt;/span&gt;    PDel2, &lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 + (1) es el tiempo 0  ? (A)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;goto&lt;/span&gt;      PLoop2    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 2 no, loop&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;        &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;decfsz&lt;/span&gt;    PDel1,  &lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 + (1) es el tiempo 0  ? (B)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;goto&lt;/span&gt;      PLoop1    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 2 no, loop&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;        &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;decfsz&lt;/span&gt;    PDel0,  &lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 + (1) es el tiempo 0  ? (C)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;goto&lt;/span&gt;      PLoop0    &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 2 no, loop&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;PDelL1  &lt;span style="color: rgb(0, 0, 255);"&gt;goto&lt;/span&gt; PDelL2         &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 2 ciclos delay&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;PDelL2  &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;clrwdt&lt;/span&gt;              &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 1 ciclo delay&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li  style="font-weight: normal; font-style: normal;color:black;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;        return              &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;; 2+2 Fin.  &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;  &lt;/div&gt;&lt;/li&gt;&lt;li face="lucida grande" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div style="font-weight: normal;"&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;END&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);font-family:trebuchet ms;font-size:100%;"  &gt;Aclaración de algunas instrucciones:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;EQU&lt;/span&gt;&lt;br /&gt;La instrucción EQU se utiliza para asignar un número a una palabra, que puede ser un bit, un registro de memoria RAM, etc. Si tenemos un programa que guarda unos datos en la dirección 0x0F, en vez de estar utilizando siempre 0x0F para referirnos a esos datos podemos hacer lo siguiente: DATOS EQU 0x0F, asi siempre que queramos acceder a esos datos, solamente tenemos que poner "DATOS". El equivalente de EQU sería "IGUAL A". La instrucción se utiliza de la siguiente manera: PALABRA EQU NÚMERO.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;CALL&lt;/span&gt;&lt;br /&gt;La instrucción CALL se utiliza para llamar a una rutina. Al final de estas rutinas es necesario poner la instrucción RETURN. La diferencia entre CALL y GOTO es que cuando utilizamos CALL, el pic, después de haver hecho el trabajo especificado, vuelve y ejecuta la instrucción que siguen a CALL. La traducción de CALL es "LLAMAR A", la instrucción se ejecuta de la siguiente manera: CALL ETIQUETA, Ejemplo:&lt;br /&gt;&lt;br /&gt;CALL DEMORA&lt;br /&gt;CLRF PORTA&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DEMORA&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;RETURN&lt;br /&gt;&lt;br /&gt;En el ejemplo la primera instruccion que se ejecuta es CALL DEMORA, luego el programa va hacia la etiqueta DEMORA, la ejecuta y después de haverla ejecutado vuelve con el RETURN y ejecuta la instrucción CLRF PORTA.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;DECFSZ&lt;/span&gt;&lt;br /&gt;La instrucción DECFSZ sirve para decrementar en 1, el valor de un registro. Acto seguido del decremento la misma instrucción testea si el registro vale cero. Si el registro vale cero, nos saltamos la instrucción que viene debajo de DECFSZ, si el registro no vale cero pues seguimos con la instrucción siguiente. La instrucción DECFSZ quiere decir "Decrement of File Register and Skip if Zero", la traducción sería: DECREMENTO DE REGISTRO Y SALTAR SI ES CERO. Esta instrucción se utiliza de la siguiente manera: DECFSZ REGISTRO,DESTINO. Un ejemplo de como funciona:&lt;br /&gt;&lt;br /&gt;Variable Contador = 1&lt;br /&gt;&lt;br /&gt;DECFSZ CONTADOR,F ; decrementamos 1 a contador, 1-1=0&lt;br /&gt;GOTO INICIO ; Esta instrucción no se ejecuta porque el resultado de la instrucción da 0&lt;br /&gt;GOTO REPETIR ; Esta instrucción si se ejecuta porque nos saltamos la instrucción anterior&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;ADDWF PCL,F&lt;/span&gt;&lt;br /&gt;PCL es un registro que apunta a la siguiente linea de código que estamos ejecutando. El significado de ADDWF es "SUMAR W+F" y se ejecuta de la siguiente manera: ADDWF REGISTRO,DESTINO. La explicación es un poco liosa, por eso vamos a verlo con un ejemplo.&lt;br /&gt;&lt;br /&gt;Supongamos que W la tenemos cargada con el valor 0&lt;br /&gt;&lt;br /&gt;ADDWF PCL,F ; Si sumamos PCL + 0, ejecutamos la instrucción 0&lt;br /&gt;instrucción 0 ;&lt;br /&gt;instrucción 1&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Supongamos que W la tenemos cargada con el valor 01&lt;br /&gt;&lt;br /&gt;ADDWF PCL,F ; Si sumamos PCL + 1, ejecutamos la instrucción 1&lt;br /&gt;instrucción 0 ;&lt;br /&gt;instrucción 1&lt;br /&gt;...&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;RETLW&lt;/span&gt;&lt;br /&gt;RETLW es una instrucción que devuelve un valor a W y acto seguido hace un RETURN que nos devuelve al curso normal del programa, se regresa a la siguiente instrucción después del CALL ETIQUETA. El significado de RETLW es "RETURN LITERAL TO W", que traducido es "DEVUELVE VALOR A W". Vamos a verlo con un pequeño ejemplo:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CALL DATO ;Llamamos a la funció DATO&lt;br /&gt;MOVWF PORTA ;Despues del call tenemos el valor retornado por DATO&lt;br /&gt;..................... ; y lo movemos al PORTA&lt;br /&gt;&lt;br /&gt;DATO&lt;br /&gt;RETLW 0X01 ;Nos dirigimos al sitio de llamada de la función y devolvemos el valor "1" a W&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/F2ZMTq3nXAs&amp;hl=es&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/F2ZMTq3nXAs&amp;hl=es&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);font-family:trebuchet ms;font-size:100%;" &gt;&lt;br /&gt;ESTO ES TODO LO QUE TENIA QUE EXPLICAR, UN SALUDO. CUALQUIER DUDA PREGUNTÁRMELA A TRAVÉS DEL BLOG MEDIANTE EL USO DE UN COMENTARIO, GRACIAS.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8669384304254148461-8141898658108130633?l=jimjim17.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jimjim17.blogspot.com/feeds/8141898658108130633/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8669384304254148461&amp;postID=8141898658108130633' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8669384304254148461/posts/default/8141898658108130633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669384304254148461/posts/default/8141898658108130633'/><link rel='alternate' type='text/html' href='http://jimjim17.blogspot.com/2009/07/segundo-programa-pic_15.html' title='SEGUNDO PROGRAMA PIC'/><author><name>jim17</name><uri>http://www.blogger.com/profile/14798455564467508492</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://bp3.blogger.com/_yvdJ9xGcs2Q/SBIIaKYzkYI/AAAAAAAAAAk/yuzGrftgPek/S220/imagen+022.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8669384304254148461.post-1958118762700910331</id><published>2009-07-03T12:58:00.000-07:00</published><updated>2009-07-16T16:44:00.749-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PIC'/><category scheme='http://www.blogger.com/atom/ns#' term='Programación'/><category scheme='http://www.blogger.com/atom/ns#' term='ASM'/><category scheme='http://www.blogger.com/atom/ns#' term='Electrónica'/><title type='text'>PRIMER PROGRAMA PIC</title><content type='html'>&lt;span style="color: rgb(0, 0, 0); font-family: trebuchet ms;font-size:100%;" &gt;Bueno, hace tiempo que leo artículos y tutoriales sobre la programación en PIC, primero empecé en Basic (haciendo un automatismo), luego empecé a mirarme un poco lo de la programación en C, pero me di cuenta de que no tenia ni idea del funcionamiento real de un PIC y quise investigar un poco más, intentando saber leer los datasheet de los PIC y el significado de las diferentes palabras como registro, buffer, contador de programa, memoria ram, eeprom, etc. Una vez supe el significado de estas palabras empecé a informarme sobre la programación en ASM, un mundo totalmente diferente al C y al Basic. Es por eso que quiero empezar a dedicarle apartados a mi blog sobre éste lenguaje de programación que es de nivel bajo (porque se asemeja mucho al lenguaje máquina de los PIC) No me voy a poner a explicar el significado de las diferentes instrucciones del PIC, sinó que las vamos a ir viendo en ejemplos directos.&lt;/span&gt;&lt;br /&gt;&lt;div class="codeheader"&gt;Código&lt;/div&gt;&lt;pre class="geshi"&gt;&lt;div style="border-bottom: 1px solid gray; margin-bottom: 0.3em;"&gt;GeSHi (asm):&lt;/div&gt;&lt;ol&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;*** Autor: Miguel Angel Borrego Trujillo          ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;*** Titulo: Encender Led               ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;*** Fecha: 25/06/2009        ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;*** PIC 16F84A   4MHZ,XT,CPOFF                    ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;** CONFIGURACION DEL DISPOSITIVO   ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;LIST&lt;/span&gt; &lt;span style="color: rgb(128, 128, 192);"&gt;P&lt;/span&gt;=16f84a   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Seleccionamos el tipo de procesador&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#include&lt;/span&gt; &amp;lt;p16f84a.inc&amp;gt; &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Incluimos el archivo p16f84a&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;__CONFIG _CP_OFF&amp;amp;_PWRTE_ON&amp;amp;_WDT_OFF&amp;amp;_XT_OSC&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;** ESCRITURA DEL PROGRAMA DEL PIC   ***&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;**********************************************************&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;Org&lt;/span&gt; 0x00   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Escribimos en la direccion 0&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;GOTO&lt;/span&gt; MAIN   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Enviamos a Main&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;Org&lt;/span&gt; 0x04   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Vector de interrupcion&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: normal; font-style: normal; font-family: 'Courier New',Courier,monospace; color: black;"&gt;&lt;div style="font-weight: normal; font-family: 'Courier New',Courier,monospace;"&gt;MAIN &lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BSF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;STATUS&lt;/span&gt;,&lt;span style="color: rgb(128, 128, 192);"&gt;RP0&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Seleccionamos el banco 1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li   style="font-weight: normal; font-style: normal;font-family:'Courier New',Courier,monospace;color:black;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;CLRF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;TRISA&lt;/span&gt;   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;PuertoA como salida&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BCF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;STATUS&lt;/span&gt;,&lt;span style="color: rgb(128, 128, 192);"&gt;RP0&lt;/span&gt;  &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Seleccionamos el banco 0&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;span style="color: rgb(51, 0, 204); font-weight: bold;"&gt;BSF&lt;/span&gt; &lt;span style="color: rgb(70, 170, 3); font-weight: bold;"&gt;PORTA&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Ponemos a 1 el bit 0 de portA, RA0&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;GOTO&lt;/span&gt; MAIN   &lt;span style="color: rgb(173, 173, 173); font-style: italic;"&gt;;Generamos un bucle&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li face="'Courier New',Courier,monospace" color="black" style="font-weight: normal; font-style: normal;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;END&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);font-family:trebuchet ms;" &gt;&lt;br /&gt;&lt;br /&gt;Empezamos analizando el código por líneas:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;LIST P=16f84a&lt;/span&gt;&lt;br /&gt;Sirve para decirle al compilador que estamos utilizando un cierto pic, concretamente el PIC16F84A.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;#include &lt;16f84a.inc&gt;&lt;/span&gt;&lt;br /&gt;En una de las carpetas de instalacion del compilador existe éste archivo 16f84a.inc en el cual se especifican las direcciones de las diferentes instrucciones del PIC que vamos a programar. Por ejemplo la direccion del registro STATUS es 0x03 (la x se pone porque es un número hexadecimal) entonces si no incluyes el archivo 16f84a.inc tienes que utilizar la dirección 0x03 cada vez que quieras referirte al registro STATUS, pero si incluyes este archivo, poniendo la palabra STATUS el programa al compilar ya te cambia la palabra por la dirección 0x03. Esto lo veremos unas lineas hacia abajo.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;__CONFIG _CP_OFF&amp;_PWRTE_ON&amp;_WDT_OFF&amp;_XT_OSC&lt;/span&gt;&lt;br /&gt;Estas lineas de código sirven para editar la configuración del PIC.&lt;br /&gt;_CP_OFF, La protección de código queda desactivada y qualquier persona puede leer nuestro código.&lt;br /&gt;&lt;br /&gt;_PWRTE_ON, El micro espera un pequeño tiempo para que se estabilize la alimentación, se llama el POWER UP TIMER, que es un temporizador de encendido, se activa cuando se enciende el pic. No ejecuta ninguna instrucción del programa hasta que el temporizador está parado.&lt;br /&gt;&lt;br /&gt;_WDT_OFF, El perro guardián queda desactivado, (Watchdog timer apagado) el WDT sirve para resetear el micro en caso de que éste se bloquee.&lt;br /&gt;&lt;br /&gt;_XT_OSC, Con esta instrucción le indicamos al micro que para el oscilador usaremos una configuracion de Cristal de cuarzo + condensadores.&lt;br /&gt;&lt;br /&gt;Org 0x00&lt;br /&gt;Cuando en el micro se produce un reset, ya sea por fallo de alimentación, master clear reset pin o otros... El programa empieza en esta dirección.&lt;br /&gt;&lt;br /&gt;MAIN es una etiqueta.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;BSF STATUS,RP0&lt;/span&gt;&lt;br /&gt;En esta instrucción lo que hacemos es poner un "1" en el bit 5 del registro STATUS, el bit 5 es sustituido por la palabra RP0. Al poner un 1 en ese bit, seleccionamos el banco 1, donde se encuentra el registro TRISA y TRISB que sirven para configurar los pines de los puertos PORTA y PORTB como entradas o como salidas. El significado de BSF es BIT SET FILE REGISTER, que traducido es ACTIVAR BIT DE REGISTRO. Esta instrucción la deberemos ejecutar de la siguiente manera, BSF REGISTRO,BIT.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;CLRF TRISA&lt;/span&gt;&lt;br /&gt;Esta instruccion sirve para borrar un registro. En este caso estamos poniendo a 0 todos los bits del registro TRISA y de esta manera todos los pines del PUERTOA, quedan configurados como salidas. El significado de CLRF es CLEAR FILE REGISTER, que traducido es BORRAR REGISTRO. Esta instrucción la deberemos ejecutar de la siguiente manera, CLRF REGISTRO.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;BCF STATUS,RP0&lt;/span&gt;&lt;br /&gt;Igual que en la instrucción anterior, con BCF STATUS,RP0 lo que hacemos es borrar el bit 5 del registro STATUS para situarnos en el banco 0 y así poder trabajar con los pines del puerto A. El significado de BCF es BIT CLEAR FILE REGISTER, que traducido es DESACTIVAR BIT DE REGISTRO. Esta instrucción la deberemos ejecutar de la siguiente manera, BCF REGISTRO,BIT&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;BSF PORTA,0&lt;/span&gt;&lt;br /&gt;Una vez situados en el banco 0 podemos trabajar con los pines del puerto A. En esta instrucción introducimos un "1" en el pin0 del puerto A y de esta manera el pin0 del puerto A, en el que previamente hemos introducido un led con su resistencia, queda encendido y lo podemos visualizar a traves del led.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;GOTO MAIN&lt;/span&gt;&lt;br /&gt;De aquí viene la importancia de las etiquetas, con la instrucción GOTO MAIN lo que hacemos es que cada vez que el programa llegue a esta instrucción vaya directamente hacia la posición de MAIN y repita el programa otra vez, asi el LED queda siempre encendido. La instrucción GOTO traducido significa IR A, ir a una posición.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;END&lt;/span&gt;&lt;br /&gt;Con esta instrucción le indicamos al compilador que ha finalizado el programa, esta instrucción siempre se debe situar al final del programa ya que el compilador a partir de aquí no compila ninguna instrucción más.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8669384304254148461-1958118762700910331?l=jimjim17.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jimjim17.blogspot.com/feeds/1958118762700910331/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8669384304254148461&amp;postID=1958118762700910331' title='1 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8669384304254148461/posts/default/1958118762700910331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669384304254148461/posts/default/1958118762700910331'/><link rel='alternate' type='text/html' href='http://jimjim17.blogspot.com/2009/07/primer-programa-pic.html' title='PRIMER PROGRAMA PIC'/><author><name>jim17</name><uri>http://www.blogger.com/profile/14798455564467508492</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://bp3.blogger.com/_yvdJ9xGcs2Q/SBIIaKYzkYI/AAAAAAAAAAk/yuzGrftgPek/S220/imagen+022.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8669384304254148461.post-2618235905819947250</id><published>2008-05-24T12:55:00.000-07:00</published><updated>2008-05-24T13:14:01.967-07:00</updated><title type='text'></title><content type='html'>Bé, avui toca renovar el blog per diversos motius.&lt;br /&gt;&lt;br /&gt;1) Ja he acabat el batxillerat !!!! si, si, ! És una sensació que no es pot explicar, no és com aprovar l'ESO, sinó que és diferent, ja fa dies que sabia que havia passat però encara que ho sabès, és mes gratificant que et donguin les notes i tu mateix pensis ( has passat, siiIII !!! ).&lt;br /&gt;&lt;br /&gt;2) Sembla mentida com és el món, un món capitalista en el qual la cosa més important és la pasta, la pasta gansa, els diners (encara que per mi no ho sigui) i això per què ho dic ? Simplement ho dic per que  després de rebre les notes ens van dir que havíem de pagar "X" per tenir el títol de batxillerat, amb això vaig pensar: si una persona no tingués aquests "X" diners, no podria treure's el títol de batxillerat ? Significaria això tot un any perdut ?&lt;br /&gt;&lt;br /&gt;3) Avui he deixat de banda el llibre "Mi Lucha" (un llibre massa agoviant que et bombardeja amb informacions feixistes, nacionalistes, racistes i falses), i he començat amb un altre que es diu "Las atrocidades de la Gestapo".&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4) Rollers Girona !!!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;##Jim17##&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8669384304254148461-2618235905819947250?l=jimjim17.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jimjim17.blogspot.com/feeds/2618235905819947250/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8669384304254148461&amp;postID=2618235905819947250' title='2 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8669384304254148461/posts/default/2618235905819947250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669384304254148461/posts/default/2618235905819947250'/><link rel='alternate' type='text/html' href='http://jimjim17.blogspot.com/2008/05/b-avui-toca-renovar-el-blog-per.html' title=''/><author><name>jim17</name><uri>http://www.blogger.com/profile/14798455564467508492</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://bp3.blogger.com/_yvdJ9xGcs2Q/SBIIaKYzkYI/AAAAAAAAAAk/yuzGrftgPek/S220/imagen+022.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8669384304254148461.post-5593076147272740278</id><published>2008-04-29T14:39:00.000-07:00</published><updated>2008-04-29T15:14:34.486-07:00</updated><title type='text'>Un Pensament</title><content type='html'>Bé doncs, avui tocava fer una nova entrada al blog, per "mantenirlo", que és el que costa més segons diuen alguns.... no sé ..... ja veurem :).&lt;br /&gt;&lt;br /&gt;Ja queda menys per arribar els examens, i personalment no es que estigui nerviós, però hi ha una dualitat de idees al meu pensament.&lt;br /&gt;&lt;br /&gt;Per una banda tinc ganes de començar a fer examens i oblidarme del "batxillerat" per que, realment, no serveix per res. I així poder centrarme realment en el que m'agrada (l'electrònica !! O.o), i no en les assignatures penoses que es fan a batxillerat que al final no t'acaben servint per res com per exemple --&gt; Filosofia. (Definitivament Nietszche ha matat el poc interès que tenia per la filosofia, simplement, crec que no en té ni ideia) No vull argumentar l'inutilitat de la filosofia perquè de les poques coses que he après en aquesta assignatura, una d'elles és la de no haver d'argumentar les pròpies idees, simplement les has de deixar anar.&lt;br /&gt;&lt;br /&gt;Per una altre banda, no tinc ganes de que s'acabin els examens ja que això implicaria el veure poc a algunes persones, persones importants per a un mateix, o poc importants, però al cap i a la fi són aquelles persones que et fan el dia a dia, les veus sempre a clase i si més no, sempre les acabes anyorant.&lt;br /&gt;&lt;br /&gt;##Jim17##&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8669384304254148461-5593076147272740278?l=jimjim17.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jimjim17.blogspot.com/feeds/5593076147272740278/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8669384304254148461&amp;postID=5593076147272740278' title='2 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8669384304254148461/posts/default/5593076147272740278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669384304254148461/posts/default/5593076147272740278'/><link rel='alternate' type='text/html' href='http://jimjim17.blogspot.com/2008/04/b-doncs-avui-tocava-fer-una-nova.html' title='Un Pensament'/><author><name>jim17</name><uri>http://www.blogger.com/profile/14798455564467508492</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://bp3.blogger.com/_yvdJ9xGcs2Q/SBIIaKYzkYI/AAAAAAAAAAk/yuzGrftgPek/S220/imagen+022.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8669384304254148461.post-3551121428667902448</id><published>2008-04-25T07:33:00.001-07:00</published><updated>2008-04-25T07:51:53.937-07:00</updated><title type='text'>Primera Entrada al Blog !!</title><content type='html'>Bé doncs aquest és el primer post que faig al blog i he decidit que el primer post seria avui dia 25 d'Abril de 2008 perque avui és el primer dia d'inici d'una vida nova, d'una vida millor, l'inici d'un primer contacte amb la vida universitaria, en definitiva ... El dia de Portes Obertes a la UdG.&lt;br /&gt;&lt;br /&gt;A les 9:00 del matí havíem de ser allà a les instal·lacions de la UdG, concretament davant de la facultat de ciències. Potser per algunes persones aquest dia no ha sigut important o simplement els ha sigut un dia més, però per mi ha sigut un dia especial, un primer contacte amb el món universitari i amb les sensacions d'estar en una universitat.&lt;br /&gt;&lt;br /&gt;A les 9:30 hem entrat a l'aula 04B de l'escola politècnica superior II, (si II per que hi ha 4 edificis que pertanyen a l'escola politècnica superior). Cal dir que la perona que ens feia la presentació de ETI especialitzat en electrònica industrial no s'ho ha currat massa, i fins i tot, et podia desmotivar a l'hora de poder triar aquesta enginyeria, però al cap i a la fi un ha de tenir clar el que vol fer i jo personalment vull fer electrònica i encara que la persona que fa la presentació de l'enginyeria no s'ho curri no influirà pas en els meus pensaments. Desprès de que aquesta persona ens hagi "explicat" de què va la cosa hem fet una minivisita per els laboratoris de pràctiques i, per sort, aquesta visita ens l'ha fet una altre persona, que personalment, motivava a la gent a fer aquesta carrera.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Aquest blog sera un blog on hi escriuré el que jo vulgui i també experiències que tinguin a veure amb l'electrònica.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I ara mateix estic a casa assegut a l'ordinador intentant fer la primera entrada del blog que n'opineu ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8669384304254148461-3551121428667902448?l=jimjim17.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jimjim17.blogspot.com/feeds/3551121428667902448/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8669384304254148461&amp;postID=3551121428667902448' title='21 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8669384304254148461/posts/default/3551121428667902448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669384304254148461/posts/default/3551121428667902448'/><link rel='alternate' type='text/html' href='http://jimjim17.blogspot.com/2008/04/primera-entrada-al-blog.html' title='Primera Entrada al Blog !!'/><author><name>jim17</name><uri>http://www.blogger.com/profile/14798455564467508492</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://bp3.blogger.com/_yvdJ9xGcs2Q/SBIIaKYzkYI/AAAAAAAAAAk/yuzGrftgPek/S220/imagen+022.jpg'/></author><thr:total>21</thr:total></entry></feed>
