Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Serial Communication Using MFC in VC++6 under XP

Posted on 2004-03-23
2
Medium Priority
?
325 Views
Last Modified: 2013-11-20
Hi,
Can any expert tell me "exactly" how MFC matches 50 Baud on serial comport

I had a look at http://msdn.microsoft.com/library/en-us/dnfiles/html/msdn_serial.asp?frame=true 
it only supports [110...19200...Baud]

Can I replace 110 by 50 as an argument in a function.If not, how can I write a class to do such thing.

"Only 50 Baud" !!!
Thanks for read
0
Comment
Question by:e-learning
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 750 total points
ID: 10657490
From MSDN topic DCB:

BaudRate
Specifies the baud rate at which the communications device operates. This member can be an actual baud rate value, or one of the following baud rate indexes:
CBR_110
...

I think you can do this. At least, you can try - call BuildCommDCB with 50 rate and read from output lpDCB parameter actual value.
0
 
LVL 13

Assisted Solution

by:SteH
SteH earned 750 total points
ID: 10668674
50 baud is a possible baud rate. As AlexFM stated you can use either a value or a predifined constant like CBR_xxx. To get all possible baud rates for a standard serial port you need to divide 1.8432 MHz by 16 first and then a 16 bit number which is programmed into a divisor latch. This number can take any value from 1 to 65535 leading to baud rates between 115200 and 1 baud. A value of 2304 corresponds to 50 bauds. So it should be possible.

New chips allow for higher speeds up to ~ 1 MBaud. With those it depends on the size of the divisor number and the initial frequency what baud rates at the low end are possible. But 50 baud should still be most likely possible:
50 * 65535 = 3,276,750. So for maximal baud rates below ~3 MBaud it is very likely that 50 bauds are possible.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question