Sunteți pe pagina 1din 73

Abstract:

This project aims to develop a system that allows their vehicles anytime and anywhere. Also it enables vehicle collision avoidance system using object sensor in the vehicle. To do this concept we use the standard microcontroller called AT89C51 which will be more suitable for this project. RF transmitter and receiver are used to send the vehicle location to the control room.

Introduction

The following project is based on wireless communication in RF range. It includes wireless ASK RF Module of 315 MHz / 433 MHz frequency which is used for communication and L2393D Motor Driver IC which is used for controlling the direction of Motors. The 4 Bit Binary data is transmitted using ASK RF transmitter Module and correspondingly same data is received by ASK RF Receiver Module. Thus the interfacing of motor driver IC with Wireless communication Modules completes the structure of RF controlled motor.

Block Diagram:

Circuit Diagram:
1.

Receiver Circuit

2. Transmitter Circuit

Wireless robot control through RF Summary of the project Wireless remote controlled toy cars work on the concept explained here. Motor control through RF communication is a very interesting application and is widely used in robotics, electronics toys, automation systems etc. This topic covers the way DC motors can be driven by using the controls from a distant place. The controls are transferred from one end to another by employing an RF module. The remote control application of RF has been extended to operate a motor driver which in turn controls the direction of motors Description This circuit uses RF module to control DC motors through a motor driver IC L293D. Transmission is enabled by giving a low bit to pin14 (TE, active low) of encoder HT12E. The controls for motor are first sent to HT12E. Pins 10 and 11 (D0-D1) are used to control one motor while pins 12 and 13 (D2-D3) to control another motor. The data signals of encoder HT12E work on negative logic. Therefore a particular signal is sent by giving a low bit to the corresponding data pin of encoder. The parallel signals generated at transmission end are first encoded (into serial format) by HT12E and then transferred through RF transmitter (434 MHz) at a baud rate of around 1-10 kbps. The same signals are acquired by RF receiver after which it is decoded by HT12D. For more details, refer RF remote control.

Since the encoder/decoder pair used here works on negative logic, the decoded signals are fed to an inverter (NOT gate) IC 74LS04. The proper (inverted) signals are then supplied to L293D. L293D contains two inbuilt H-bridge driver circuits to drive two DC motors simultaneously, both in forward and reverse direction.

The motor operations of two motors can be controlled by input logic at pins 2 & 7 and pins 10 & 15. Input logic 00 or 11 will stop the corresponding motor. Logic 01 and 10 will rotate it in clockwise and anticlockwise directions, respectively. Thus, depending upon the signals generated at the transmission end, the two motors can be rotated in desired directions. Components Used 1. L293D Download datasheet: l293d.pdf L293D is a dual H-bridge motor driver integrated circuit (IC). Preferable IC that you could use for your project is ST microelectronics. Motor drivers act as current amplifiers since they take a low-current control signal and provide a higher-current signal. This higher current signal is used to drive the motors. L293D contains two inbuilt H-bridge driver circuits. In its common mode of operation, two DC motors can be driven simultaneously, both in forward and reverse direction. The motor operations of two motors can be controlled by input logic at pins 2 & 7 and 10 & 15. Input logic 00 or 11 will stop the corresponding motor. Logic 01 and 10 will rotate it in clockwise and anticlockwise directions, respectively. Enable pins 1 and 9 (corresponding to the two motors) must be high for motors to start operating. When an enable input is high, the associated

driver gets enabled. As a result, the outputs become active and work in phase with their inputs. Similarly, when the enable input is low, that driver is disabled, and their outputs are off and in the high-impedance state. Pin Diagram Pin Description Function Enable Motor 2 3 4 5 6 7 8 pin 1; Name for Enable 1,2 active Pin Number 1

high Input 1 for Motor 1 Input 1 Output 1 for Motor Output 1 1 Ground (0V) Ground Ground (0V) Ground Output 2 for Motor Output 2 1 Input 2 for Motor 1 Input 2 Supply voltage for Vcc 2 Motors; 9-12V (up to 36V) Enable Motor

pin 2;

for Enable 3,4 active

10 11 12 13

high Input 1 for Motor 2 Input 3 Output 1 for Motor Output 3 2 Ground (0V) Ground (0V) Ground Ground

14 15 16

Output 2 for Motor Output 4 2 Input2 for Motor 2 Input 4 Supply voltage; 5V Vcc 1 (up to 36V)

HT12D DECODER Download Datasheet: HT12D.pdf HT12D IC comes from HolTek Company. HT12D is a decoder integrated circuit that belongs to 212 series of decoders. This series of decoders are mainly used for remote control system applications, like burglar alarm, car door controller, security system etc. It is mainly provided to interface RF and infrared circuits. They are paired with 212 series of encoders. The chosen pair of encoder/decoder should have same number of addresses and data format. In simple terms, HT12D converts the serial input into parallel outputs. It decodes the serial addresses and data received by, say, an RF receiver, into parallel data and sends them to output data pins. The serial input data is compared with the local addresses three times continuously. The input data code is decoded when no error or unmatched codes are found. A valid transmission in indicated by a high signal at VT pin.

HT12D is capable of decoding 12 bits, of which 8 are address bits and 4 are data bits. The data on 4 bit latch type output pins remain unchanged until new is received.

Pin

Description Function

Name

Pin Number 1 2 3 4 5 6 7 8 9 10

8 BIT ADDRESS A0 PINS FOR INPUT A1 A2 A3 A4 A5 A6 A7 GROUND (0V) GROUND 4 BIT D0 DATA/ADDRESS PINS OUTPUT FOR

11 12 13 14 15 16 17

D1 D2 D3 SERIAL DATA INPUT INPUT OSCILLATOR OUTPUT OSCILLATOR INPUT VALID TRANSMISSION, ACTIVE HIGH SUPPLY OSC 2 OSC 1 VT

18

Vcc

VOLTAGE; (2.4 12V)

5V

HT12E ENCODER Download Datasheet: HT12E.pdf

HT12E is an encoder integrated circuit of 212 series of encoders. They are paired with 212 series of decoders for use in remote control system applications. It is mainly used in interfacing RF and infrared circuits. The chosen pair of encoder/decoder should have same number of addresses and data format. Simply put, HT12E converts the parallel inputs into serial output. It encodes the 12 bit parallel data into serial for transmission through an RF transmitter. These 12 bits are divided into 8 address bits and 4 data bits. HT12E has a transmission enable pin which is active low. When a trigger signal is received on TE pin, the programmed addresses/data are transmitted together with the header bits via an RF or an infrared transmission medium. HT12E begins a 4-word transmission cycle upon receipt of a transmission enable. This cycle is repeated as long as TE is kept low. As soon as TE returns to high, the encoder output completes its final cycle and then stops.

