Cirrus-logic AN118 Manual de usuario Pagina 29

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 32
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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
Vista de pagina 28
1 2 ... 24 25 26 27 28 29 30 31 32

Comentarios a estos manuales

Sin comentarios