Solved

76800 Baud in windows

Posted on 2003-11-11
9
1,224 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
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 250 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

831 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