Cirrus-logic AN118 Manuel d'utilisateur Page 29

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 32
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 28
AN118
AN118REV2 29
;****************************************************************
;* Routine - RXSER
;* Input - none
;* Output - Byte received is placed in R7
;* Description - This subroutine receives 1 byte from converter
;* via UART. It uses the RS-232 serial protocol to transmit
;* one byte from a PC/UART system to the 8051.
;****************************************************************
; The function prototype is: char RXSER(void);
$DEBUG
USING 0 ; Use register bank 0
TCOD SEGMENT CODE ; Define ROUT as a segment of code
PUBLIC RXSER ; Make subroutine global
RSEG TCOD ; Make code relocatable
RXSER:
JNB SCON.0,$ ; Poll RI
MOV R7,SBUF ; Place received byte in R7
CLR SCON.0 ; Reset RI bit
RET
END
Vue de la page 28
1 2 ... 24 25 26 27 28 29 30 31 32

Commentaires sur ces manuels

Pas de commentaire