Cirrus-logic AN118 Manual do Utilizador Página 29

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 32
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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 página 28
1 2 ... 24 25 26 27 28 29 30 31 32

Comentários a estes Manuais

Sem comentários