Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

76800 Baud in windows

Posted on 2003-11-11
9
Medium Priority
?
1,339 Views
Last Modified: 2007-12-19
Hi there,
I have a problem that if I try to enter 76800 into the DCB structure, the actual baud rate it produces is 115200.
Is there any way I can acheive 76800 as it is required by a piece of gear I need to connect to. (Usually with a micro).
Thanks in advance
David S


BTW: I've been away from this site for a while. Although the site looks very 'pretty' and pleasing to the eye, does anyone find it a tad difficult to navigate?
Although I know it now, I thought the bar at the top is not obvious enough that it is a list of topics. Just my opinion.
 cheers all :o)
0
Comment
Question by:dsch
[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
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 1000 total points
ID: 9726552
76800 is not a standard multiple of the UART clock frequency.  Some (but not many) serial port hardware devices can possibly do this but in general you'll need to special and very flexible COM port card with a fully programmable bit clock to do this.

What kind of goofy gear would use this? The standard frequencies are:

150
300
1200
2400
4800
9600
19200
38400
115K
0
 
LVL 1

Author Comment

by:dsch
ID: 9726831
I write software for Radio modules that interface with RS232 data, and the fastest speed for the clock we can acuratley run with on the micro is 76800 which is a speed my customer is requesting. It is OK for his micro, but murder for us to set PC software to do the testing of his modules.
If there's no way to do this then I wouldn't lose too much sleep on it, I just needed to find out if there was a simple solution, setting etc to do it.
Thanx for your comments jhance
DS
0
 
LVL 13

Expert Comment

by:SteH
ID: 9730353
You can set other baud rates than the standard ones by programming the divisor latch.
http://www.lookrs232.com/rs232/dlab.htm
gives some hint how the baud rate is set. The only problem here is that there is no integer divisor to get to your desired value (1.5 is the divisor). Depending on the effort you can put into this you can either try a card which supports other rates or change the quartz from 1.8 MHz to some larger value which should allow the standard frequencies plus your desired one. This could be doubling the frequency but more likely you will find only 18.xx MHz. In that case you need 15 as divisor but have to write a driver to set the DLAB values correctly for normal windows operation. When windows wants to set it to 6 you have to put 60 in it.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 49

Expert Comment

by:DanRollins
ID: 9762844
57600 should be a valid rate (CBR_57600) and that would be closer to your goal.

What have you tried?  There is setting the literal value into DCB.BaudRate and there is also BuildCommDCB().  How do you know what value is actually being set?

-- Dan
0
 
LVL 1

Author Comment

by:dsch
ID: 9762901
Unfortunatley the Micro's accuracy is over 3% @ 57600 so cannot be used.
SetCommState & GetCommState have been used.
The value does return as if I have set it at 76800.
Haven't used BuildCommDCB(), can't see how It would help as I need SetCommState to apply the DCB to the port.

Thanks again
DS

BTW SteH:
Way, way wayyyyyyyyy over my head! :o) But illuminating non the less. ThanX
0
 
LVL 9

Expert Comment

by:tinchos
ID: 10249028
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ with points refunded

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 10249338
I believe that jhance's comment is the correct answer.
-- Dan
0
 
LVL 9

Expert Comment

by:tinchos
ID: 10249693
Sorry Dan, but I just guide myself because of the askers comment.
I guess jhance's answer maybe the correct one, but as the asker didn't acknowledge it as such, in fact I believe he did just the opposite, I recommended the PAQ with refund.

Tincho
0
 
LVL 1

Author Comment

by:dsch
ID: 10250853
Hi,
Never got this working in 76800 but if it it the opinion of the panel I will accept jhance as answer. THere was always the off chance that someone may have replied knowing of a working solution.
Thanx
dsch
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

596 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