You are on page 1of 2

GSM/PIC from Trung's books

Screen clipping taken: 7/19/2012, 1:00 AM

850/1900 MHz US 900/1800 MHz EU 2W 800/900 MHz 1W 1800/1900 MHz 3G 2100 MHz

SIM (Subscriber Identity Mobile) - IMSI - 15mm x 25mm x 0.76mm - 6 pins: VCC | RST | Clk | GND | VPP | I/O - SIMCARD holder - SMS Service Center Number in SIM - PWRRST should be hold for 4 secs to reset (input current is 2A) SIM340Z - SIMCOM - TXD | RXD | RTS - LED, buzzer | Keypad, LCD | Antenna - 3.4V => 4.5V (input and output) Problem: Interface SIM340Z modem to others IC, chips? - 5V CMOS => 3-4V Input - 5V <= 2V Output - Chip,IC SIM Modem

5V - 2.1V = 2.9V

- AT Command Help: AT+param=? Help AT+param? How to set AT+param=x Change value of parameter to x General purpose AT Commands Command Description ATI ATE0 ATE1 ATS3 AT+GMI Modem product information Disable echo (use in coding, don't need info. From modem) Enable echo (useful when debugging) Command termination character Modem manufacture's id

AT+GMM Modem model number Important SMS command Command AT+CMGF AT+CMCS AT+CSCA AT+CMGS AT+CSMP AT+CMGD AT+CMGR AT+CMSS AT+CPMS AT+CMGL AT+CPIN AT+CSCS Description Select SMS msg format Select SMS character set SMS service center address Send SMS msg. Send SMS text mode para. Delete SMS msg. Read SMS msg. Send SMS from store Preferred SMS storage List SMS msg from storage Enter PIN Number

AT+CMGDA Del. All msg.

AT+CMGW Store a msg.

Unfiled Notes Page 1


Date, time info Voice mail IMSI of SIM Phone number of user

AT+CBAND Frequency band

- 2 ways sending SMS: PDU or TEXT mode. PDU mode: saving bit TEXT mode: easier (preferable) Sample Project - Sending SMS Message - Calling a mobile phone - Answering a phone call - Sending temperature as a SMS Text Code is not complete (must added some libs) - Sending a msg using a uC and a PC

Algorithm Sending temperature as a SMS Text

MAIN PROGRAM BEGIN Configure digital I/O Ports Configure analog channel Configure USART Interrupts SET USART to 19200 Baud Force RST Low Set Modem to Auto-Band Disable Echo Set Modem to text mode Set character mode to GSM DO FOREVER Read temperature () Send SMS() Wait for one hourd ENDDO END SEND SMS BEGIN Set Modem CSMP parameters Set mobile phone number Send SMS(temperature) Send Ctrl+Z character END

READ TEMPEREATURE BEGIN Read analog channel Convert to mV => to C Store as message END

Questions - VP: Validity period? - Library for USART_Write() - Modem_Response(): response_revd from what? - Interrupt() was used for?

Unfiled Notes Page 2