General > Micro-IDE
Serial Initialization
(1/1)
jeab.:
Hi,
As I saw in the examples provided by BiPOM (project "serial"), a function still exists to initialize serial port : "serinit".
/* Set the serial port to 9600 Baud */
/* ( This sets it to 19200 baud on the MINI-MAX/51-C ) */
serinit(9600);
This really establishes the serial communication to 19200 baud.
I\'d to set my serial port to 115200 baud. Which parameter may I use with the function "serinit" ? serinit (57600) seems to do not work.
Thank\'s for your answer,
vitaliy:
serinit(9600); /* initialize serial port */
TH1 = 0xFF; /* baud rate = 22118400/384/(256-TH1) = 57600 */
PCON |=0x80; /* baud rate = baud rate x 2 = 115200 */
jeab.:
thank\'s
:D
Navigation
[0] Message Index
Go to full version