Solved

Serial Communication Using MFC in VC++6 under XP

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now