Solved

Serial Communication Using MFC in VC++6 under XP

Posted on 2004-03-23
2
313 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 250 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 250 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Suggested Solutions

Title # Comments Views Activity
Change owner from userA to server Local Administrators 7 74
if loop in java 3 174
centeredAverage challenge 8 188
Problem to open Excel file 15 264
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

734 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