SlideShare a Scribd company logo
1 of 3
LIST P=16F84A
INCLUDE<P16F84A.INC>
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC
CBLOCK 0X0C
ENDC
#DEFINE LED1 PORTB,0
#DEFINE LED2 PORTB,1
#DEFINE LED3 PORTB,2
#DEFINE LED4 PORTB,3
#DEFINE LED5 PORTB,4
#DEFINE LED6 PORTB,5
#DEFINE SELECTOR_1 PORTA,0
#DEFINE SELECTOR_2 PORTA,1
ORG 0
INICIO
BSF STATUS,5; ir al banco
BCF LED1 ; salida poniendo a cero
BCF LED2
BCF LED3
BCF LED4
BCF LED5
BCF LED6
BSF SELECTOR_1
BSF SELECTOR_2
BCF STATUS,5 ; volver al banco 0
CLRF PORTB ;limpiar el puertoB
PRINCIPAL
CALL Retardo_10ms
BTFSC SELECTOR_1 ; posicion del selector
GOTO PRINCIPAL
LAZO MOVF PORTA,W ; se toma el valor del puerto
ANDLW B'00000011' ; filtra los dos valores
ADDWF PCL,F ; suma con el PCL y se obtine la pos tabla
TABLA GOTO MINIMO
GOTO LAZO
GOTO MAXIMO
GOTO LAZO
MINIMO
CALL INYECTOR_1
CALL Retardo_1s
CALL INYECTOR_5
CALL Retardo_1s
CALL INYECTOR_3
CALL Retardo_1s
CALL INYECTOR_6
CALL Retardo_1s
CALL INYECTOR_2
CALL Retardo_1s
CALL INYECTOR_4
CALL Retardo_1s
GOTO PRINCIPAL
MAXIMO
CALL INYECTOR_1
CALL Retardo_100ms
CALL INYECTOR_5
CALL Retardo_100ms
CALL INYECTOR_3
CALL Retardo_100ms
CALL INYECTOR_6
CALL Retardo_100ms
CALL INYECTOR_2
CALL Retardo_100ms
CALL INYECTOR_4
CALL Retardo_100ms
GOTO PRINCIPAL
INYECTOR_1
BSF LED1
BCF LED2
BCF LED3
BCF LED4
BCF LED5
BCF LED6
RETURN
INYECTOR_2
BCF LED1
BSF LED2
BCF LED3
BCF LED4
BCF LED5
BCF LED6
RETURN
INYECTOR_3
BCF LED1
BCF LED2
BSF LED3
BCF LED4
BCF LED5
BCF LED6
RETURN
INYECTOR_4
BCF LED1
BCF LED2
BCF LED3
BSF LED4
BCF LED5
BCF LED6
RETURN
INYECTOR_5
BCF LED1
BCF LED2
BCF LED3
BCF LED4
BSF LED5
BCF LED6
RETURN
INYECTOR_6
BCF LED1
BCF LED2
BCF LED3
BCF LED4
BCF LED5
BSF LED6
RETURN
INCLUDE <RETARDOS.INC>
END

More Related Content

Similar to Codigo 6leds

Similar to Codigo 6leds (7)

Rx Tx Microii
Rx Tx MicroiiRx Tx Microii
Rx Tx Microii
 
Transmisor
TransmisorTransmisor
Transmisor
 
Lec14
Lec14Lec14
Lec14
 
Ejercicios usart
Ejercicios usartEjercicios usart
Ejercicios usart
 
22 Microcontroller Programs
22 Microcontroller Programs22 Microcontroller Programs
22 Microcontroller Programs
 
Lec12
Lec12Lec12
Lec12
 
Keypad interfacing
Keypad interfacingKeypad interfacing
Keypad interfacing
 

More from George Garriazo Quispe

More from George Garriazo Quispe (8)

Engranajes helicoidales ing.jose-bustamante-__16094__elementos de mauinas
Engranajes helicoidales ing.jose-bustamante-__16094__elementos de mauinasEngranajes helicoidales ing.jose-bustamante-__16094__elementos de mauinas
Engranajes helicoidales ing.jose-bustamante-__16094__elementos de mauinas
 
