USART_init

Description

initalise USART hardware

Definition

USART_init(uint baud_rate)

Library

LIB/usart_lib.bas

Usage

On entry:
baud_rate is the hardware baud rate generator setting.
bit 8 is the value to be written to the BRGH bit of the TXSTA hardware register
bits 0..7 is the value to be written to the SPBRG hardware register

NOTE: valid baud_rate values are automatically generated and based on CPU_FOSC

BAUD_RATE_300
BAUD_RATE_1200
BAUD_RATE_2400
BAUD_RATE_4800
BAUD_RATE_7200
BAUD_RATE_9600
BAUD_RATE_19200
BAUD_RATE_38400
BAUD_RATE_76800
BAUD_RATE_153600
On exit:
There is no return value