SlideShare uma empresa Scribd logo
1 de 3
;***********************************************
;***RECEPCIÓN DE UN BYTE MEDIANTE USART***
;***********************************************

           LIST P=16F873
           INCLUDE    P16F873.INC

W_TEMP            EQU         20H
STATUS_TEMP       EQU         21H
DATOB             EQU         22H

           ORG          00H
           GOTO         INICIO
           ORG          04H
           GOTO         INTER

INTERBCF   INTCON,7
           movwf        W_TEMP
           swapf        W_TEMP,1
           movf         STATUS,0
           movwf        STATUS_TEMP
           BTFSS        PIR1,RCIF
           GOTO         VOLVER
           MOVF         RCREG,0
           MOVWF        DATOB
           MOVF         DATOB,0
           MOVWF        PORTB
           BCF          PIR1,RCIF
VOLVER     movf         STATUS_TEMP,0
           movwf        STATUS
           swapf        W_TEMP,0
           BSF          INTCON,7
           RETFIE

INICIO     CLRWDT
           CLRF         PORTB
           CLRF         PORTC
           BSF          STATUS,5
           BCF          STATUS,6
           MOVLW        B'00000000'
           MOVWF        TRISB
           MOVLW        B'10111111'
           MOVWF        TRISC
MOVLW     B'00100100'
          MOVWF     TXSTA
          MOVLW     D'25'
          MOVWF     SPBRG
          BSF       PIE1,RCIE
          BCF       STATUS,5
          BCF       STATUS,6
          MOVLW     B'10010000'
          MOVWF     RCSTA
          MOVLW     B'11000000'
          MOVWF     INTCON

BUCLE     CLRWDT
          GOTO      BUCLE
          END


;*******************************************
;***TRANSMISIÓN DE UN BYTE MEDIANTE USART***
;*******************************************

          LIST      P=16F873
          INCLUDE   P16F873.INC

DATOB     EQU       20H


          ORG       00H
          GOTO      INICIO
          ORG       04H
          RETFIE

INICIO
          BSF       STATUS,6
          BSF       STATUS,5
          MOVLW     B'11111111'
          MOVWF     TRISB
          BCF       STATUS,6
          MOVLW     B'10000000'
          MOVWF     TRISC
PASO1
          BCF       STATUS,6
          BCF       STATUS,5
MOVF     PORTB,0
         MOVWF    DATOB
         CALL     ENVIAR_DATO
         GOTO     PASO1

ENVIAR_DATO
         BCF      STATUS,6
         BSF      STATUS,5
         MOVLW    B'00100110'
         MOVWF    TXSTA
         MOVLW    D'25'
         MOVWF    SPBRG
         BCF      STATUS,5 ;Banco0
         BSF      RCSTA,7     ;SPEN=1 ON USART
         MOVF     DATOB,0
         MOVWF    TXREG

ESPERA   BTFSS    PIR1,4
         GOTO     ESPERA
         RETURN

         END

Mais conteúdo relacionado

Mais de Luis Zurita

TALLER NORMAS APA
TALLER NORMAS APATALLER NORMAS APA
TALLER NORMAS APALuis Zurita
 
PROTOCOLO MODBUS
PROTOCOLO MODBUSPROTOCOLO MODBUS
PROTOCOLO MODBUSLuis Zurita
 
Guía rápidalcd y teclado
Guía rápidalcd y tecladoGuía rápidalcd y teclado
Guía rápidalcd y tecladoLuis Zurita
 
Grupos micro2 13
Grupos micro2 13Grupos micro2 13
Grupos micro2 13Luis Zurita
 
Manejo de perifericos para microcontroladore
Manejo de perifericos para microcontroladoreManejo de perifericos para microcontroladore
Manejo de perifericos para microcontroladoreLuis Zurita
 
Notas def electronica
Notas def electronicaNotas def electronica
Notas def electronicaLuis Zurita
 
Notas proyecto3 iyc
Notas proyecto3 iycNotas proyecto3 iyc
Notas proyecto3 iycLuis Zurita
 
Notas definitivas iyc2013
Notas definitivas iyc2013Notas definitivas iyc2013
Notas definitivas iyc2013Luis Zurita
 
Proyecto 2 electronica
Proyecto 2 electronicaProyecto 2 electronica
Proyecto 2 electronicaLuis Zurita
 

Mais de Luis Zurita (20)

TALLER NORMAS APA
TALLER NORMAS APATALLER NORMAS APA
TALLER NORMAS APA
 
PROTOCOLO MODBUS
PROTOCOLO MODBUSPROTOCOLO MODBUS
PROTOCOLO MODBUS
 