Ppt diseño de talleres 1
Ppt diseño de talleres 1Ppt diseño de talleres 1
Ppt diseño de talleres 1
 
Ppt diseño de talleres 1
Ppt diseño de talleres 1Ppt diseño de talleres 1
Ppt diseño de talleres 1
 
diamante-de-porter
diamante-de-porterdiamante-de-porter
diamante-de-porter
 
Lab. ensayo resistencia de materiales utp
Lab. ensayo resistencia de materiales utpLab. ensayo resistencia de materiales utp
Lab. ensayo resistencia de materiales utp
 
Guia de laboratorio_3_electronica_de_potencia_i
Guia de laboratorio_3_electronica_de_potencia_iGuia de laboratorio_3_electronica_de_potencia_i
Guia de laboratorio_3_electronica_de_potencia_i
 
Ferzas de de mercado
Ferzas de de mercadoFerzas de de mercado
Ferzas de de mercado
 
Examen fisica bimestral
Examen fisica bimestralExamen fisica bimestral
Examen fisica bimestral
 

Recently uploaded

OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 

Recently uploaded (20)

OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 

Codigo 6leds

  • 1. LIST P=16F84A INCLUDE<P16F84A.INC> __CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC CBLOCK 0X0C ENDC #DEFINE LED1 PORTB,0 #DEFINE LED2 PORTB,1 #DEFINE LED3 PORTB,2 #DEFINE LED4 PORTB,3 #DEFINE LED5 PORTB,4 #DEFINE LED6 PORTB,5 #DEFINE SELECTOR_1 PORTA,0 #DEFINE SELECTOR_2 PORTA,1 ORG 0 INICIO BSF STATUS,5; ir al banco BCF LED1 ; salida poniendo a cero BCF LED2 BCF LED3 BCF LED4 BCF LED5 BCF LED6 BSF SELECTOR_1 BSF SELECTOR_2 BCF STATUS,5 ; volver al banco 0 CLRF PORTB ;limpiar el puertoB PRINCIPAL CALL Retardo_10ms BTFSC SELECTOR_1 ; posicion del selector GOTO PRINCIPAL LAZO MOVF PORTA,W ; se toma el valor del puerto ANDLW B'00000011' ; filtra los dos valores ADDWF PCL,F ; suma con el PCL y se obtine la pos tabla TABLA GOTO MINIMO GOTO LAZO GOTO MAXIMO GOTO LAZO MINIMO CALL INYECTOR_1 CALL Retardo_1s
  • 2. CALL INYECTOR_5 CALL Retardo_1s CALL INYECTOR_3 CALL Retardo_1s CALL INYECTOR_6 CALL Retardo_1s CALL INYECTOR_2 CALL Retardo_1s CALL INYECTOR_4 CALL Retardo_1s GOTO PRINCIPAL MAXIMO CALL INYECTOR_1 CALL Retardo_100ms CALL INYECTOR_5 CALL Retardo_100ms CALL INYECTOR_3 CALL Retardo_100ms CALL INYECTOR_6 CALL Retardo_100ms CALL INYECTOR_2 CALL Retardo_100ms CALL INYECTOR_4 CALL Retardo_100ms GOTO PRINCIPAL INYECTOR_1 BSF LED1 BCF LED2 BCF LED3 BCF LED4 BCF LED5 BCF LED6 RETURN INYECTOR_2 BCF LED1 BSF LED2 BCF LED3 BCF LED4 BCF LED5 BCF LED6 RETURN INYECTOR_3 BCF LED1 BCF LED2 BSF LED3 BCF LED4 BCF LED5
  • 3. BCF LED6 RETURN INYECTOR_4 BCF LED1 BCF LED2 BCF LED3 BSF LED4 BCF LED5 BCF LED6 RETURN INYECTOR_5 BCF LED1 BCF LED2 BCF LED3 BCF LED4 BSF LED5 BCF LED6 RETURN INYECTOR_6 BCF LED1 BCF LED2 BCF LED3 BCF LED4 BCF LED5 BSF LED6 RETURN INCLUDE <RETARDOS.INC> END