Hi antony1,
It might be easier if we back up and try to determine what your goal here is with the USART
1) do you need sync or async comms
2) what is the size of data that you need to send
3) what are your time constraints
4) is this pic to pic / pic to computer
yada yada ... you get the idea.
As Nigel said, just read the table, once you have
selected the relevant baud rate that is required; that will give you SPBRG.
I am not familiar with the CC5X compiler, does it have a USART sample that can be used as a basis?
For what it's worth,
(as an example) I am including the initialisation that I am using in one of my projects at the moment (16f877, 19.2k Baud)
Code:
SPBRG=12;
BRGH=1; // high data rate for sending
SYNC=0; //asynchronous
SPEN=1; //enable serial port pins
CREN=1; //enable reception
TXIE=0; //disable tx interrupts
RCIE=1; //enable rx interrupts
TX9=0; //8-bit transmission
RX9=0; //8-bit reception
TXEN=0; //reset transmitter
TXEN=1; //enable the transmitter
You will need to cross reference the relevant bits with the datasheet to construct your initialisation bit string.