You are not logged in.
Pages: 1
I thought that changing in the device.h file baud rate from 9600 to 4800 would do the trick. But the modem stays at 9600!? There must be or other parameters the this newbie is not seeing. Can someone help?
Henry
Offline
Hi Henry, just:
Serial.begin(4800);
If it's not working, you selected maybe wrong MHz somewhere (Arduino IDE)
Taner
Offline
Taner:
I'm working with the MicroModemGP code.
There is only one line I see in device.h that refers to baud rate
// Serial settings
#define BAUD 9600
I changed this , simply, to
// Serial settings
#define BAUD 4800
But the modem data was srambled when I tried to transmit on 4800 baud. It wasn't right until I transmitted on 9600. So it wasn't changed?
Any ideas?
Henry
Offline
Hi Henry!
That's strange, that should really be all there is to it. Just tried successfully with 4800, 9600, 19200 ad 115200 baud. But I'm using the plain MicroModemGP repository, you're using your own modified version, right?
But how is the baud rate actually set? I can see why this is a little confusing... We just set a define, and it magically happens ;P But in "Serial.c" you will find this line:
#include <util/setbaud.h>
In this file, the actual setting of timing registers and such happens, and to do this, it reads two defines: F_CPU and BAUD. The file is part of avr-libc. Are you compiling against standard avr-libc? Maybe check your own version of setbaud.h to see if it expects other define names?
Offline
Pages: 1