hi all,
some questions.
1)what is the higher clock frequency that i can give to Uart serial communication? If i have DCO at 24Mhz, can i set it?
2)If i have smclk at 12Mhz, the baud rate is fixed to 9600? Can i change baudrate without change clock?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
hi all,
some questions.
1)what is the higher clock frequency that i can give to Uart serial communication? If i have DCO at 24Mhz, can i set it?
2)If i have smclk at 12Mhz, the baud rate is fixed to 9600? Can i change baudrate without change clock?
Ok thanks for the explanation. Another question:
If my uart clock is set to 12Mhz (SMCLK), reading the table i can choose different baud rate changing parameters.
1)Different baud rate change only the communication speed right?
2)If i want baudrate = 38400 i have (from table): UCOS16=1, UCBRx=19, UCBRFx=8, UCBRSx=0x65. Is it correct write as the code written below?
// Configure UART (...) UCA0CTLW0 |= UCSSEL__SMCLK; // 12Mhz UCA0BR0 = 19; // 12000000/16/38400 UCA0BR1 = 0x00; UCA0MCTLW = 0x6500 | UCOS16 | 0x0080; (...)
Hi Luca!
Luca Palombella said:Different baud rate change only the communication speed right?
Yes, that is right.
Luca Palombella said:If i want baudrate = 38400
I did not test it, but from these tables...
...I would say it is:
UCA0BRW = 19; // Same as UCA0BR0 = 19; and UCA0BR1 = 0; UCA0MCTLW = (0x6500 | 0x0080 | UCOS16);
Same as yours.
Dennis
**Attention** This is a public forum