Pin Diagram

Pin

Description Function

Name

Pin Number 1 2 3 4 5 6 7 8 9 10

8 BIT ADDRESS A0 PINS FOR INPUT A1 A2 A3 A4 A5 A6 A7 GROUND (0V) GROUND 4 BIT D0 DATA/ADDRESS PINS FOR INPUT D1 D2 D3 TRANSMISSION ENABLE

11 12 13 14

TE

(ACTIVE LOW)

RF MODULES (434MHz)
Download datasheet: RF Transmitter.pdf

The RF module, as the name suggests, operates at Radio Frequency. The corresponding frequency range varies between 30 kHz & 300 GHz. In this RF system, the digital data is represented as variations in the amplitude of carrier wave. This kind of modulation is known as Amplitude Shift Keying (ASK).

Transmission through RF is better than IR (infrared) because of many reasons. Firstly, signals through RF can travel through larger distances making it suitable for long range applications. Also, while IR mostly operates in line-of-sight mode, RF signals can travel even when there is an obstruction between transmitter & receiver. Next, RF transmission is more strong and reliable than IR transmission. RF communication uses a specific frequency unlike IR signals which are affected by other IR emitting sources. This RF module comprises of an RF Transmitter and an RF Receiver. The transmitter/receiver (Tx/Rx) pair operates at a frequency of 434 MHz. An RF transmitter receives serial data and transmits it wirelessly through RF through its antenna connected at pin4. The transmission occurs at the rate of 1Kbps - 10Kbps.The transmitted data is received by an RF receiver operating at the same frequency as that of the transmitter. The RF module is often used along with a pair of encoder/decoder. The encoder is used for encoding parallel data for transmission feed while reception is decoded by a decoder. HT12E-HT12D, HT640-HT648, etc. are some commonly used encoder/decoder pair ICs.

Pin Description Transmitter Module Pin Number 1 2 3 4

Function Ground (0V) Serial Data Input Pin Supply Voltage (5V) Antenna Output Pin

Name GND DATA VCC ANT

Receiver Module Function Pin Number 1 2 3 4 5 6 7 8

Name

Ground (0V) GND Serial Data Output DATA Pin Linear Output Pin; NC Not Connected Supply Voltage VCC (5V) Supply Voltage VCC

(5V) Ground (0V) GND Ground (0V) GND Antenna Input Pin ANT

LCD Display

More microcontroller devices are using 'smart LCD' displays to output visual information. The following discussion covers the connection of a Hitachi LCD display to a PIC microcontroller. LCD displays designed around Hitachi's LCD HD44780 module, are inexpensive, easy to use, and it is even possible to produce a readout using the 8 x 80 pixels of the display. Hitachi LCD displays have a standard ASCII set of characters plus Japanese, Greek and mathematical symbols. A display For a 8-bit data bus, the display requires a +5V supply plus 11 I/O lines. For a 4-bit data bus it only requires the supply lines plus seven extra lines. When the LCD display is not enabled, data lines are tri-state which means they are in a state of high impendance (as though they are disconnected) and this means they do not interfere with the operation of the microcontroller when the display is not being addressed. The LCD also requires 3 "control" lines from the microcontroller. Enable (E) This line allows access to the display through R/W and RS lines. When this line is low, the LCD is disabled and ignores signals from R/W and RS. When (E) line is high, 16x2 line Hitachi HD44780

the LCD checks the state of the two control lines and responds accordingly. Read/Write This line determines the direction of data between the (R/W) LCD and microcontroller. When it is low, data is written to the LCD. When it is high, data is read from the LCD. Register select (RS) With the help of this line, the LCD interprets the type of data on data lines. When it is low, an instruction is being written to the LCD. When it is high, a character is being written to the LCD. Logic E 0 1 R/W 1 RS 0 status Access Access Writing Reading 0 1 Writing data to the LCD is done in on to to data data control LCD LCD to from lines: disabled enabled LCD LCD Instruction Character several steps:

Set Set Set Set Set Read data RS bit data

R/W to to E E from data logic data 0

bit or lines line line lines (if 1 (if

to (instruction it to to it is or is

low character) writing) high low reading)

Reading data from the LCD is done in the same way, but control line R/W has to be high. When we send a high to the LCD, it will reset and wait for instructions. Typical instructions sent to LCD display after a reset are: turning on a display, turning on a cursor and writing characters from left to right. When the LCD is initialized, it is ready to continue receiving data or instructions. If it receives a character, it will write it on the display and move the cursor one space to the right. The Cursor marks the next location where a character will be written. When we want to write a string of characters, first we need to set up the starting address, and then send one character at a time. Characters that can be shown on the display are stored in data display (DD) RAM. The size of DDRAM is 80 bytes.

The LCD display also possesses 64 bytes of Character-Generator (CG) RAM. This memory is used for characters defined by the user. Data in CG RAM is represented as an 8-bit character bit-map. Each character takes up 8 bytes of CG RAM, so the total number of characters, which the user can define is eight. In order to read in the character bit-map to the LCD display, we must first set the CG RAM address to starting point (usually 0), and then write data to the display. The definition of a 'special' character is given in the picture. Before we access DD RAM after defining a special character, the program must set the DD RAM address. Writing and reading data from any LCD memory is done from the last address which was set up using set-address instruction. Once the address of DD RAM is set, a new written character will be displayed at the appropriate place on the screen. Until now we discussed the operation of writing and reading to an LCD

as if it were an ordinary memory. But this is not so. The LCD controller needs 40 to 120 microseconds (uS) for writing and reading. Other operations can take up to 5 mS. During that time, the microcontroller can not access the LCD, so a program needs to know when the LCD is busy. We can solve this in two ways.

One way is to check the BUSY bit found on data line D7. This is not the best method because LCD's can get stuck, and program will then stay forever in a loop checking the BUSY bit. The other way is to introduce a delay in the program. The delay has to be long enough for the LCD to finish the operation in process. Instructions for writing to and reading from an LCD memory are shown in the previous table.

At the beginning we mentioned that we needed 11 I/O lines to communicate with an LCD. However, we can communicate with an

