Problem with Max232 - Data in the output is different from the input

Thread Starter

Mohammed Fy

Joined Sep 23, 2015
2
Hello everyone, i'm trying to send data from a micro-controller AT89C52 to Max232 which is connected to a 3G modem via VSPE
My problem is when i catch data from the output its not the same, here is what is shown to me in the picture attached.
Also, the code i'm using :

serial_init();
delayms(5);
if(sw == 1)
{
serial_send_string("AT+CSCA?\r");
serial_send_string("AT+CMGF=1\r");
delayms(1);
serial_send_string("AT+CMGS=\"+212\"\r");
delayms(1);
serial_send_string("MSG\r");
serial_send_string("0x1A\r");
delayms(5);
}


I need someone help please.
 

Attachments

joeyd999

Joined Jun 6, 2011
5,283
Have you considered sending a really, really short message first? Like, say, the letter 'A'. Or maybe even the same letter 'A' repeated continuously.

This will help you to rapidly run down the problem which is likely nothing more than a baud rate or other configuration mismatch.
 

Thread Starter

Mohammed Fy

Joined Sep 23, 2015
2
Thanks for your answer .. i found out what cause the problem, it is the inversion of polarity by MAX232 so all i needed to do is invert that signal another time to get back to the original one.
 
Top