Guía rápidalcd y teclado
Guía rápidalcd y tecladoGuía rápidalcd y teclado
Guía rápidalcd y teclado
 
Pevmicroi ieo
Pevmicroi ieoPevmicroi ieo
Pevmicroi ieo
 
Pevmicroii13 2
Pevmicroii13 2Pevmicroii13 2
Pevmicroii13 2
 
Pevmicro1 t2 13
Pevmicro1 t2 13Pevmicro1 t2 13
Pevmicro1 t2 13
 
Pev electronica
Pev electronicaPev electronica
Pev electronica
 
Grupos micro2 13
Grupos micro2 13Grupos micro2 13
Grupos micro2 13
 
Pevmicro1 t2 13
Pevmicro1 t2 13Pevmicro1 t2 13
Pevmicro1 t2 13
 
Micro2 tema 5
Micro2 tema 5Micro2 tema 5
Micro2 tema 5
 
Micro2 tema 4
Micro2 tema 4Micro2 tema 4
Micro2 tema 4
 
Micro2 tema 3
Micro2 tema 3Micro2 tema 3
Micro2 tema 3
 
Micro2 tema 2
Micro2 tema 2Micro2 tema 2
Micro2 tema 2
 
Micro2 tema 1
Micro2 tema 1Micro2 tema 1
Micro2 tema 1
 
Manejo de perifericos para microcontroladore
Manejo de perifericos para microcontroladoreManejo de perifericos para microcontroladore
Manejo de perifericos para microcontroladore
 
Pevmicroii13 2
Pevmicroii13 2Pevmicroii13 2
Pevmicroii13 2
 
Notas def electronica
Notas def electronicaNotas def electronica
Notas def electronica
 
Notas proyecto3 iyc
Notas proyecto3 iycNotas proyecto3 iyc
Notas proyecto3 iyc
 
Notas definitivas iyc2013
Notas definitivas iyc2013Notas definitivas iyc2013
Notas definitivas iyc2013
 
Proyecto 2 electronica
Proyecto 2 electronicaProyecto 2 electronica
Proyecto 2 electronica
 

Último

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Rx Tx Microii

  • 1. ;*********************************************** ;***RECEPCIÓN DE UN BYTE MEDIANTE USART*** ;*********************************************** LIST P=16F873 INCLUDE P16F873.INC W_TEMP EQU 20H STATUS_TEMP EQU 21H DATOB EQU 22H ORG 00H GOTO INICIO ORG 04H GOTO INTER INTERBCF INTCON,7 movwf W_TEMP swapf W_TEMP,1 movf STATUS,0 movwf STATUS_TEMP BTFSS PIR1,RCIF GOTO VOLVER MOVF RCREG,0 MOVWF DATOB MOVF DATOB,0 MOVWF PORTB BCF PIR1,RCIF VOLVER movf STATUS_TEMP,0 movwf STATUS swapf W_TEMP,0 BSF INTCON,7 RETFIE INICIO CLRWDT CLRF PORTB CLRF PORTC BSF STATUS,5 BCF STATUS,6 MOVLW B'00000000' MOVWF TRISB MOVLW B'10111111' MOVWF TRISC
  • 2. MOVLW B'00100100' MOVWF TXSTA MOVLW D'25' MOVWF SPBRG BSF PIE1,RCIE BCF STATUS,5 BCF STATUS,6 MOVLW B'10010000' MOVWF RCSTA MOVLW B'11000000' MOVWF INTCON BUCLE CLRWDT GOTO BUCLE END ;******************************************* ;***TRANSMISIÓN DE UN BYTE MEDIANTE USART*** ;******************************************* LIST P=16F873 INCLUDE P16F873.INC DATOB EQU 20H ORG 00H GOTO INICIO ORG 04H RETFIE INICIO BSF STATUS,6 BSF STATUS,5 MOVLW B'11111111' MOVWF TRISB BCF STATUS,6 MOVLW B'10000000' MOVWF TRISC PASO1 BCF STATUS,6 BCF STATUS,5
  • 3. MOVF PORTB,0 MOVWF DATOB CALL ENVIAR_DATO GOTO PASO1 ENVIAR_DATO BCF STATUS,6 BSF STATUS,5 MOVLW B'00100110' MOVWF TXSTA MOVLW D'25' MOVWF SPBRG BCF STATUS,5 ;Banco0 BSF RCSTA,7 ;SPEN=1 ON USART MOVF DATOB,0 MOVWF TXREG ESPERA BTFSS PIR1,4 GOTO ESPERA RETURN END