LCD through a 4-bit data bus. Thus we can reduce the total number of communication lines to seven. The wiring for connection via a 4-bit data bus is shown in the diagram below. In this example we use an LCD display with 2x16 characters, labeled LM16X212 by Japanese maker SHARP. The message 'character' is written in the first row: and two special characters '~' and '}' are displayed. In the second row we have produced the word 'mikroElektronika'.

AT89C51 5.1 INTRODUCTION Today, micro controllers have become an integral of all automatic and semi-automatic machines. Remote controllers, hand-held communication devices, dedicated controllers, have certainly improved the functional, operational and performance based specifications. Microcontrollers are single chip microcomputers, more suited for control and automation of machines and process. Microcontrollers have central processing unit (CPU), memory, I/O units, timers and counters, analog to digital converters (ADC), digital to analog converters (DAC), serial ports, interrupt logic, oscillator circuitry and many more functional blocks on chip. All these functional block on a single Integrated Circuit (IC), result into a reduced size of control board, low power consumption, more

reliability and ease of integration within an application design. The usage of micro controllers not only reduces the cost of automation, but also provides more flexibility 5.2 FEATURES Compatible with MCS-51 Products 4K Bytes of In-System Reprogrammable Flash Memory Endurance: 1,000 Write/Erase Cycles Fully Static Operation: 0 Hz to 24 MHz Three-level Program Memory Lock 128 x 8-bit Internal RAM 32 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt Sources Programmable Serial Channel Low-power Idle and Power-down Modes

5.3 DESCRIPTION

The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmels high-density non-volatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional non-volatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.

5.4 PIN CONFIGURATION

Fig.5.1 Pin configuration

5.5 BLOCK DIAGRAM

Fig.5.2. Block diagram

5.6 PIN DESCRIBTION VCC Supply voltage. GND Ground. PORT 0 Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode P0 has internal pull ups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pull ups are required during program verification. PORT 1 Port 1 is an 8-bit bi-directional I/O port with internal pull ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pull ups

and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull ups. Port 1 also receives the low-order address bytes during Flash programming and verification. PORT 2 Port 2 is an 8-bit bi-directional I/O port with internal pull ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pull ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX @ DPTR). In this application, it uses strong internal pull ups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. PORT 3 Port 3 is an 8-bit bi-directional I/O port with internal pull ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pull ups

and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull ups. Port 3 also serves the functions of various special features of the AT89C51 as listed below:

PORT PIN

ALTERNATE FUNCTIONS

P3.0

RXD (serial input port)

P3.1

TXD (serial output port)

P3.2

INT0 (external interrupt 0)

P3.3

INT1 (external interrupt 1)

P3.4 P3.5

T0 (timer 0 external input) T1 (timer 1 external input)

P3.6

WR (external data memory write strobe)

P3.7

RD (external data memory read strobe)

Port 3 also receives some control signals for Flash programming and verification. RST Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. ALE/PROG Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the

ALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN Program Store Enable is the read strobe to external program memory. When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA/VPP External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2

Output from the inverting oscillator amplifier. OSCILLATOR CHARACTERISTICS XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2. There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed. IDLE MODE In idle mode, the CPU puts itself to sleep while all the on-chip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in

this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory.

Fig.5.3. Oscillator Connections

Note: C1, C2 = 30 pF 10 pF for Crystals

= 40 pF 10 pF for Ceramic Resonators

Fig.5.4.External Clock Drive Configuration

2X16 LCD: Most LCD programmed in 8 bit configuration. Moreover LCD put on equipment that show the value of measurement, i.e. temperature, voltage, current, etc. There are a lot of tutorial show steps how to configure out in order to LCD on. But each LCD has own characteristic

Basic Specifications Power requirements User connector Connector pinout Serial Input 4.8 to 5.5Vdc @ 3mA 5-pin header; 0.025" posts on 0.10" centers +5V GND SERIAL GND +5V RS-232 or inverted TTL, 2400/9600, N81

Operating Temperature 0 to 50 C Initialization Instruction prefix LCD type Optimum viewing 6 o'clock direction switches LCD power; performs soft init ASCII 254 (0FE hex) Supertwist (STN), yellow-green

LCD Instructions by Function

This is different from our other serial LCDs, which use a protocol that's similar to a text terminal. The Backpack protocol's simplicity means that it can run at a very low clock rate (480kHz) for the lowest possible current draw. Function Clear screen Home cursor Blank display (retaining data) Hide cursor Show underline cursor Move cursor 1 character left Move cursor 1 character right Scroll 1 character left Scroll 1 character right Set display address (position the cursor) Move to 1st character of 1st line Move to nth character of 1st line Move to 1st character of 2nd line Move to nth character of 2nd line Set character-generator address ASCII Value 1 2 8 12 14 16 20 24 28 128 + location 128 128 + n 192 192 + n 64 + address

POWER SUPPLY UNIT: The input to the circuit is applied from the regulated power supply. The a.c. input i.e., 230V from the mains supply is step down by the transformer to 12V and is fed to a rectifier. The output obtained from the rectifier is a pulsating d.c voltage. So in order to get a pure d.c voltage, the output voltage from the rectifier is fed to a filter to remove any a.c components present even after rectification. Now, this voltage is given to a voltage regulator to obtain a pure constant dc voltage.

Circuit Diagram

Transformer: Usually, DC voltages are required to operate various electronic equipment and these voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly. Thus the a.c input available at the mains supply i.e., 230V is to be brought down to the required voltage level. This is done by a transformer. Thus, a step down transformer is employed to decrease the voltage to a required level. Rectifier: The output from the transformer is fed to the rectifier. It converts A.C. into pulsating D.C. The rectifier may be a half wave or a full wave rectifier. In this project, a bridge rectifier is used because of its merits like good stability and full wave rectification. Filter:

Capacitive filter is used in this project. It removes the ripples from the output of rectifier and smoothens the D.C. Output received from this filter is constant until the mains voltage and load is maintained constant. However, if either of the two is varied, D.C. voltage received at this point changes. Therefore a regulator is applied at the output stage.

Voltage regulator: As the name itself implies, it regulates the input applied to it. A voltage regulator is an electrical regulator designed to automatically maintain a constant voltage level. In this project, power supply of 5V and 12V are required. In order to obtain these voltage levels, 7805 and 7812 voltage regulators are to be used. The first number 78 represents positive supply and the numbers 05, 12 represent the required output voltage levels. Notice in the above diagram that a relay uses an electromagnet. This is a device consisting of a coil of wire wrapped around an iron core. When electricity is applied to the coil of wire it becomes magnetic, hence the term electromagnet. The A B and C terminals are an SPDT switch controlled by the electromagnet. When electricity is applied to V1 and V2, the electromagnet acts upon the SPDT switch so that the B and C terminals are connected. When the electricity is disconnected,

