Cirrus-logic AN118 Manuel d'utilisateur Page 30

  • 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 29
AN118
30 AN118REV2
;****************************************************************
;* Routine - TXSER
;* Input - Byte to be transmitted is placed in R7
;* Output - None
;* Description - This subroutine transfers 1 byte from converter
;* via UART. It uses the RS-232 serial protocol to transmit
;* one byte from a 80C51 to the PC/UART system. To
;* function properly, the programmer must first initialize the
;* TI bit in the SCON register to 0X01.
;****************************************************************
;The function prototype is: void TXSER(char);
$DEBUG
USING 0 ; Use register bank 0
TCOD SEGMENT CODE ; Define TCOD as a segment of code
PUBLIC _TXSER ; Make subroutine global
RSEG TCOD ; Make code relocatable
_TXSER: JNB SCON.1,$ ; Poll TI
CLR SCON.1 ; Reset TI
MOV SBUF, R7 ; Move byte to output register
RET ; Exit subroutine
END
Vue de la page 29
1 2 ... 25 26 27 28 29 30 31 32

Commentaires sur ces manuels

Pas de commentaire