Cirrus-logic AN118 Manual do Utilizador Página 30

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

Comentários a estes Manuais

Sem comentários