then the A and C terminals are connected. It is important to note that the electromagnet is magnetically linked to the switch but the two are NOT linked electrically.

SERIAL COMMUNICATION
3.1 INTRODUCTION Serial communication is basically the transmission or reception of data one bit at a time. Today's computers generally address data in bytes or some multiple thereof. A byte contains 8 bits. A bit is basically either a logical 1 or zero. Every character on this page is actually expressed internally as one byte. The serial port is used to convert each byte to a stream of ones and zeroes as well as to convert a stream of ones and zeroes to bytes. The serial port contains a electronic chip called a Universal Asynchronous Receiver/Transmitter (UART) that actually does the conversion. The serial port has many pins. We will discuss the transmit and receive pin first. Electrically speaking, whenever the serial port sends a logical one (1) a negative voltage is effected on the transmit pin. Whenever the serial port sends a logical zero (0) a positive voltage is affected. When no data is being sent, the serial port's transmit pin's voltage is negative (1) and is said to be in a MARK state. Note that the serial port can also be forced to keep the transmit pin at a positive voltage (0) and is said to be the SPACE or BREAK state. (The terms MARK and SPACE are also used to simply denote a negative voltage (1) or a positive voltage (0) at the transmit pin respectively). When transmitting a byte, the UART (serial port) first sends a START BIT which is a positive voltage (0), followed by the data (general 8 bits, but could be 5, 6, 7, or 8 bits) followed by one or two STOP Bits which is a negative(l) voltage. The sequence is repeated for each byte

sent. Figure shows a diagram of what a byte transmission would look like.

Fig 3.1 Byte Transmission At this point you may want to know what the duration of a bit is. In other words, how long does the signal stay in a particular state to define a bit. The answer is simple. It is dependent on the baud rate. The baud rate is the number of times the signal can switch states in one second. Therefore, if the line is operating at 9600 baud, the line can switch states 9,600 times per second. This means each bit has the duration of 1 '9600 of a second or about 100sec. When transmitting a character there are other characteristics other than the baud rate that must be known or that must be setup. These characteristics define the entire interpretation of the data stream. The first characteristic is the length of the byte that will be transmitted. This length in general can be anywhere from 5 to 8 bits. The second characteristic is parity. The parity characteristic can be even, odd, mark, space, or none. If even parity, then the last data bit transmitted will be a logical 1 if the data transmitted had an even amount of 0 bits. If odd parity, then the last data bit transmitted will be a logical 1 if the data transmitted had an odd amount of 0 bits. If MARK parity, then the last transmitted data bit will always be a logical 1. If SPACE parity, then the last transmitted data bit will always be a logical 0. If no parity then there is no parity bit transmitted. The third characteristic is the amount of stop bits. This value in general is 1 or 2. Assume we want to send the letter A' over the serial port. The binary representation of the letter 'A' is 01000001. Remembering that bits are transmitted from least significant bit (LSB) to most

significant bit (MSB), the bit stream transmitted would be as follows for the line characteristics 8 bits, no parity, 1 stop bit and 9600 baud. LSB (0100009101) MSB. The above represents (Start Bit) (Data Bits) (Stop Bit). To calculate the actual byte transfer rate simply divide the baud rate by the number of bits that must be transferred for each byte of data. In the case of the above example, each character requires 10 bits to be transmitted for each character. As such, at 9600 baud, up to 960 bytes can be transferred in one second. The above discussion was concerned with the "electrical/logical" characteristics of the data stream. We will expand the discussion to line protocol. Serial communication can be half duplex or full duplex. Full duplex communication means that a device can receive and transmit data at the same time. Half duplex means that the device cannot send and receive at the same time. It can do them both, but not at the same time. Half duplex communication is all but outdated except for a very small focused set of applications. Half duplex serial communication needs at a minimum two wires, signal ground and the data line. Full duplex serial communication needs at a minimum three wires, signal ground, transmit data line, and receive data line. The RS232 specification governs the physical and electrical characteristics of serial communications. This specification defines several additional signals that are asserted (set to logical 1) for information and control beyond the data signal. These signals are the Carrier Detect Signal (CD), asserted by modems to signal a successful connection to another modem, Ring Indicator (RI), asserted by modems to signal the phone ringing. Data Set Ready (DSR), asserted by modems to show their presence, Clear To Send (CTS), asserted by modems if they can receive data, Data Terminal Ready (DTR), asserted by terminals to show their presence, Request To Send (RTS), asserted by terminals if they can receive data. The section R.S232 Cabling describes these signals and how they are connected. The above paragraph alluded to hardware flow control. Hardware flow control is a method that two connected devices use to tell each other electronically when to send or

when not to send data. A modem in general drops (logical 0) its CTS line when it can no longer receive characters. It re-asserts it when it can receive again. A terminal does the same thing instead with the RTS signal. Another method of hardware flow control in practice is to perform the same procedure in the previous paragraph except that the DSR and DTR signals are used for the handshake. Note that hardware flow control requires the use of additional wires. The benefit to this however is crisp and reliable flow control. Another method of flow control used is known as software flow control. This method requires a simple 3 wire serial communication link, transmit data, receive data, and signal ground. If using this method, when a device can no longer receive, it will transmit a character that the two devices agreed on. This character is known as the XOFF character. 3.2 AN INTRODUCTION TO NULL MODEM Serial communications with RS232. One of the oldest and most widely spread communication methods in computer world. The way this type of communication can be performed is pretty well defined in standards. I.e. with one exception. The standards show the use of DTE/DCE communication, the way a computer should communicate with a peripheral device like a modem. For your information, DTE means Data Terminal Equipment (computers etc.) where DCE is the abbreviation of Data Communication Equipment (modems). One of the main uses of serial communication today where no modem is involved-a Serial Null Modem configuration with DTE/DTE communication-is not so well defined, especially when it comes to flow control. The terminology null modem for the situation where two computers communicate directly is so often used nowadays, that most people don't realize anymore the origin of the phrase and that a null modem connection is an exception, not the rule. In history, practical solutions were developed to let two computers talk with each other using a null modem serial communication line. In most situations, the original modem signal lines are reused to perform some sort of handshaking. Handshaking can increase the maximum allowed communication speed because it gives the computers the ability to control the flow of information.

