PDA

View Full Version : baud rate



adriana
6th May 2011, 01:37
hi everyone!

i'm begginer, and i'm using the serial comunication. the communications is already working, but i have a problem with the baud rate, basicly when i'm working with baud rate = 9600, i don't have problems, but when i try other value i don't see any velocity diference, it's the same.... i don't know what i need to do...
i'm opennig and closing the port some times... i don't know if this can to be a problem...

ChrisW67
6th May 2011, 03:07
What does this have to do with Qt?

How are you accessing the serial ports? How are you setting the bit rate initially? How are you changing the bit rate? How are you judging "velocity difference"?

What is at the other end of the link? Is it configured for the new bit rate? Are characters sent from one end seen at the other with the bit rate changed?

adriana
6th May 2011, 12:41
hi,
i'm working with qt, and i want communicate with a mbed system.


i know that the problem it's about qt, because i already checked diferents baud rates in other terminals. and that is working, i can saw the velocity change because the difference it's big, but when i connect with the qt program just works when the baud rate is 9600... leave me say you how i deffine my baude rate... i added qextserialportbase.cpp and .h and i'm changing here the baud rate, but i tryed chage in the code too, but don't works... just works when the baud rate is 9600

void QextSerialBase::construct()
{
Settings.BaudRate=BAUD115200;
Settings.DataBits=DATA_8;
Settings.Parity=PAR_NONE;
Settings.StopBits=STOP_1;
Settings.FlowControl=FLOW_HARDWARE;
Settings.Timeout_Millisec=500;
mutex = new QMutex( QMutex::Recursive );
setOpenMode(QIODevice::NotOpen);
}

tks, Adriana

squidge
6th May 2011, 13:03
So where do you apply the settings to the port? All you are doing is filling in a structure. You are not using that structure.

adriana
6th May 2011, 13:52
so, how can i do it?

schnitzel
6th May 2011, 17:18
why don't you look at the examples that come with qextserialport and try changing the baudrate?