DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 11 of 11

Thread: Serial Communication at 230400 baud rate

  1. #1
    Join Date
    Aug 2006
    Posts
    4

    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? Thanks.

  2. #2
    Join Date
    Nov 2003
    Posts
    4,118
    A wild shot in the dark: try to use 256000 and see what happens. Either the connect will be refused or it will work with the highest possible baud rate. BTW, in cases like this, don't use a hard coded constant. Use a "dynamic constant" instead: an envirnment variable, a configuration file or a registry key. This will make your job much easier.
    Danny Kalev

  3. #3
    Join Date
    Aug 2006
    Posts
    4
    It is setup as a drop down menu -- choose your desired baud rate from a drop down menu -- but the max baud rate needs to be 230400. Tried 256000, connection was refused.

    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?

    Any other ideas out there would greatly be appreciated.

  4. #4
    Join Date
    Dec 2003
    Posts
    3,366
    Make sure your port, in the control panel, is set that high?

  5. #5
    Join Date
    Aug 2006
    Posts
    4
    That may be the problem, in control panel the max baud rate available to me is 128000 for my COM port. I guess this device supports higher baud rates than my PC-COM port.

    Im still curious for a fix, it would be nice to have this baud rate available to users as it is the fastest baud rate on the F/W of this device.

    Should the limitation of my PC-COM port speed in Control Panel be a reason for this not working? Every other baud rate works, 9600,19200,38400, 57600, 115200, except 230400.

    Basically Hyperterminal will list 230400 but it doesn't mean your COM port supports it. Anyone know if I leave 2304000 as an option-- will it theoretically work or should I find a PC that will support this baud rate and test.

  6. #6
    Join Date
    Dec 2003
    Posts
    3,366
    2304000 is not standard, I have never heard of this speed on a PC serial port. Your device *should* be able to sync to a lower rate, or perhaps this is USB or USB2 speed (not sure here) ?!

  7. #7
    Join Date
    Aug 2006
    Posts
    4
    This baud rate is in Windows Hyperterminal. This device supports lower rates, but the max rate is 230400, would like to have this software supports the max rate on this device.

  8. #8
    Join Date
    Dec 2003
    Posts
    3,366
    The control panel is probably correct - your pc may not support the top speed.

  9. #9
    Join Date
    Aug 2006
    Location
    New Zealand
    Posts
    3
    Quote Originally Posted by wish1267
    This baud rate is in Windows Hyperterminal. This device supports lower rates, but the max rate is 230400, would like to have this software supports the max rate on this device.
    The baud rate you specify is certainly not a standard serial (non USB) baud rate. Here's a list (starting at 9600 bps, although you can go right down to 110 bps) of standard rates:

    9600
    14400
    19200
    38400
    57600
    115200
    128000

    The reason for these standard rates is that they are generated by a clock generator device onboard the serial UART/USART chip. The clock generator divides a crystal frequency and you'll notice that the rates given are all evenly divisible by 16. The divider can be set such that the result is not a whole number, but it doesn't make much sense to do that.

    If you need fast baud rates (and that's the question - do you REALLY NEED the fast rate) then use a USB port serial interface. Remember that the OS, and more importantly your application program, has to be able to process the data at that rate, unless you have an adequate buffering system.

    Hope that helps.

  10. #10
    Join Date
    May 2010
    Posts
    1

    Serial Communication at 230400 baud rate

    Hello
    I have a problem similar to wish1267's problem.
    I have an DSP Evaliution Board and want to store my program in it's SPI using COM port.
    For this application my computer must be able to run at a UART baud rate of 230400.
    in control panel the max baud rate available to me is 128000 for my COM port.
    when I configure my bits per second of Hyper terminal at 230400, connecting to the DSP Evaliution Board fails and when I configure my bits per second of Hyper terminal at a number less than 230400 the connection message appears but i don't have any communication with board.
    is there a COM whit 230400 baud rate abbility?
    would you please help me?
    Regards.

  11. #11
    Join Date
    Dec 2003
    Posts
    3,366
    its not a standard value. I havent seen a device in *years* that will not work at 9600 baud, N81 settings. Some probably do not, but almost all device respond to this. From there you can figure out how to set up for faster speeds.

    I do not know what speed USB is nor what settings a ubs to serial setup can reach, it could be somehow related to this.

Similar Threads

  1. Serial Port Communication
    By IceCubeC in forum Java
    Replies: 3
    Last Post: 04-28-2006, 04:27 PM
  2. Com port Serial Communication.
    By John O. in forum .NET
    Replies: 2
    Last Post: 01-14-2002, 01:37 PM
  3. Com port Serial Communication.
    By John O. in forum .NET
    Replies: 0
    Last Post: 01-14-2002, 07:57 AM
  4. serial communication
    By Bo-Göran in forum VB Classic
    Replies: 14
    Last Post: 07-10-2000, 11:30 AM
  5. serial communication
    By Bo-Göran in forum VB Classic
    Replies: 0
    Last Post: 07-07-2000, 04:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center