Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Status
Not open for further replies.

Mohammed Fy

Newbie level 2
Joined
Sep 23, 2015
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
16
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 :


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
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

  • Screenshot 2015-09-23 13.00.28.png
    Screenshot 2015-09-23 13.00.28.png
    134 KB · Views: 49
Last edited by a moderator:

MAX232 inverts the signals. The polarity setting in Virtual Terminal properties must be set according to the interface type, apparently it isn't for "RX".
 
Obviously the data which you are sending one end and reading at the other end will not be same in MAX232. Because the level also will get shifted so reading it by normal method is not correct. If you want to reconfirm it connect it to one more MAX232 and then read it. You will receiving the data what you have transmited.
 

Thanks all.
You were right FvM, thanks for your consideration.
 

In the VT used for RX just invert the polarity and it will show correct data.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top