BiPOM Forum

General => Micro-IDE => Topic started by: jeab. on June 14, 2004, 05:07:07 am

Title: Serial Initialization
Post by: jeab. on June 14, 2004, 05:07:07 am
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,
Title: Re: Serial Initialization
Post by: vitaliy on June 16, 2004, 09:42:10 am
serinit(9600);     /* initialize serial port */
TH1 = 0xFF;      /* baud rate = 22118400/384/(256-TH1) = 57600 */
PCON |=0x80;   /* baud rate = baud rate x 2 = 115200 */  
Title: Re: Serial Initialization
Post by: jeab. on June 16, 2004, 10:30:36 am
thank\'s
:D