I suspect an issue using baudrate less than 9600. Let me explain some cases :
Case 1, 2 and 3: Z-Uno connected to PC using Serial
Code: Select all
int ByteReceived;
void setup(){
Serial.begin(9600);
}
void loop(){
if (Serial.available() > 0){
ByteReceived = Serial.read();
Serial.print(char(ByteReceived));
}
}
When I send Hello World, I get back Hello World. OK
Case 2: Z-Uno serial set to 1200 and PC serial set to 1200
When I send Hello World, I get back Hello World. OK
Case 3: Z-Uno serial set to 1200 and PC serial set to 9600
When I send Hello World, I get back Hello World. What ? I must not be able to read my message with a wrong baudrate.
Case 4, 5 and 6: Z-Uno connected to Sparkfun FDTI Basic (https://www.sparkfun.com/products/9873) using Serial0
Code: Select all
int ByteReceived;
void setup(){
Serial0.begin(9600);
}
void loop(){
if (Serial0.available() > 0){
ByteReceived = Serial0.read();
Serial0.print(char(ByteReceived));
}
}
When I send Hello World, I get back Hello World. OK
Case 5: Serial connected to Sparkfun FDTI Basic https://www.sparkfun.com/products/9873, Z-Uno serial set to 1200 and Sparkfun FDTI serial set to 9600
When I send Hello World, I get back �����������. OK
Case 6: Serial connected to Sparkfun FDTI Basic https://www.sparkfun.com/products/9873, Z-Uno serial set to 1200 and Sparkfun FDTI serial set to 1200
When I send Hello World, I get back �����������. What ? I must be able to read my message with a proper baudrate.
Case 3 and 6 are abnormal situations. Z-Uno seems not working well using a baudrate of 1200. I test a few other speed; 2400, 4800 and 19200. Both 2400 and 4800 are not working. 19200 is working fine. Is it related to oscillator frequency ? Too fast to cadence a speed below 9600 ?
Best regards.