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.

[SOLVED] Problem in interfacing between MCU and a modem via RS232

Status
Not open for further replies.

sisickij

Newbie level 2
Joined
Feb 26, 2013
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,300
Greetings,
I am trying to establish a connection between a microcontroller (STM32F4DISCOVERY board) and a radio modem, controlled via AT commands. Interface between the MCU and the modem is established via RS232 (I use circuit with MAX232 IC for this).
When I connect the PC to the modem (via PC COM port), everything works, i.e. I receive answers to my commands.
When I connect the MCU to the PC, it also works, I can read values, transmitted from the MCU, via terminal software and MCU can process values sent from the PC.
But when I connect the MCU to the modem, there is no connection. The modem does not answer to any commands (though it should return error if it does not understand), there are no signals on the RX line.
I use the same cable, so it should be fine. Unfortunately I do not have hardware documentation of the modem, but I've tried to connect to the modem from the PC using 3-wire only cable (TX, RX, GND), and it worked.
I am attaching photos of the oscilloscope screen, maybe it will help. I have measured signal on TX line, one square represents 5V.
**broken link removed**
1. MCU is connected to the PC, and the MCU repeatedly sends certain message. The terminal software on the PC correctly receives sent message
**broken link removed**
2. MCU is connected to the PC but I have also connected the ground and TX lines to the modem. Messages, sent from the MCU are no longer received by the PC.
Perhaps anyone has any suggestions?
 

I use the same cable, so it should be fine

Actually, the reason it is not working fine is that you are using the same cable.

A standard RS-232 cable is deisgned to connect a PC (Data Terminal Equipment) with a modem or similar (Data Communications Equipment). The Tx pin of the DTE goes to the RX pin of the DCE, and vice versa. But if you have to connect two PC's together, or two DCE's, like your microcontroller to your modem, you need a null modem cable which crosses over the Rx and Tx lines. Right now, with your regular cable, the Tx of the Microcontroller is connected to the Tx of the modem, and likewise with the Rx pins. That's why nothing is happening.

r.b.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top