Home

USB interface Circuit to send and receive text messages

Short message service is a basic wireless mobile networks business , the information stored in the mobile network and forwarding process. But with a common cell phone short message editor is not convenient, have limited input and display , certainly not suitable for industrial applications , using PC, these problems do not exist . Which messaging systems are generally based on CD * 2 ? ? RS 232 serial bus , and not only install troubles , but because of the number and address of the computer slot , interrupt resource constraints , can not mount a lot of equipment . In a number of strong electromagnetic interference test site , not specifically to do their electromagnetic shielding , resulting in distortion of the information . The design for GSM network as wireless data networks, GSM networks used to support the module TC35i and microcontroller with USB interface developed with .

A system of structural features and major components

The system mainly consists of messaging module and USB interfaces with both the dual function of monitoring implementation of SCM , namely Siemens TC35i modules and Cygnal 's C8051F320. System block diagram in Figure 1 . The design will TC35i Terminal and connected to your computer (via USB Interface , TC35i Terminal support GSMU AT command set) , it can be compiled on their own messaging software , using PC 's HyperTerminal to achieve short messaging functionality . The system can send and receive Chinese and English point the way , you can send a maximum of 70 160 Chinese characters and English characters . Once the message is sent , then the sender will get a notice sent successfully . It also allows one-off mass , up to 10 users may be issued , and there are phone book function . The terminal has a random transceiver , real-time receiver , and immediately return , and low cost characteristics .

USB interface Circuit  to send and receive text messages

Figure 1 System Block Diagram

1.1 TC35i Module description

Currently , the domestic common GSM module Waecome of WMO2, Ericsson DM10/DM20 series, ZTE 's ZXGM18 series and Siemens TC35i, these modules have their own strengths . One family of Siemens TC35i modules cost-effective , and have domestic radio network card . This design is chosen Siemens TC35i.

TC35i is a short message to support industrial-grade Chinese GSM module , working in the EGSM900 and GSM1800 dual band , power supply range of 3.3 ~ 5.5 V, can transmit voice and data signals , power consumption in EGSM900 (4 classes ) and GSM1800 (1 class) Were 2 W and 1 W, through the interface connector and antenna connectors are connected to SIM card reader and antenna . TC35i data interface (CMOS level ) two-way transmission through AT command instructions and data , selectable baud rate is 300 b / s ~ 115 kb / s, automatic baud rate is 1.2 kb / s ~ 115 kb / s. It supports Text and PDU format of the SMS (Short Message Service, Short Message Service ) , available through AT commands or reboot and shutdown signals to achieve recovery . TC35i by the power supply module (ASIC), flash memory , ZIF connector, antenna interface, and other 6 parts. As the core of TC35i , the main baseband processor within the terminal handling GSM voice and data signals , and cellular radio equipment covering all the analog and digital functions. No additional hardware in the premise , to support FR, HR , and EFR voice channel coding.

1.2 Introduction  to C8051F320

USB is characterized by unity of the peripheral connector for all devices , a variety of plugs and sockets are designed for the unified specification , which addresses a device which plugs to be connected to which connector problem. USB peripheral bus interface as a common interface , there are other interfaces can not match advantage. Speed performance is a prominent feature of USB technology , it supports hot swap , true plug and play devices to support bi-directional , asynchronous transfer , to ensure that some of the equipment needed to connect the data flow needs . During the development of the USB device , first used according to specific requirements select the appropriate USB controller . Supply on the market today there are two USB controller : USB interface with a microcontroller (MCU) or a pure USB interface chip . I use Cygnal C8051F320 chip companies are the former .

Cygnal 's C8051F MCU is integrated mixed-signal system on chip SoC. MCS-51 which has the core and instruction set compatible microcontroller with USB transceivers, full compliance with the USB 2.0 protocol , supporting 12 Mbps of full-speed transmission or 1.5 Mbps low-speed transmission , can clock recovery , no additional Crystal ( of course, designed to custom , you can also use an external crystal ), the provision of 8 endpoints (endpoint), and each endpoint transfer type , transfer direction can be is built. In addition , it integrates a 1 KB of USB SRAM and USB transceivers, built-in 16 KB of Flash memory and 256 B of the internal RAM, also can access external data memory RAM, the XRAM. It can provide enough storage space firmware , no need to expand the external memory . Even more importantly, internal includes a C8051F320 C2 (Cygnal2-Wire) debug circuit through the two legs of the C2 interface to use Development Kit , can be non-intrusive , full speed of the system debugging. In addition, the 2 feet is common , it also has other functions , such design PCB board is relatively simpler .

2 Hardware system circuit design

The system uses the Cygnal C8051F320 as the main control chip . Cygnal C8051F is compatible with MCS-51 microcontroller core , built-in 8 KB Flash, 256 bytes of RAM. As the built-in Flash, so the circuit design eliminates the need for external program memory , reduce PCB board space , but also improve system reliability. In the GSM system, there are essentially the same , or very little change in volume , such as sub- machine code , number, short message center number , and these data can be written as a constant directly in the Flash program . Microcontroller through the serial port and TC35i communication , microcontroller TC35i received from external sources of information , and through USB interface and PC machine communication .

USB interface Circuit  to send and receive text messages 1

Figure 2 regulated power supply circuit

2.1 Power Supply Circuit

Minimum system operating voltage of 5 V DC. As the TC35i module sudden peak current consumption up to 3 A, it must be sufficient external regulator device to provide the rated current conditions. In addition, the indicators not only have the power voltage , and power and other indicators have to meet margin requirements , so the design in Figure 2 . In this system , switching power supply chip LM7805 completed 12 V to ? 5 V ? conversion , power supply circuit mainly by LM7805 and AS1117-3.3 that two three-terminal power supply modules , power modules AS1117-3.3 LM7805 input received 5 V level , the output for the entire SCM system +3.3 V operating voltage , connected to the ZIF connector 1 to 5 pins for TC35i provides +5 V, 500 mA of charging voltage . Power output of the basic changes will not be affected by external input disturbances , but also effectively eliminate electromagnetic interference.

