Go Down

Topic: baudrate error (Read 1 time) previous topic - next topic


hi everyone,
i'm working with an instrument (tdr100) which is set to communicate at 57.6k and it shoould send me 2048 float in a string of       characters (9000+), through rs232 cable.
after i sniffed the serial port on the laptop, i'm trying to connect the instrument to arduino due, through a MAX3232. but when i get the response, it seems to miss some characters(the code i wrote is pretty simple and should be ok, i'll post it on the bottom)
thus i guess the problem could be the approximation with which the baudrate is calculated and generated.
do you know how to calculate this error, so i might try to fix it?

p.s. i looked on the datasheet of the sam3x but i didn't find any hint about 84MHz clock.

this is the code i wrote to acquire the characters:
Code: [Select]
char response_array[9002];
char* rsp;
    *rsp = Serial1.read();



Did you setup your Arduino to receive at 57.6k?  Have you tried to receive the data on your PC, and are the missing characters there?
Do you use timers in your Arduino code?
I've used my Due @115.2k and 57.6k sending 100-200 characters without problem, so it may be because of the longer messages.

Can we see your entire code to try and solve the issue?

Go Up