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
Solved

76800 Baud in windows

Posted on 2003-11-11
9
1,245 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

 
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

840 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