SIM900 - Serial Port - Application Note - V1.03
SIM900 - Serial Port - Application Note - V1.03
SIM900 - Serial Port - Application Note - V1.03
Note_V1.03
Smart Machine Smart Decision
Version: 1.03
Date: 2012-04-26
Status: Release
General Notes
SIMCom offers this information as a service to its customers, to support application and engineering efforts that
use the products designed by SIMCom. The information provided is based upon requirements specifically
provided to SIMCom by the customers. SIMCom has not undertaken any independent search for additional
relevant information, including any information that may be in the customer’s possession. Furthermore, system
validation of this product designed by SIMCom within a larger electronic system remains the responsibility of the
customer or the customer’s system integrator. All specifications supplied herein are subject to change.
Copyright
This document contains proprietary technical information which is the property of SIMCom Limited., copying of
this document and giving it to others and the using or communication of the contents thereof, are forbidden
without express authority. Offenders are liable to the payment of damages. All rights reserved in the event of grant
of a patent or the registration of a utility model or design. All specification supplied herein are subject to change
without notice at any time.
Contents
Contents .............................................................................................................................................................. 3
Version history .................................................................................................................................................... 4
Related documents.............................................................................................................................................. 4
1 Introduction...................................................................................................................................................... 5
2 Connection....................................................................................................................................................... 5
3 Level shifter ..................................................................................................................................................... 6
3.1 Communication with MCU..................................................................................................................... 6
3.2 Communication with PC (RS232) .................................................................................................... 7
4 Synchronize baud rate...................................................................................................................................... 8
5 Flow control..................................................................................................................................................... 8
5.1 Software flow control (XON/XOFF flow control) ................................................................................. 9
5.2 Hardware flow control (RTS/CTS flow control) .................................................................................... 9
6 Control signals ................................................................................................................................................. 9
6.1 CTS ......................................................................................................................................................... 9
6.2 RTS ......................................................................................................................................................... 9
6.2 DCD...................................................................................................................................................... 10
6.3 DTR ...................................................................................................................................................... 10
6.4 RI .......................................................................................................................................................... 10
Table Index
Table 1: Logic levels of the serial port................................................................................................................ 6
Table 2: The voltage of RS232 ........................................................................................................................... 7
Table 3: RI responds ......................................................................................................................................... 10
Table 4: AT+CFGRI Indicate RI when using URC........................................................................................... 12
Figure Index
Figure 1: Connection of the serial interfaces in full modem mode..................................................................... 5
Figure 2: Connection of the serial interfaces in null modem mode .................................................................... 5
Figure 3: The lever shifter by buffer with open drain outputs ............................................................................ 6
Figure 4: The lever shifter by transistor for communication with MCU ............................................................ 7
Figure 5: The lever shifter by SP3238E for communication with PC ................................................................ 7
Figure 6: Synchronizing baud rate flow chart..................................................................................................... 8
Version history
Related documents
1 Introduction
This document describes the Serial interface of the modules and how to take it into account in client’s
application design. This document can help user quickly understand Serial interface of the modules.
2 Connection
SIM900 is designed as a DCE (Data Communication Equipment). It provides a full modem Serial port which is
used for data transmission and for sending AT commands. The Serial port Contains data lines TXD and RXD,
hardware flow control lines RTS and CTS, status lines DTR, DCD and RI. Serial port interface is available which
complies with 2.80 Volts interface.
When the module is used in full modem mode for data transmission, all the signal lines should be connected. The
following figure shows the connection between module and client (DTE) in full modem mode
When the module is used in null modem (no handshaking) mode for data transmission,only RXD and TXD are
used in user’s application, other serial pins should be kept open. The following figure shows the connection
between module and client (DTE) in null modem mode.
NOTE: The DTR signal must pulled to low level voltage when DTE is sending data to module. If DTR does
not connect with DTE, DTR must be connected to GND via a 10K resistor.
3 Level shifter
The significant levels are 0V (for low data bit or ON condition) and 2.80V (for high data bit or OFF
condition). For electrical characteristics please refer to the following table.
If user’s MCU or PC’s voltage is out of the range, lever shifter needs to be used.
The module can choose the lever shifter by buffer with open drain outputs (e.g. NC7WZ07) or transistor.
by buffer with open drain outputs
Note:
VDD_EXT is supplied by the module(2.80V),VCC_MCU is voltage of user UART interface
By transistor
Transmitter Receiver
Level
capable (V) capable (V)
Undefined - -3 ... +3
It is suggested doing the lever shifter by RS-232 transceivers (e.g.SP3238E or MAX3221 etc.)
Connect all signals
If just RXD and TXD are connected, MAX3221can be chosen for the lever shifter.
SIM900 is designed in autobauding mode by default. Autobauding allows SIM900 to automatically detect the
baud rate of the host device. In application, host device must to synchronize the baud rate with SIM900. Host
device must firstly send character “A” to synchronize the baud rate. It is recommended to send “AT” until host
device receives the “OK” response, which means host device and SIM900 are correctly synchronized. Once the
baud rate is synchronized, it is suggested to use AT command “AT+IPR” to set SIM900 baud rate according the
host baud rate. Following figure shows the flow of synchronization of baud rate between SIM900 and host device.
5 Flow control
Flow control is very important for correct communication between the module (DCE) and host device (DTE). In
cases of a data or fax call, the sending device is transferring data faster than the receiving side is ready to accept.
When the receiving buffer reaches its capacity, the receiving device should be capable to pause the sending device
until it catches up.
SIM900 is designed as no flow control by default. The AT command “AT+IFC” can be used to enable the
hardware flow control or software flow control, which are basically two approaches to achieve data flow control.
Software flow control sends different characters to stop (XOFF, decimal 19) and resume (XON, decimal 17) data
flow. It is quite useful in some applications that only use three wires on the serial interface.
The AT command “AT+IFC=1,1” can be used to enable software flow control in the DTE interface and within
module.
Hardware flow control achieves the data flow control by controlling the RTS/CTS line. When the data transfer
should be suspended, the CTS line is set inactive until the transfer from the receiving buffer has been completed.
When the receiving buffer is ok to receive more data, CTS goes active once again.
The AT command “AT+IFC=2,2” can be used to enable hardware flow control in the DTE interface and within
module.
To achieve hardware flow control, ensure that the RTS/CTS lines are present on user’s application platform.
NOTE: The DTR signal must be pulled to low level voltage when DTE is sending data to the module.
Otherwise, the CTS signal may always not be asserted by module and the handshaking will not be established.
6 Control signals
6.1 CTS
This signal is asserted by the module to inform the DTE device that transmission may begin. RTS and CTS are
commonly used as handshaking signals to moderate the flow of data into the module.
6.2 RTS
This signal is asserted (low level) to prepare the module (DCE) for accepting transmitted data from the DTE
SIM900_Serial Port_Applocation Note_V1.03 9 2012.04.26
Smart Machine Smart Decision
device.
6.2 DCD
The AT command AT&C can be used to set DCD function mode. When set “AT&C=0”, DCD line is
always ON (low). When set “AT&C=1”, DCD line is ON (low) only in the presence of data carrier.
6.3 DTR
Module will automatically go into SLEEP mode (set AT+CSCLK=1) if DTR is set to high level and there is no on
air and no hardware interrupt (such as GPIO interrupt or data on serial port). In this case, the current consumption
of module will reduce to the minimal level. During SLEEP mode, the module can still receive paging message and
SMS from the system normally. If DTR Pin is pulled down to a low level, this signal will wake up module from
SLEEP mode. The serial port will be active after DTR changes to low level about 50ms. DTR must be held low
during the call.
6.4 RI
If the module is used as caller, the RI will maintain high. But when it is used as receiver, the responses of RI are
listed in the following table.
Table 3: RI responds
State RI respond
Standby HIGH
Figure 7: Behaviors of RI
We suggest that you connect the RI to an interrupt port of MCU. It can be used for waking up from power saving
mode. That means the MCU will receive an interrupt while a falling edge coming on RI.