Serial Communication at 230400 baud rate

I am creating a DLL for serial communication using VC6.0. I can achieve communication with baud rates up to 115200 using the CBR_115200 constant in WINBASE.h. I need 230400 but it does not exist and MSDN does not support 230400, it jumps from 115200 to 256000. I have tried adding CBR_230400 to WINBASE.h with no success, can any provide any information for using Microsoft's serial functions (DCB) with 230400 baud rate have tried CBR_256000 with device set to its max of 230400 -- didn't work. Max baud rate on serial device is 230400, so 256000 didn't work.


Why would Microsoft design Hyperterminal with 230400 and WINBASE.h without it



pelase help.



Answer this question

Serial Communication at 230400 baud rate

  • MikeL.

    Since you had not specified your system configuration, I pointed you to two links one of which was on Windows XP as well.

    The link quotes
    " The simplest way to determine what baud rates are available on a particular serial port is to call the GetCommProperties() application programming interface (API) and examine the COMMPROP.dwSettableBaud bitmask to determine what baud rates are supported on that serial port."

    The speed can be set on your system only if it is supported by your system.
    Also, as the link mentions, you will have to know the "clock speed on serial port hardware".



  • itsplayed

    I want to write a program in Visual C++ to transfer data between a computers and microcontroller via 10/100 Ethernet RJ-45.
    Where should I start.

    I also want to do perform serial communication. I am new to visual c++ 6.0

    which libraries do i need (etc).Please tell me from where should i start.

    Thanks



  • Fiddel

  • Guybace

    Please tell me from where should i start.


    If you are not familiar with programming microcontrollers, you'll have to learn that as well.

    If you want to use 8051 architecture microcontrollers, you should use this site :
    www.8052.com

    For programming a computer’s parallel port using your VC++ compiler you may want to take a look at:
    http://www.codeproject.com/system/SerialPortComm.asp



  • jmc303

    You haven’t mentioned your system specifications.
    For how hardware affects the Baud rates, take a look at this article:
    http://support.microsoft.com/kb/99026/en-us

    However, I think, you are supposed to change CBR_ in WINDOWS.H and not in WINBASE.H.
    For further information on how to obtain baud rates not preset in windows take a look at this article:
    http://support.microsoft.com/kb/108928/en-us



  • markbate

    WINDOWS.H does not contain any information about CBR_.

    My Machine:
    Dell 2.7Ghz, 1Gb RAM, 80Gb HD
    Visual Studio C++ 6.0
    Windows XP Pro SP2

    From http://support.microsoft.com/kb/108928/en-us:
    If the baud rate is not in the CBR_ constant table and the UART is 8250, 16540, or 16550, the baud rate is set using 115,200 as the divisor and is divided by the user specified baud rate. The subsequent integer value from this division is used to set the baud rate (the remainder from the division is not used). For example, if the user specified a baud rate of 60000, the calculation would be 115200/60000, which is 1.

    How does this help if I am trying to achieve 230400 baud rate 115200/230400 = .5, what "subsequent integer value" is used This link only applies to Win3.1 SDK.






  • Andeezle

    Simply specify 230400 for the baud rate (forget about any CBS_ constant). But the driver must support it, otherwise it's pointless. I'm using bauds like 230400, 460800, 921600 without any problem.

  • Serial Communication at 230400 baud rate