Author Topic: Serial Initialization  (Read 11852 times)

jeab.

  • Guest
Serial Initialization
« 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,

vitaliy

  • Full Member
  • ***
  • Posts: 30
    • View Profile
Re: Serial Initialization
« Reply #1 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 */  

jeab.

  • Guest
Re: Serial Initialization
« Reply #2 on: June 16, 2004, 10:30:36 am »
thank\'s
:D