2.2 IGT circuit

TC35i module for control , IGT signal is very important , only the correct signal IGT TC35i module can only function properly . After system power-up , for the TC35i to enter the work state , you must add a delay to the IGT is greater than 100 ms low pulse duration decreased level of not more than 1 ms. IGT drive when , TC35i supply voltage can not be less than 3.3 V, otherwise the TC35 can activate . Circuit shown in Figure 3 . Start circuit consists of an open-drain transistor and power-on reset circuit. To ensure that the system starts normally require power when power is , IGT must remain greater than 100 ms in the low , then jump high in the circuit board is relying on RC circuit to complete , and that the signal decreased Along the time is less than 1 ms. Starts , IGT pin signal should remain high . After the power supply , +5 V power through the resistance of the capacitor , the voltage on the capacitor slowly rising positive about after 100 ms to achieve high potential to turn Schmitt trigger , the system is reset . Starts , IGT should remain high (3.3 V).

TC35i Data Interface through USB cable connected directly PC. DCE data interface to comply with the internal switching circuits of ITU2T RS232 standard , asynchronous serial transceiver functionality .

2.3 TC35i other parts of the circuit

TC35i using the external SIM card , ZIF connector has 6 pins as a SIM card interface , SIM card also has six pins each with its corresponding , SIM card is so connected with the TC35i : SIM on CCRST , CCIO, CCCL, CCVCC and CCGND SIM card reader by the same name with TC35i terminal directly connected , CCIN vacant , and TC on CCIN through a 3.3 kO resistor connected with CCVCC used to detect SIM card is properly connected . This connection is a SIM card reader to decide, because this part of the circuit is simple, this is not provided .

TC35i the SYNC pin has two modes , one is directed launch the growth of state power , the other is the working status of TC35i instructions , is available AT commands AT SYNC switch , the module using the latter . When the LED goes out, that TC35i is off or sleeping state ; when the LED light for the 600 ms / 600 ms off , the show that the SIM card is not inserted or TC35i ongoing network login ; when the LED light for the 75 ms / 3 s off , the show TC35i logged into the network , in the standby mode .

SCM 2.4 peripheral circuit

Cygnal USB interface, built using the company 's high-performance micro- controller chip C8051F320, simplifying the hardware design. The SCM is a USB interface to achieve functionality and also to complete the control module . Because the C8051F320 MCU is with a USB interface , so some of the hardware and the development of general Application System is similar to only P0.5 and P0.4 need to connect through port 40 -pin ZIF socket can realize the communication between the module and the microcontroller . The following are the design should pay special attention to the problem: an external crystal , be sure to connect the two ends of the crystal resistance of 10 MO , the best crystal shell ground , and wiring as short as possible to reduce interference . To fast and successful development of a USB device , the correct and reasonable approach is essential part of debugging . Then the design used by JTAG debug port , the TCK with 3.3 V to pull , pull-up resistor is 4.7 kO. The MCU 32 -pin , for unused I / O port is best to use 100 O pull-down resistors to ground . This helps protect the I / O port .

3 Software Design

USB interface with SMS -based delivery systems , both hardware design , it also includes software design , software design brief below . USB application software design is divided into three parts : USB peripheral side firmware (firmware), the host operating system drivers and the host client applications. 8051F320 firmware program control of the whole system , and is responsible for handling a variety of PC- USB request sent to complete the data transmission between them . The firmware contains a total of 7 files , respond to various requests from the system 's USB standard , complete exchange of all data and event handling . Microcontroller through the serial port control TC35i, control method uses a standard AT command set . As in the GSM standard , the Chinese encoding is Unicode encoding used , and not commonly used in China GB-2312 encoding , it also required the Chinese code conversion , to display Chinese character fonts . Therefore, when making short message is sent , but also on user data encoded according to PDU format , in order to enhance this part of the hardware features on the best firmware . These low-level driver functions will make it convenient for the preparation of the upper layer protocol , more importantly, it offers a hardware abstraction layer. When the underlying hardware changes, only changes to the underlying driver function, and the upper function of the code unchanged . On this basis, re- write the application layer program . Host application software through the client driver to communicate with the system USBDI realize the system USB data transfer action .

USB interface Circuit  to send and receive text messages 2

Figure 3 IGT circuit

In the USB transmission, due to the type of peripherals and application of different established four kinds of transmission types , respectively, to control the transmission (control transfer), interruption of transmission (interrupt transfer), bulk transfer (bulk transfer) and real-time transmission (isochronous transfer) .

Which require special attention are slow devices only support control transfers and interrupt transmission . In this system , interrupt transmission . I completed the firmware using Keil C51 's design, DRIVER STUDIO environment using Visual C + + 6.0 to complete USB driver design , and finally with Visual C + + 6.0 developers build application software and related instructions. This design fully uses Windows style , the user can quickly use the device .

4 Conclusion

Using Siemens TC35i modules and the new company C8051F320 Hualong minimum system design, simple and easy , short development cycle , and with a USB interface, enhanced security and reduce the complexity of the work of field staff , easy to use for engineering practice . This achieved through computer messaging capabilities , using C51 control of their programming , in this basis, changes to the software and hardware to achieve the second development can also be other functions , for example, through a variety of mobile devices to check the information and Control field devices of various projects . In short, this system as a wireless communication system , has broad application prospects.