Solved

Serial Communication Using MFC in VC++6 under XP

Posted on 2004-03-23
2
308 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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Turn a spreadsheet into a vba executable. 2 93
Get filename and folder into excel 7 79
iSeries DB2 Query 2 97
Window placement 17 87
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

861 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