A high amount of incoming data is allowed if the computer is capable to handle it. but not if it is busy performing other tasks. If no How control is implemented in the null modem connection, communication is only possible at speeds at which it is sure the receiving side can handle the amount information even under worst case conditions. 3.3 ORIGINAL USE OF RS232 When we look at the connector pin out of the RS232 port, we see two pins which are certainly used for flow control. These two pins are RTS, request to send and CTS, clear to send. With DTE/DCE communication (i.e. a computer communicating with a modem device) RTS is an output on the DTE and input on the DCE. CTS are the answering signal coming from the DCE. Before sending a character, the DTE asks permission by setting its RTS output. No information will be sent until the DCE grants permission by using the CTS line. If the DCE cannot handle new requests, the CTS signal will go low. A simple but useful mechanism allowing flow control in one direction. The assumption is that the DTE can always handle incoming information faster than the DCE can send it. In the past, this was true. Modem speeds of 300 baud were common and 1200 baud was seen as a high speed connection. The last flow control signal present in DTE/DCE communication is the CD carrier detect. It is not used directly for flow control, but mainly an indication of the ability of the modem device to communicate with its counter part. This signal indicates the existence of a communication Jink between two modem devices. 3.4 NULL MODEM WITHOUT HANDSHAKING How to use the handshaking lines in a null modem configuration? The simplest way is to don't use them at all. In that situation, only the data lines and signal ground are cross connected in the null modem communication cable. All other pins have no connection. An example of such a null modem cable without handshaking can be seen in the figure below.

Fig.3.2. Null Modem without Handshaking

3.5 COMPATIBILITY ISSUES If you read about null modems, this three wire null modem cable is often talked about. Yes, it is simple but can we use it in all circumstances? There is a problem, if either of the two devices checks the DSR or CD inputs. These signals normally define the ability of the other side to communicate. As they are not connected, their signal level will never go high. This might cause a problem. The same holds for the RTS/CTS handshaking sequence. If the software on both sides is well structured, the RTS output is set high and then a waiting cycle is started until a ready signal is received on the CTS line. This causes the software to hang because no physical connection is present to either CTS line to make this possible. The only type of communication which is allowed on such a null modem line is data-only traffic on the cross connected Rx/TX lines. This does however not mean that this null modem cable is useless. Communication links like present in the Norton Commander program can use this null modem cable. This null modem cable can also be used when communicating with devices which do not have modem control

signals like electronic measuring equipment etc. As you can imagine, with this simple null modem cable no hardware flow control can be implemented. The only way to perform flow control is with software flow control using the XOFF and XON characters.

CHAPTER 4
GSM MODEM

4.1 DEFINITION Global system for mobile communication (GSM) is a globally accepted standard for digital cellular communication. GSM is the name of a standardization group established in 1982 to create a common European' mobile telephone standard that would formulate specifications for a pan-European mobile cellular radio system operating at 900 MHz. 4.2 THE GSM NETWORK GSM provides recommendations, not requirements. The GSM specifications define the functions and interface requirements in detail but do not address the hardware. The reason for this is to limit the designers as little as possible but still to make it possible for the operators to buy equipment from different suppliers. The GSM network is divided into three major systems: the switching system (SS), the base station system (BSS), and the operation and support system (OSS). The basic GSM network elements are shown in below figure.

Fig.4.1. GSM Network Elements

4.3 GSM MODEM A GSM modem is a wireless modem that works with a GSM wireless network. A wireless modem behaves like a dial-up modem. The main difference between them is that a dialup modem sends and receives data through a fixed telephone line while a wireless modem sends and receives data through radio waves. A GSM modem can be an external device or a PC Card / PCMCIA Card. Typically, an external GSM modem is connected to a computer through a serial cable or a USB cable. A GSM modem in the form of a PC Card / PCMCIA Card is designed for use with a laptop computer. It should be inserted into one of the PC Card / PCMCIA Card slots of a laptop computer. Like a GSM mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to operate. As mentioned in earlier sections of this SMS tutorial, computers use AT commands to control modems. Both GSM modems and dial-up modems support a common set of standard AT commands. You can use a GSM modem just like a dial-up modem. In addition to the standard AT commands, GSM modems support an extended set of AT commands. These extended AT commands are defined in the GSM standards. With the extended AT commands, you can do things like: Reading, writing and deleting SMS messages. Sending SMS messages. Monitoring the signal strength. Monitoring the charging status and charge level of the battery.

Reading, Writing and searching phone book entries. The number of SMS messages that can be processed by a GSM modem per minute is

very low - only about six to ten SMS messages per minute. 4.4 MILESTONES OF GSM 1982-Confederation of European Post and Telegraph (CEPT) establishes Group Special

Mobile. 1985- Adoption of list of recommendation to be generated by the group. 1986- Different field tests for radio technique for the common air interface. 1987- TDMA chosen as Access Standard. MoU signed between 12 operators. 1988- Validation of system. 1989- Responsibility taken up ETSI 1990-First GSM specification released 1991-First commercial GSM system launched. 4.5 FREQUENCY RANGES OF GSM GSM works on 4 different frequency ranges with FDMA-TDMA and FDD.They are as follows. System Freq Uplink Freq Downlink P-GSM (Primary) 890-915MHz 935-960MHz E-GSM (Extended) 880-915MHz 925-960MHz GSM 1800 1710-1785MHz 1805-1880MHz GSM 1900 1850-1910MHz 1930-1990MHz

Table 4.1 Frequency range of GSM 4.6 SERVICES OF GSM Bearer Services Basic telecommunication services to transfer data b/w access points Specification of services up to the terminal interface (corresponding to OSI layers 1-3) Different data rates for voice and data (original standard) Data service (circuit switched)

Synchronous: 2.4, 4.8 or 9.6 KBit/s

Asynchronous: 300-- 1200 Bit/s

Data service (packet switched)


Synchronous: 2.4, 4.8 or 9.6 KBit/s Asynchronous: 300 - 9600 Bit/s Additionally: signaling channels for connection control (used by telematic services)

