?
Solved

76800 Baud in windows

Posted on 2003-11-11
9
Medium Priority
?
1,307 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
Industry Leaders: 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: 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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

771 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