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:
char response_array[9002];
char* rsp;
rsp=response_array;
while(Serial1.available()){
digitalWrite(red,HIGH);
*rsp = Serial1.read();
rsp++;
digitalWrite(red,LOW);
}