Tele Services Telecommunication services that enable voice communication via mobile phones. All services have to obey cellular functions, security measurements, etc. Offered services: Mobile telephony Primary goal of GSM was to enable mobile telephony offering the traditional bandwidth of 3.1 kHz _ Emergency number Common number throughout Europe (112); mandatory for all service providers; free of charge; connection with the highest priority (preemption of other connections possible) _ Multinumbering Several phone numbers per user possible Non-Voice-Teleservices Fax Voice mailbox (implemented in the fixed network supporting the mobile terminals) Electronic mail (MHS, Message Handling System, implemented in the fixed network) Short Message Service (SMS) Alphanumeric data transmission to/from the mobile terminal using the signaling channel, thus allowing simultaneous use of basic services and SMS Supplementary Services Services in addition to the basic services, cannot be offered stand-alone Similar to ISDN services besides lower bandwidth due to radio link

May differ between different service providers, countries and protocol Versions.

Important services Identification: forwarding of caller number Suppression of number forwarding Automatic call-back Conferencing with up to 7 participants Locking of the mobile terminal (incoming or outgoing calls 4.7 GSM ARCHITECTURE GSM is a PLMN (Public Land Mobile Network) several providers setup mobile networks following the GSM standard within each country. Diagram for GSM architecture

Fig.4.2 GSM architecture Components MS (mobile station)

BS (base station) MSC (mobile switching center) LR (location register)

Subsystems RSS (radio subsystem): covers all radio aspects NSS (network and switching subsystem): call forwarding, handover, switching OSS (operation subsystem): management of the network

Base Station Subsystem Transcoding Rate and Adaptation Unit (TRAD) Performs coding between the 64 kpbs PCM coding used in the backbone network and the 13 kbps coding used for the Mobile Station Base Station Controller (BSC) Controls the channel (time slot) allocation implemented by the BTSes Manages the handovers within the BSS area Knows which mobile stations are within the cell and informs the MSC/VLR about this Does now know the exact location of a MS before a call is made. Base Transceiver Station (BTS) Controls several transmitters Each transmitter has 8 time slots, some used for signaling, on a specific frequency

Maximum amount of frequencies and transmitters in a cell is 6, thus maximum capacity of a cell is 45 calls (+ 3 time slots for signaling).

Network and Switching Subsystem The backbone of a GSM network is an ordinary telephone network with some added capabilities Mobile Switching Center (MSC)

An ISDN exchange with additional capabilities to support mobile communications Visitor Location Register (VLR) A database, part of the MSC Contains the location of the active Mobile Stations

Gateway Mobile Switching Center (GMSC) Links the system to PSTN and other operators Home Location Register (HLR) Contains subscriber information, including authentication information in Authentication Center (AuC) Equipment Identity Register (EIR)

International Mobile Station Equipment Identity (IMEI) codes for e.g. blacklisting stolen phones.

Home Location Register One database per operator Contains all the permanent subscriber information MSISDN (Mobile Subscriber ISDN number) is the telephone number of the subscriber IMSI code is used to link the MSISDN number to the subscriber's SIM (Subscriber Identity Module) International Mobile Subscriber Identity (IMSI) is the 15 digit code used to identify the subscriber It incorporates a country and operator code Charging information Services available to the customer

Also the subscriber's present Location Area Code, which refers to the MSC, which can connect to the MS.

Mobile Station MS is the user's handset and has tv/o parts Mobile Equipment Radio equipment User interface

Processing capability and memory required for various tasks Encryption SMS messages Equipment IMEI number Subscriber Identity Module Subscriber Identity Module A small smart card

Encryption codes needed to identify the Subscriber

Subscriber IMSI number Subscriber's own information (telephone directory) Third party applications (banking etc.) Can also be used in other systems besides GSM, e.g. some WLAN access points accept SIM based user authentication Other Systems Operations Support System The management network for the whole GSM system Usually vendor dependent Very loosely specified in the GSM standards Value added services Voice mail Call forwarding

Group calls

Short Message Service Center Stores and forwards the SMS messages Like an e-mail server

Required to operate the SMS service

The SMS service was initially used to notify the subscriber about new voicemail.

4.8 SIMCOM SIM300GSM MODULE


INTRODUCTON SIMCOM SIM300 module connects to the specific application and the air interface. As SIM300 can be integrated with a wide range of applications, all functional components of SIM300 are described in great detail.

PRODUCT CONCEPT Designed for global market, SIM300 is a Tri-band GSM/GPRS engine that works on frequencies EGSM 900 MHz, DCS 1800 MHz and PCS 1900 MHz. SIM300 features GPRS multi-slot class 10/ class 8 (optional) and supports the GPRS coding schemes CS-1, CS-2, CS-3 and CS-4.

Fig.4.3 EVB top view

Designed for global market, SIM300 is a Tri-band GSM/GPRS engine that works on frequencies EGSM 900 MHz, DCS 1800 MHz and PCS 1900 MHz. SIM300 features GPRS multi-slot class 10/ class 8 (optional) and supports the GPRS coding schemes CS-1, CS-2, CS-3 and CS-4.With a tiny configuration of 40mm x 33mm x 2.85mm , SIM300 can fit almost all the space requirements in our applications, such as smart phone, PDA phone and other mobile devices. In this hardware SIM300 is only interfaced with RS232, Regulated power Supply 4.0V SIM Tray Antenna with LED indications. A: SIM300 module interface B: SIM card interface C: headset interface D: Download switch, turn on or off download function E: VBAT switch, switch the voltage source from the adaptor or external battery F: PWRKEY key, turn on or turn off SIM300 G: RESET key H: expand port, such as keypad port, main and debug serial port, display port I: MAIN serial port for downloading, AT command transmitting, data exchanging J: DEBUG serial port

K: hole for fixing the antenna L: source adapter interface M: light N: buzzer O: headphones interface P: hole for fixing the SIM300

NETWORK STATUS INDICATION LED LAMP State SIM300 function Off - SIM300 is not running 64ms On/ 0.8 sec Off - SIM300 does not find the network 64ms On/ 3 Sec Off - SIM300 find the network 64ms On/ 0.3 sec Off - GPRS communication

SIM CARD INTERFACE You can use AT Command to get information in SIM card. The SIM interface supports the functionality of the GSM Phase 1 specification and also supports the functionality of the new GSM Phase 2+ specification for FAST 64 kbps SIM (intended for use with a SIM application Tool-kit).Both 1.8V and 3.0V SIM Cards are supported.The SIM interface is powered from an internal regulator in the module having nominal voltage 2.8V. All pins reset as outputs driving low.

Fig.4.4 SIM card interface AT Command Format A command line is a string of characters sent from a DTE to the modem (DCE) while the modem is in a command state. A command line has a prefix, a body, and a terminator. Each command line (with the exception of the A/ command) must begin with the character sequence AT and must be terminated by a carriage return. Commands entered in upper case or lower cases are accepted, but both the A and T must be of the same case, i.e., AT or at. The default terminator is the ENTER key <CR> character. Characters that precede the AT prefix are ignored. The command line interpretation begins upon receipt of the ENTER key character. Characters within the command line are parsed as commands with associated parameter values. The basic commands consist of single ASCII characters, or single characters proceeded by a prefix character (e.g., & or +), followed by a decimal parameter. Missing decimal parameters are evaluated as 0.

4.9 APPLICATIONS Access control devices

Now access control devices can communicate with servers and security staff through SMS messaging. Complete log of transaction is available at the head-office Server instantly without any wiring involved and device can instantly alert security personnel on their mobile phone in case of any problem. RaviRaj Technologies is introducing this technology in all Fingerprint Access control and time attendance products. Transaction terminals: EDC machines, POS terminals can use SMS messaging to confirm transactions from central servers. The main benefit is that central server can be anywhere in the world. Today you need local servers in every city v/ith multiple telephone lines. You save huge infrastructure costs as well as per transaction cost. Supply Chain Management: Today SCM require huge IT infrastructure with leased lines, networking devices, data centre, workstations and still you have large downtimes and high costs. You can do all this at a fraction of the cost with GSM M2M technology. A central server in your head office with GSM capability is the answer; you can receive instant transaction data from all your branch offices, warehouses and business associates with nil downtime low cost.

SENDING SMS MESSAGES FROM A COMPUTER USING A MOBILE PHONE OR GSM/GPRS MODEM: The SMS specification has defined a way for a computer to send SMS messages through a mobile phone or GSM/GPRS modem. A GSM/GPRS modem is a wireless modem that works with GSM/GPRS wireless networks. A wireless modem is similar to a dial-up modem. The main difference is that a wireless modem transmits data through a wireless network whereas a dial-up modem transmits data through a copper telephone line. More information about GSM/GPRS modems will be provided in the section "Introduction to

GSM / GPRS Wireless Modems". Most mobile phones can be used as a wireless modem. However, some mobile phones have certain limitations comparing to GSM/GPRS modems. This will be discussed in the section "Which is Better: Mobile Phone or GSM / GPRS Modem" later. To send SMS messages, first place a valid SIM card from a wireless carrier into a mobile phone or GSM/GPRS modem, which is then connected to a computer. There are several ways to connect a mobile phone or GSM/GPRS modem to a computer. For example, they can be connected through a serial cable, a USB cable, a Bluetooth link or an infrared link. The actual way to use depends on the capability of the mobile phone or GSM/GPRS modem. For example, if a mobile phone does not support Bluetooth, it cannot connect to the computer through a Bluetooth link. After connecting a mobile phone or GSM/GPRS modem to a computer, you can control the mobile phone or GSM/GPRS modem by sending instructions to it. The instructions used for controlling the mobile phone or GSM/GPRS modem are called AT commands. (AT commands are also used to control dial-up modems for wired telephone system.) Dial-up modems, mobile phones and GSM/GPRS modems support a common set of standard AT commands. In addition to this common set of standard AT commands, mobile phones and GSM/GPRS modems support an extended set of AT commands. One use of the extended AT commands is to control the sending and receiving of SMS messages. The following table lists the AT commands that are related to the writing and sending of SMS messages:

AT command +CMGS +CMSS +CMGW +CMGD

Meaning Send message Send message from storage Write message to memory Delete message

AT command +CMGC +CMMS

Meaning Send command More messages to send

One way to send AT commands to a mobile phone or GSM/GPRS modem is to use a terminal program. A terminal program's function is like this: It sends the characters you typed to the mobile phone or GSM/GPRS modem. It then displays the response it receives from the mobile phone or GSM/GPRS modem on the screen. The terminal program on Microsoft Windows is called HyperTerminal. More details about the use of Microsoft HyperTerminal can be found in the "How to Use Microsoft HyperTerminal to Send AT Commands to a Mobile Phone or GSM/GPRS Modem" section of this SMS tutorial. Below shows a simple example that demonstrates how to use AT commands and the HyperTerminal program of Microsoft Windows to send an SMS text message. The lines in bold type are the command lines that should be entered in HyperTerminal. The other lines are responses returned from the GSM / GPRS modem or mobile phone.

AT OK AT+CMGF=1 OK AT+CMGW="+85291234567" > A simple demo of SMS text messaging. +CMGW: 1 OK AT+CMSS=1 +CMSS: 20

OK

Here is a description of what is done in the above example:

Line 1: "AT" is sent to the GSM / GPRS modem to test the connection. The GSM / GPRS modem sends back the result code "OK" (line 2), which means the connection between the HyperTerminal program and the GSM / GPRS modem works fine.

Line 3: The AT command +CMGF is used to instruct the GSM / GPRS modem to operate in SMS text mode. The result code "OK" is returned (line 4), which indicates the command line "AT+CMGF=1" has been executed successfully. If the result code "ERROR" is returned, it is likely that the GSM / GPRS modem does not support the SMS text mode. To confirm, type "AT+CMGF=?" in the HyperTerminal program. If the response is "+CMGF: (0,1)" (0=PDU mode and 1=text mode), then SMS text mode is supported. If the response is "+CMGF: (0)", then SMS text mode is not supported.

Line 5 and 6: The AT command +CMGW is used to write an SMS text message to the message storage of the GSM / GPRS modem. "+85291234567" is the recipient mobile phone number. After typing the recipient mobile phone number, you should press the Enter button of the keyboard. The GSM / GPRS modem will then return a prompt "> " and you can start typing the SMS text message "A simple demo of SMS text messaging.". When finished, press Ctrl+z of the keyboard.

Line 7: "+CMGW: 1" tells us that the index assigned to the SMS text message is 1. It indicates the location of the SMS text message in the message storage. Line 9: The result code "OK" indicates the execution of the AT command +CMGW is successful. Line 10: The AT command +CMSS is used to send the SMS text message from the message storage of the GSM / GPRS modem. "1" is the index of the SMS text message obtained from line 7.

Line 11: "+CMSS: 20" tells us that the reference number assigned to the SMS text message is 20. Line 13: The result code "OK" indicates the execution of the AT command +CMSS is successful.

To send SMS messages from an application, you have to write the source code for connecting to and sending AT commands to the mobile phone or GSM/GPRS modem, just like what a terminal program does. You can write the source code in C, C++, Java, Visual Basic, Delphi or other programming languages you like. However, writing your own code has a few disadvantages:

You have to learn how to use AT commands. You have to learn how to compose the bits and bytes of an SMS message. For example, to specify the character encoding (e.g. 7-bit encoding and 16-bit Unicode encoding) of an SMS message, you need to know which bits in the message header should be modified and what value should be assigned.

Sending SMS messages with a mobile phone or GSM/GPRS modem has a drawback -- the SMS transmission speed is low. As your SMS messaging application becomes more popular, it has to handle a larger amount of SMS traffic and finally the mobile phone or GSM/GPRS modem will not be able to take the load. To obtain a high SMS transmission speed, a direct connection to an SMSC or SMS gateway of a wireless carrier or SMS service provider is needed. However, AT commands are not used for communicating with an SMS center or SMS gateway. This means your have to make a big change to your SMS messaging application in order to move from a wireless-modem-based solution to a SMSC-based solution.

In most cases, instead of writing your own code for interacting with the mobile phone or GSM/GPRS modem via AT commands, a better solution is to use a high-level SMS messaging API (Application programming interface) / SDK (Software development kit) / library. The API / SDK / library encapsulates the low-level details. So, an SMS application developer does not need to know AT commands and the composition of SMS messages in the bit-level. Some SMS messaging APIs / SDKs / libraries support SMSC protocols in

addition to AT commands. To move from a wireless-modem-based SMS solution to a SMSC-based SMS solution, usually you just need to modify a configuration file / property file or make a few changes to your SMS messaging application's source code. The links to some open source and free SMS messaging libraries can be found in the article "Free Libraries/Tools for Sending/Receiving SMS with a Computer". Another way to hide the low-level AT command layer is to place an SMS gateway between the SMS messaging application and the mobile phone or GSM/GPRS modem. (This has been described in the section "What is an SMS Gateway?" earlier.) Simple protocols such as HTTP / HTTPS can then be used for sending SMS messages in the application. If an SMSC protocol (e.g. SMPP, CIMD, etc) is used for communicating with the SMS gateway instead of HTTP / HTTPS, an SMS messaging API / SDK / library can be very helpful to you since it encapsulates the SMSC protocol's details. Usually a list of supported / unsupported mobile phones or wireless modems is provided on the web site of an SMS messaging API / SDK / library or an SMS gateway software package. Remember to check the list if you are going to use an SMS messaging API / SDK / library or an SMS gateway software package.

4.9 APPLICATIONS SUITABLE FOR GSM COMMUNICATION If your application needs one or more of the following features, GSM will be more costeffective then other communication systems. Short Data Size You data size per transaction should be small like 1-3 lines, e.g. banking transaction data, sales/purchase data, consignment tracking data, updates. These small but important transaction data can be sent through SMS messaging which cost even less then a local telephone call or sometimes free of cost worldwide. Hence with negligible cost you are able to send critical

information to your head office located anywhere in the world from multiple points. You can also transfer faxes, large data through GSM but this will be as or more costly compared to landline networks.

Multiple remote data collection points: If you have multiple data collections points situated all over your city, state, country or worldwide you will benefit the most. The data can be sent from multiple points like your branch offices, business associates, warehouses, and agents with devices like GSM modems connected to PCs, GSM electronic terminals and Mobile phones. Many a times some places like warehouses may be situated at remote location may not have landline or internet but you will have GSM network still available easily. High uptime If your business require high uptime and availability GSM is best suitable for you as GSM mobile networks have high uptime compared to landline, internet and other communication mediums. Also in situations where you expect that someone may sabotage your communication systems by cutting wires or taping landlines, you can depend on GSM. Large transaction volumes: GSM SMS messaging can handle large number of transaction in a very short time. You can receive large number SMS messages on your server like e-mails without internet connectivity. E-mails normally get delayed a lot but SMS messages are almost instantaneous for instant transactions. Consider situation like shop owners doing credit card transaction with GSM technology instead of conventional landlines time you find local transaction servers busy as these servers use multiple telephone lines to take care of multiple transactions, whereas one GSM connection is enough to handle hundreds of transaction per minute. Mobility, Quick installation

GSM technology allows mobility, GSM terminals, modems can be just picked and installed at other location unlike telephone lines. Also you can be mobile with GSM terminals and can also communicate with server using your mobile phone. You can just purchase the GSM hardware like modems, terminals and mobile handsets, insert SIM cards, configure software and your are ready for GSM communication. GSM solutions can be implemented within few weeks whereas it may take many months to implement the infrastructure for other technologies. 4.10 ADVANTAGES OF GSM OVER ANALOG SYSTEMS Capacity increases Reduced RF transmission power and longer battery life. International roaming capability. Better security against fraud (through terminal validation and user authentication). Encryption capability for information security and privacy.

Compatibility with ISDN, leading to wider range of services

Software profile

The Keil tool chain consists of the following executables located in the c:\c51eval\bin directory: Vision uvw51e.exe C Compiler c51.exe Assembler a51.exe Linker bL51.exe dScope dsw51.exe Vision IDE Vision is a Windows based front end for the C Compiler and Assembler. It was developed in the USA as was the printed manual set. Compiler, Assembler and Linker options are set with simple mouse clicks. Vision runs on Windows 3.1, 95 and NT. The Compiler, Assembler and Linker are DOS executables. They can be accessed with your favorite batch files if you prefer. This provides maximum flexibility. This Integrated Development Environment (IDE) has been expressly designed with the user in mind. A full function editor is included. All

IDE functions are intuitive via pull down menus with prompted selections. An extensive Help utility is included. External executables can be run from within Vision. This includes emulator software. C51 C Compiler for the 8051, 8x931Hx and 8x931Ax [USB] The C51 ANSI compiler along with the A51 assembler is designed specifically for the Intel MCS8051 microcontroller family, including the 8x931 USB. The C51 is 100% compatible with existing 8051programs. Extensions provide access to all 8051 hardware components. Sample USB/931 code is available: www.keil.com/usb. C51 supports code banking. The compiler can be run in either DOS mode or called from the Windows based front end Vision. run from Vision which is included with every Assembler and Compiler package.

Evaluation Version of the Keil Tool Set:

The evaluation version of the Keil tool set is restricted to a 2K code size and the code must be located at 0x4000. Useful object code is produced. Other than these restrictions, the tool set works exactly as the full version does. This allows you to fully evaluate the features and power of Keil products. The full version has no restrictions and is fully ANSI compliant.

Application Advantages Conclusion

references

S-ar putea să vă placă și