Embedded Documentation

download Embedded Documentation

of 56

Transcript of Embedded Documentation

  • 7/28/2019 Embedded Documentation

    1/56

    One of the tools we use most when debugging our projects isserialinput/output. Serial is very easy to

    implement, and it allows you to send/receive any data you need from your microcontroller to a

    computer's serial port so it can be viewed using aterminal emulator. These two devices are compatible

    from a software perspective, however you can't just hook a microcontroller up to a computer because the

    hardware interfaces are not compatible.

    Most microcontrollers these days have built in UARTs (universally asynchronous receiver/transmitter)

    that can be used to receive and transmit data serially. UARTs transmit one bit at a time at a specified data

    rate (i.e. 9600bps, 115200bps, etc.). This method of serial communication is sometimes referred to

    as TTL serial (transistor-transistor logic). Serial communication at aTTLlevel will always remain

    between the limits of0V and Vcc, which is often 5V or 3.3V. A logic high ('1') is represented by Vcc, while

    a logic low ('0') is 0V.

    The serial port on your computer (if it's lucky enough to have one, they're quickly becoming a relic)

    complies with theRS-232(Recommended Standard 232) telecommunications standard. RS-232 signals

    are similar to your microcontroller's serial signals in that they transmit one bit at a time, at aspecificbaudrate, with or withoutparityand/or stop bits. The two differ solely at a hardware level. By the

    RS-232 standard a logic high ('1') is represented by a negative voltage anywhere from -3 to -25V while

    a logic low ('0') transmits a positive voltage that can be anywhere from +3 to +25V. On most PCs these

    signals swing from -13 to +13V.

    More recent laptop computers have USB ports instead of serial ports. This converter will plug into your

    USB port and provide a COM port for your GPS receiver. Use with a USB hub to get multiple com ports .

    Introduction:

    Microcontroller:

    A microcontroller is a small computer on a single integrated circuit containing a processor core,

    memory, and programmable input/output peripherals. Program memory in the form of NOR

    flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM.

    Microcontrollers are designed for embedded applications, in contrast to the microprocessors used

    in personal computers or other general purpose applications.

    Microcontrollers are used in automatically controlled products and devices, such as

    automobile engine control systems, implantable medical devices, remote controls, office

    machines, appliances, power tools, toys and other embedded systems. By reducing the size and

    cost compared to a design that uses a separate microprocessor, memory, and input/output

    devices, microcontrollers make it economical to digitally control even more devices and

    http://en.wikipedia.org/wiki/Asynchronous_serial_communicationhttp://en.wikipedia.org/wiki/Asynchronous_serial_communicationhttp://en.wikipedia.org/wiki/Asynchronous_serial_communicationhttp://en.wikipedia.org/wiki/Terminal_emulatorhttp://en.wikipedia.org/wiki/Terminal_emulatorhttp://en.wikipedia.org/wiki/Terminal_emulatorhttp://en.wikipedia.org/wiki/Transistor-transistor_logichttp://en.wikipedia.org/wiki/Transistor-transistor_logichttp://en.wikipedia.org/wiki/Transistor-transistor_logichttp://en.wikipedia.org/wiki/RS-232http://en.wikipedia.org/wiki/RS-232http://en.wikipedia.org/wiki/RS-232http://en.wikipedia.org/wiki/Baudhttp://en.wikipedia.org/wiki/Baudhttp://en.wikipedia.org/wiki/Baudhttp://en.wikipedia.org/wiki/Parity_bithttp://en.wikipedia.org/wiki/Parity_bithttp://en.wikipedia.org/wiki/Parity_bithttp://en.wikipedia.org/wiki/Parity_bithttp://en.wikipedia.org/wiki/Baudhttp://en.wikipedia.org/wiki/RS-232http://en.wikipedia.org/wiki/Transistor-transistor_logichttp://en.wikipedia.org/wiki/Terminal_emulatorhttp://en.wikipedia.org/wiki/Asynchronous_serial_communication
  • 7/28/2019 Embedded Documentation

    2/56

    processes. Mixed signal microcontrollers are common, integrating analog components needed to

    control non-digital electronic systems.

    Some microcontrollers may use four-bit words and operate at clock rate frequencies as

    low as 4 kHz, for low power consumption (single-digit milliwatts or microwatts). They willgenerally have the ability to retain functionality while waiting for an event such as a button press

    or other interrupt; power consumption while sleeping (CPU clock and most peripherals off) may

    be just nanowatts, making many of them well suited for long lasting battery applications. Other

    microcontrollers may serve performance-critical roles, where they may need to act more like

    a digital signal processor(DSP), with higher clock speeds and power consumption.

    The first single-chip microprocessor was the 4-bit Intel 4004 released in 1971, with the Intel

    8008 and other more capable microprocessors becoming available over the next several years.

    However, both processors required external chips to implement a working system, raising total

    system cost, and making it impossible to economically computerize appliances.

    The Smithsonian Institution says engineers Gary Boone and Michael Cochran succeeded in

    creating the first microcontroller in 1971. The result of their work was the TMS 1000, which

    went commercial in 1974. It combined read-only memory, read/write memory, processor and

    clock on one chip and was targeted at embedded systems.

    Partly in response to the existence of the single-chip TMS 1000, Intel developed a computersystem on a chip optimized for control applications, the Intel 8048, with commercial parts first

    shipping in 1977. It combined RAM and ROM on the same chip. This chip would find its way

    into over one billion PC keyboards, and other numerous applications. At that time Intel's

    President, Luke J. Valenter, stated that the microcontroller was one of the most successful in the

    company's history, and expanded the division's budget over 25%.

    Most microcontrollers at this time had two variants. One had an erasable EPROM program

    memory, with a transparent quartz window in the lid of the package to allow it to be erased byexposure to ultraviolet light. The other was a PROM variant which was only programmable

    once; sometimes this was signified with the designation OTP, standing for "one-time

    programmable". The PROM was actually exactly the same type of memory as the EPROM, but

    because there was no way to expose it to ultraviolet light, it could not be erased. The erasable

    versions required ceramic packages with quartz windows, making them significantly more

  • 7/28/2019 Embedded Documentation

    3/56

    expensive than the OTP versions, which could be made in lower-cost opaque plastic packages.

    For the erasable variants, quartz was required, instead of less expensive glass, for its

    transparency to ultravioletglass is largely opaque to UVbut the main cost differentiator was

    the ceramic package itself.

    In 1993, the introduction of EEPROM memory allowed microcontrollers (beginning with the

    Microchip PIC16x84)to be electrically erased quickly without an expensive package as required

    for EPROM, allowing both rapid prototyping, and In System Programming. (EEPROM

    technology had been available prior to this time, but the earlier EEPROM was more expensive

    and less durable, making it unsuitable for low-cost mass-produced microcontrollers.) The same

    year, Atmel introduced the first microcontroller using Flash memory, a special type of

    EEPROM. Other companies rapidly followed suit, with both memory types.

    Cost has plummeted over time, with the cheapest 8-bit microcontrollers being available for under

    $0.25 in quantity (thousands) in 2009 and some 32-bit microcontrollers around $1 for similar

    quantities.

    Nowadays microcontrollers are cheap and readily available for hobbyists, with large online

    communities around certain processors.

    In the future, MRAM could potentially be used in microcontrollers as it has infinite endurance

    and its incremental semiconductor wafer process cost is relatively low.

    EMBEDDED SYSTEM DESIGN:

    A microcontroller can be considered a self-contained system with a processor, memory and

    peripherals and can be used as an embedded system. The majority of microcontrollers in use

    today are embedded in other machinery, such as automobiles, telephones, appliances, and

    peripherals for computer systems. While some embedded systems are very sophisticated, many

    have minimal requirements for memory and program length, with no operating system, and low

    software complexity. Typical input and output devices include

    switches, relays, solenoids, LED's, small or custom LCD displays, radio frequency devices, and

    sensors for data such as temperature, humidity, light level etc. Embedded systems usually have

    no keyboard, screen, disks, printers, or other recognizable I/O devices of a personal computer,

    and may lack human interaction devices of any kind.

  • 7/28/2019 Embedded Documentation

    4/56

    Interrupts:

    Microcontrollers must provide real time (predictable, though not necessarily fast) response to

    events in the embedded system they are controlling. When certain events occur,

    an interrupt system can signal the processor to suspend processing the current instruction

    sequence and to begin an interrupt service routine (ISR, or "interrupt handler"). The ISR will

    perform any processing required based on the source of the interrupt before returning to the

    original instruction sequence. Possible interrupt sources are device dependent, and often include

    events such as an internal timer overflow, completing an analog to digital conversion, a logic

    level change on an input such as from a button being pressed, and data received on a

    communication link. Where power consumption is important as in battery operated devices,

    interrupts may also wake a microcontroller from a low power sleep state where the processor is

    halted until required to do something by a peripheral event.

    Programs:

    Typically microcontroller programs must fit in the available on-chip program memory, since it

    would be costly to provide a system with external, expandable, memory. Compilers and

    assemblers are used to convert high-level language and assembler language codes into a

    compact machine code for storage in the microcontroller's memory. Depending on the device,

    the program memory may be permanent, read-only memory that can only be programmed at the

    factory, or program memory may be field-alterable flash or erasable read-only memory.

    Manufacturers have often produced special versions of their microcontrollers in order to help the

    hardware and software development of the target system. Originally these included EPROM

    versions that have a "window" on the top of the device through which program memory can be

    erased by ultraviolet light, ready for reprogramming after a programming ("burn") and test cycle.

    Since 1998, EPROM versions are rare and have been replaced by EEPROM and flash, which are

    easier to use (can be erased electronically) and cheaper to manufacture.

    Other versions may be available where the ROM is accessed as an external device rather than as

    internal memory, however these are becoming increasingly rare due to the widespread

    availability of cheap microcontroller programmers.

  • 7/28/2019 Embedded Documentation

    5/56

    The use of field-programmable devices on a microcontroller may allow field update of

    the firmware or permit late factory revisions to products that have been assembled but not yet

    shipped. Programmable memory also reduces the lead time required for deployment of a new

    product.

    Where hundreds of thousands of identical devices are required, using parts programmed at the

    time of manufacture can be an economical option. These "mask programmed" parts have the

    program laid down in the same way as the logic of the chip, at the same time.

    A customizable microcontroller incorporates a block of digital logic that can be personalized in

    order to provide additional processing capability, peripherals and interfaces that are adapted to

    the requirements of the application. For example, the AT91CAP from Atmel has a block of logic

    that can be customized during manufacture according to user requirements.

    Other microcontroller features:

    Microcontrollers usually contain from several to dozens of general

    purpose input/output pins (GPIO). GPIO pins are software configurable to either an input or an

    output state. When GPIO pins are configured to an input state, they are often used to read sensors

    or external signals. Configured to the output state, GPIO pins can drive external devices such as

    LEDs or motors.

    Many embedded systems need to read sensors that produce analog signals. This is the purpose of

    the analog to digital converter (ADC). Since processors are built to interpret and process digital

    data, i.e. 1s and 0s, they are not able to do anything with the analog signals that may be sent to it

    by a device. So the analog to digital converter is used to convert the incoming data into a form

    that the processor can recognize. A less common feature on some microcontrollers is a digital to

    analog (DAC) that allows the processor to output analog signals or voltage levels.

    In addition to the converters, many embedded microprocessors include a variety of timers as

    well. One of the most common types of timers is the Programmable Interval Timer (PIT). A PITmay either count down from some value to zero, or up to the capacity of the count register,

    overflowing to zero. Once it reaches zero, it sends an interrupt to the processor indicating that it

    has finished counting. This is useful for devices such as thermostats, which periodically test the

    temperature around them to see if they need to turn the air conditioner on, the heater on, etc.

  • 7/28/2019 Embedded Documentation

    6/56

    A dedicated Pulse Width Modulation (PWM) block makes it possible for the CPU to control

    power converters, resistive loads, motors, etc., without using lots of CPU resources in tight

    timer loops.

    Universal Asynchronous Receiver/Transmitter (UART) block makes it possible to receive andtransmit data over a serial line with very little load on the CPU.

    Higher Integration:

    Micro-controllers may not implement an external address or data bus as they integrate RAM and

    non-volatile memory on the same chip as the CPU. Using fewer pins, the chip can be placed in a

    much smaller, cheaper package.

    Integrating the memory and other peripherals on a single chip and testing them as a unit

    increases the cost of that chip, but often results in decreased net cost of the embedded system as

    a whole. Even if the cost of a CPU that has integrated peripherals is slightly more than the cost of

    a CPU and external peripherals, having fewer chips typically allows a smaller and cheaper circuit

    board, and reduces the labor required to assemble and test the circuit board, in addition to

    tending to decrease the defect rate for the finished assembly.

    A micro-controller is a single integratedcircuit, commonly with the following features:

    central processing unit - ranging from small and simple 4-bit processors to complex 32- or

    64-bit processors

    volatile memory (RAM) for data storage

    ROM, EPROM, EEPROM orFlash memory for program and operating parameter storage

    discrete input and output bits, allowing control or detection of the logic state of an individual

    package pin

    serial input/output such as serial ports (UARTs)

    otherserial communications interfaces like IC, Serial Peripheral Interface and Controller

    Area Networkfor system interconnect

    peripherals such as timers, event counters, PWM generators, and watchdog

    http://en.wikipedia.org/wiki/Integrated_circuithttp://en.wikipedia.org/wiki/Integrated_circuithttp://en.wikipedia.org/wiki/Integrated_circuithttp://en.wikipedia.org/wiki/Central_processing_unithttp://en.wikipedia.org/wiki/RAMhttp://en.wikipedia.org/wiki/Read-only_memoryhttp://en.wikipedia.org/wiki/EPROMhttp://en.wikipedia.org/wiki/EEPROMhttp://en.wikipedia.org/wiki/Flash_memoryhttp://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/UARThttp://en.wikipedia.org/wiki/Serial_communicationshttp://en.wikipedia.org/wiki/Network_interface_controllerhttp://en.wikipedia.org/wiki/I%C2%B2Chttp://en.wikipedia.org/wiki/Serial_Peripheral_Interfacehttp://en.wikipedia.org/wiki/Controller_Area_Networkhttp://en.wikipedia.org/wiki/Controller_Area_Networkhttp://en.wikipedia.org/wiki/Peripheralhttp://en.wikipedia.org/wiki/Timerhttp://en.wikipedia.org/wiki/Pulse-width_modulationhttp://en.wikipedia.org/wiki/Watchdog_timerhttp://en.wikipedia.org/wiki/Watchdog_timerhttp://en.wikipedia.org/wiki/Pulse-width_modulationhttp://en.wikipedia.org/wiki/Timerhttp://en.wikipedia.org/wiki/Peripheralhttp://en.wikipedia.org/wiki/Controller_Area_Networkhttp://en.wikipedia.org/wiki/Controller_Area_Networkhttp://en.wikipedia.org/wiki/Serial_Peripheral_Interfacehttp://en.wikipedia.org/wiki/I%C2%B2Chttp://en.wikipedia.org/wiki/Network_interface_controllerhttp://en.wikipedia.org/wiki/Serial_communicationshttp://en.wikipedia.org/wiki/UARThttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Flash_memoryhttp://en.wikipedia.org/wiki/EEPROMhttp://en.wikipedia.org/wiki/EPROMhttp://en.wikipedia.org/wiki/Read-only_memoryhttp://en.wikipedia.org/wiki/RAMhttp://en.wikipedia.org/wiki/Central_processing_unithttp://en.wikipedia.org/wiki/Integrated_circuit
  • 7/28/2019 Embedded Documentation

    7/56

    clock generator- often an oscillator for a quartz timing crystal, resonator orRC circuit

    many include analog-to-digital converters, some include digital-to-analog converters

    in-circuit programming and debugging support

    This integration drastically reduces the number of chips and the amount of wiring and circuitboard space that would be needed to produce equivalent systems using separate chips.

    Furthermore, on low pin count devices in particular, each pin may interface to several internal

    peripherals, with the pin function selected by software. This allows a part to be used in a wider

    variety of applications than if pins had dedicated functions. Micro-controllers have proved to be

    highly popular in embedded systems since their introduction in the 1970s.

    Some microcontrollers use a Harvard architecture: separate memory buses for instructions and

    data, allowing accesses to take place concurrently. Where a Harvard architecture is used,instruction words for the processor may be a different bit size than the length of internal memory

    and registers; for example: 12-bit instructions used with 8-bit data registers.

    The decision of which peripheral to integrate is often difficult. The microcontroller vendors often

    trade operating frequencies and system design flexibility against time-to-market requirements

    from their customers and overall lower system cost. Manufacturers have to balance the need to

    minimize the chip size against additional functionality.

    Microcontroller architectures vary widely. Some designs include general-purposemicroprocessor cores, with one or more ROM, RAM, or I/O functions integrated onto the

    package. Other designs are purpose built for control applications. A micro-controller instruction

    set usually has many instructions intended for bit-wise operations to make control programs

    more compact. For example, a general purpose processor might require several instructions to

    test a bit in a register and branch if the bit is set, where a micro-controller could have a single

    instruction to provide that commonly required function.

    Microcontrollers typically do not have a math coprocessor, so floating point arithmetic isperformed by software.

    Accelerometer ADXL335:

    http://en.wikipedia.org/wiki/Clock_generatorhttp://en.wikipedia.org/wiki/RC_circuithttp://en.wikipedia.org/wiki/Printed_circuit_boardhttp://en.wikipedia.org/wiki/Printed_circuit_boardhttp://en.wikipedia.org/wiki/Embedded_systemhttp://en.wikipedia.org/wiki/Harvard_architecturehttp://en.wikipedia.org/wiki/Math_coprocessorhttp://en.wikipedia.org/wiki/Floating_pointhttp://en.wikipedia.org/wiki/Floating_pointhttp://en.wikipedia.org/wiki/Math_coprocessorhttp://en.wikipedia.org/wiki/Harvard_architecturehttp://en.wikipedia.org/wiki/Embedded_systemhttp://en.wikipedia.org/wiki/Printed_circuit_boardhttp://en.wikipedia.org/wiki/Printed_circuit_boardhttp://en.wikipedia.org/wiki/RC_circuithttp://en.wikipedia.org/wiki/Clock_generator
  • 7/28/2019 Embedded Documentation

    8/56

    GENERAL DESCRIPTION :

    The ADXL335 is a small, thin, low power, complete 3-axis accelerometer with signal

    conditioned voltage outputs. The product measures acceleration with a minimum full-scale range

    of 3 g. It can measure the static acceleration of gravity in tilt-sensing applications, as well asdynamic acceleration resulting from motion, shock, or vibration.

    The user selects the bandwidth of the accelerometer using the CX, CY, and CZ capacitors at the

    XOUT, YOUT, and ZOUT pins. Bandwidths can be selected to suit the application, with a range

    of 0.5 Hz to 1600 Hz for the X and Y axes, and a range of 0.5 Hz to 550 Hz for the Z axis.

    The ADXL335 is available in a small, low profile, 4 mm 4 mm 1.45 mm, 16-lead, plastic

    lead frame chip scale package (LFCSP_LQ)

    FEATURES: 3-axis sensing

    Small, low profile package

    4 mm 4 mm 1.45 mm LFCSP

    Low power : 350 A (typical)

    Single-supply operation: 1.8 V to 3.6 V

  • 7/28/2019 Embedded Documentation

    9/56

    10,000gshock survival

    Excellent temperature stability

    BW adjustment with a single capacitor per axis

    PIN CONFIGURATION AND FUNCTION DESCRIPTIONS OF ADXL335:

    Pin Function Descriptions Pin No. Mnemonic Description

    1 NC No Connect1.

    2 ST Self-Test.

    3 COM Common.

    4 NC No Connect1.

    5 COM Common.

    6 COM Common.

    7 COM Common.

    8 ZOUT Z Channel Output.

    9 NC No Connect1.

  • 7/28/2019 Embedded Documentation

    10/56

    10 YOUT Y Channel Output.

    11 NC No Connect1.

    12 XOUT X Channel Output.

    13 NC No Connect1.

    14 VS Supply Voltage (1.8 V to 3.6 V).

    15 VS Supply Voltage (1.8 V to 3.6 V).

    16 NC No Connect1.

    EP Exposed Pad Not internally connected. Solder

    for mechanical integrity.

    APPLICATIONS:

    Cost sensitive, low power, motion- and tilt-sensing applications

    Mobile devices

    Gaming systems

    Disk drive protection

    Image stabilization

    Sports and health devices

    HARDWARE COMPONETS:

    ATMEGA8:

    PINDIAGRAM:

  • 7/28/2019 Embedded Documentation

    11/56

    .BLOCK DIAGRAM

  • 7/28/2019 Embedded Documentation

    12/56

    FEATURES:

    High-performance, Low-power AVR 8-bit Microcontroller

  • 7/28/2019 Embedded Documentation

    13/56

    Advanced RISC Architecture

    130 Powerful InstructionsMost Single-clock Cycle Execution

    32 x 8 General Purpose Working Registers

    Fully Static Operation

    Up to 16 MIPS Throughput at 16 MHz

    On-chip 2-cycle Multiplier

    High Endurance Non-volatile Memory segments

    8K Bytes of In-System Self-programmable Flash program memory

    512 Bytes EEPROM

    1K Byte Internal SRAM

    Write/Erase Cycles: 10,000 Flash/100,000 EEPROM

    Data retention: 20 years at 85C/100 years at 25C

    Optional Boot Code Section with Independent Lock Bits

    In-System Programming by On-chip Boot Program

    True Read-While-Write Operation

    Programming Lock for Software Security

    Peripheral Features

    Two 8-bit Timer/Counters with Separate Prescaler, one Compare Mode

    One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture

    Mode

    Real Time Counter with Separate Oscillator

    Three PWM Channels

    8-channel ADC in TQFP and QFN/MLF package

    Eight Channels 10-bit Accuracy

    6-channel ADC in PDIP package

    Six Channels 10-bit Accuracy

    Byte-oriented Two-wire Serial Interface

    Programmable Serial USART

    Master/Slave SPI Serial Interface

    Programmable Watchdog Timer with Separate On-chip Oscillator

    On-chip Analog Comparator

  • 7/28/2019 Embedded Documentation

    14/56

    Special Microcontroller Features

    Power-on Reset and Programmable Brown-out Detection

    Internal Calibrated RC Oscillator

    External and Internal Interrupt Sources

    Five Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, and

    Standby

    I/O and Packages

    23 Programmable I/O Lines

    28-lead PDIP, 32-lead TQFP, and 32-pad QFN/MLF

    Operating Voltages

    2.7 - 5.5V (ATmega8L)

    4.5 - 5.5V (ATmega8)

    Speed Grades

    0 - 8 MHz (ATmega8L)

    0 - 16 MHz (ATmega8)

    Power Consumption at 4 MHz, 3V, 25C

    Active: 3.6 mA

    Idle Mode: 1.0 mA

    Power-down Mode: 0.5 A

    Pin Descriptions

    VCC Digital supply voltage.

    GND Ground.

    Port B (PB7..PB0)

    XTAL1/XTAL2/TOSC1/

    TOSC2

    Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The

    Port B output buffers have symmetrical drive characteristics with both high sink and source

    capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up

    resistors are activated. The Port B pins are tri-stated when a reset condition becomes active,

    even if the clock is not running.

  • 7/28/2019 Embedded Documentation

    15/56

    Depending on the clock selection fuse settings, PB6 can be used as input to the inverting

    Oscillator

    amplifier and input to the internal clock operating circuit.

    Depending on the clock selection fuse settings, PB7 can be used as output from the inverting

    Oscillator amplifier.

    If the Internal Calibrated RC Oscillator is used as chip clock source, PB7..6 is used as TOSC2..1

    input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set.

    Port C (PC5..PC0) Port C is an 7-bit bi-directional I/O port with internal pull-up resistors

    (selected for each bit). The

    Port C output buffers have symmetrical drive characteristics with both high sink and source

    capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up

    resistors are activated. The Port C pins are tri-stated when a reset condition becomes active,

    even if the clock is not running.

    PC6/RESET If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the

    electrical characteristics

    of PC6 differ from those of the other pins of Port C.

    If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on this pin

    for longer than the minimum pulse length will generate a Reset, even if the clock is not running.

    Shorter pulses are not guaranteed to generate a Reset.

    Port D (PD7..PD0) Port D is an 8-bit bi-directional I/O port with internal pull-up resistors

    (selected for each bit). The

    Port D output buffers have symmetrical drive characteristics with both high sink and source

    capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up

    resistors are activated. The Port D pins are tri-stated when a reset condition becomes active,

    even if the clock is not running.

    RESET- Reset input. A low level on this pin for longer than the minimum pulse length will

    generate a

    AVCC- AVCC is the supply voltage pin for the A/D Converter, Port C (3..0), and ADC (7..6). It

    should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it

    should be connected to VCC through a low-pass filter. Note that Port C (5..4) use digital supply

    voltage, VCC.

  • 7/28/2019 Embedded Documentation

    16/56

    AREF- AREF is the analog reference pin for the A/D Converter.

    ADC7..6 (TQFP and QFN/MLF Package Only)

    In the TQFP and QFN/MLF package, ADC7..6 serve as analog inputs to the A/D converter.

    These pins are powered from the analog supply and serve as 10-bit ADC channels

    UART:

    A Universal Asynchronous Receiver/Transmitter, abbreviated UART , is a piece ofcomputer

    hardware that translates data between parallel and serial forms. UARTs are commonly used in

    conjunction with communication standards such as EIA, RS-232, RS-422 orRS-485.

    The universaldesignation indicates that the data format and transmission speeds are

    configurable. The electric signaling levels and methods (such as differential signaling etc.) are

    handled by a driver circuit external to the UART. A UART is usually an individual (or part of

    an) integrated circuit used forserial communications over a computer or peripheral device serial

    port. UARTs are now commonly included in microcontrollers. A dual UART, orDUART,

    combines two UARTs into a single chip. Many modern ICs now come with a UART that can

    also communicate synchronously; these devices are called USARTs (universal

    synchronous/asynchronous receiver/transmitter).

    RS232:

    In telecommunications,RS-232 is the traditional name for a series of standards

    forserialbinary single-ended data and control signals connecting between aDTE(Data Terminal

    Equipment) and aDCE(Data Circuit-terminating Equipment). It is commonly used

    in computerserial ports. The standard defines the electrical characteristics and timing of signals,

    the meaning of signals, and the physical size and pinout of connectors.

    An RS-232serial portwas once a standard feature of a personal computer, used for connections

    to modems, printers, mice, data storage, uninterruptible, and other peripheral devices. However,

    the low transmission speed, large voltage swing, and large standard connectors motivated

    development of the universal serial bus, which has displaced RS-232 from most of its peripheral

    interface roles. Many modern personal computers have no RS-232 ports and must use an external

    http://en.wikipedia.org/wiki/Computer_hardwarehttp://en.wikipedia.org/wiki/Computer_hardwarehttp://en.wikipedia.org/wiki/Parallel_communicationhttp://en.wikipedia.org/wiki/Serial_communicationhttp://en.wikipedia.org/wiki/Electronic_Industries_Alliancehttp://en.wikipedia.org/wiki/RS-232http://en.wikipedia.org/wiki/RS-422http://en.wikipedia.org/wiki/RS-485http://en.wikipedia.org/wiki/Differential_signalinghttp://en.wikipedia.org/wiki/Integrated_circuithttp://en.wikipedia.org/wiki/Serial_communicationshttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Telecommunicationshttp://en.wikipedia.org/wiki/Serial_communicationhttp://en.wikipedia.org/wiki/Single-ended_signalinghttp://en.wikipedia.org/wiki/Data_transmissionhttp://en.wikipedia.org/wiki/Signaling_(telecommunications)http://en.wikipedia.org/wiki/Data_Terminal_Equipmenthttp://en.wikipedia.org/wiki/Data_Terminal_Equipmenthttp://en.wikipedia.org/wiki/Data_circuit-terminating_equipmenthttp://en.wikipedia.org/wiki/Computerhttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Pinouthttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Personal_computerhttp://en.wikipedia.org/wiki/Modemhttp://en.wikipedia.org/wiki/Printer_(computing)http://en.wikipedia.org/wiki/Mouse_(computing)http://en.wikipedia.org/wiki/USBhttp://en.wikipedia.org/wiki/USBhttp://en.wikipedia.org/wiki/Mouse_(computing)http://en.wikipedia.org/wiki/Printer_(computing)http://en.wikipedia.org/wiki/Modemhttp://en.wikipedia.org/wiki/Personal_computerhttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Pinouthttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Computerhttp://en.wikipedia.org/wiki/Data_circuit-terminating_equipmenthttp://en.wikipedia.org/wiki/Data_Terminal_Equipmenthttp://en.wikipedia.org/wiki/Data_Terminal_Equipmenthttp://en.wikipedia.org/wiki/Signaling_(telecommunications)http://en.wikipedia.org/wiki/Data_transmissionhttp://en.wikipedia.org/wiki/Single-ended_signalinghttp://en.wikipedia.org/wiki/Serial_communicationhttp://en.wikipedia.org/wiki/Telecommunicationshttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Serial_communicationshttp://en.wikipedia.org/wiki/Integrated_circuithttp://en.wikipedia.org/wiki/Differential_signalinghttp://en.wikipedia.org/wiki/RS-485http://en.wikipedia.org/wiki/RS-422http://en.wikipedia.org/wiki/RS-232http://en.wikipedia.org/wiki/Electronic_Industries_Alliancehttp://en.wikipedia.org/wiki/Serial_communicationhttp://en.wikipedia.org/wiki/Parallel_communicationhttp://en.wikipedia.org/wiki/Computer_hardwarehttp://en.wikipedia.org/wiki/Computer_hardware
  • 7/28/2019 Embedded Documentation

    17/56

    USB-to-RS-232 converter to connect to RS-232 peripherals. RS-232 devices are still found,

    especially in industrial machines or scientific instruments.

    Pinouts

    The following table lists commonly used RS-232 signals and pin assignments.[3]

    Signal Origin

    D

    B-

    25

    DE-

    9

    (TI

    A-

    574)

    MM

    J

    8P8C("RJ45") 10P10C("RJ50")

    NameAbbreviat

    ion

    DT

    E

    DC

    E

    TI

    A-

    561

    Yo

    st

    Cyclade

    s[4]

    National

    Instrumen

    ts[5]

    Cyclade

    s[4]

    Digi[

    6]

    Transmit

    ted DataTxD 2 3 2 6 3 3 8 4 5

    Received

    DataRxD 3 2 5 5 6 6 9 7 6

    Data

    Terminal

    Ready

    DTR 20 4 1 3 2 2 7 3 9

    Carrier

    DetectDCD 8 1 2

    7

    7 10 8

    10

    (alt

    2)

    Data Set

    ReadyDSR 6 6 6

    1

    8 5 92

    (alt

    10)

    Ring

    IndicatorRI 22 9 2 10 1

    Request RTS 4 7 8 1 1 4 2 3

    http://en.wikipedia.org/wiki/Serial_port#cite_note-3http://en.wikipedia.org/wiki/Serial_port#cite_note-3http://en.wikipedia.org/wiki/Serial_port#cite_note-3http://en.wikipedia.org/wiki/D-subminiaturehttp://en.wikipedia.org/wiki/D-subminiaturehttp://en.wikipedia.org/wiki/D-subminiaturehttp://en.wikipedia.org/wiki/D-subminiaturehttp://en.wikipedia.org/wiki/D-subminiaturehttp://en.wikipedia.org/wiki/D-subminiaturehttp://en.wikipedia.org/wiki/D-subminiaturehttp://en.wikipedia.org/wiki/TIA-574http://en.wikipedia.org/wiki/TIA-574http://en.wikipedia.org/wiki/TIA-574http://en.wikipedia.org/wiki/TIA-574http://en.wikipedia.org/wiki/TIA-574http://en.wikipedia.org/wiki/Modified_Modular_Jackhttp://en.wikipedia.org/wiki/Modified_Modular_Jackhttp://en.wikipedia.org/wiki/Modified_Modular_Jackhttp://en.wikipedia.org/wiki/Modular_connector#8P8Chttp://en.wikipedia.org/wiki/Modular_connector#8P8Chttp://en.wikipedia.org/wiki/Modular_connector#10P10Chttp://en.wikipedia.org/wiki/Modular_connector#10P10Chttp://en.wikipedia.org/wiki/Data_terminal_equipmenthttp://en.wikipedia.org/wiki/Data_terminal_equipmenthttp://en.wikipedia.org/wiki/Data_terminal_equipmenthttp://en.wikipedia.org/wiki/Data_circuit-terminating_equipmenthttp://en.wikipedia.org/wiki/Data_circuit-terminating_equipmenthttp://en.wikipedia.org/wiki/Data_circuit-terminating_equipmenthttp://en.wikipedia.org/wiki/Modular_connector#8P8Chttp://en.wikipedia.org/wiki/Modular_connector#8P8Chttp://en.wikipedia.org/wiki/Modular_connector#8P8Chttp://en.wikipedia.org/wiki/Modular_connector#8P8Chttp://en.wikipedia.org/wiki/Serial_port#cite_note-cyclom-y-4http://en.wikipedia.org/wiki/Serial_port#cite_note-cyclom-y-4http://en.wikipedia.org/wiki/Serial_port#cite_note-cyclom-y-4http://en.wikipedia.org/wiki/Serial_port#cite_note-niserial-5http://en.wikipedia.org/wiki/Serial_port#cite_note-niserial-5http://en.wikipedia.org/wiki/Serial_port#cite_note-niserial-5http://en.wikipedia.org/wiki/Serial_port#cite_note-cyclom-y-4http://en.wikipedia.org/wiki/Serial_port#cite_note-cyclom-y-4http://en.wikipedia.org/wiki/Serial_port#cite_note-cyclom-y-4http://en.wikipedia.org/wiki/Digi_Internationalhttp://en.wikipedia.org/wiki/Digi_Internationalhttp://en.wikipedia.org/wiki/Serial_port#cite_note-digi-6http://en.wikipedia.org/wiki/Serial_port#cite_note-digi-6http://en.wikipedia.org/wiki/Serial_port#cite_note-digi-6http://en.wikipedia.org/wiki/Digi_Internationalhttp://en.wikipedia.org/wiki/Digi_Internationalhttp://en.wikipedia.org/wiki/Serial_port#cite_note-cyclom-y-4http://en.wikipedia.org/wiki/Serial_port#cite_note-niserial-5http://en.wikipedia.org/wiki/Serial_port#cite_note-cyclom-y-4http://en.wikipedia.org/wiki/Modular_connector#8P8Chttp://en.wikipedia.org/wiki/Modular_connector#8P8Chttp://en.wikipedia.org/wiki/Modular_connector#8P8Chttp://en.wikipedia.org/wiki/Data_circuit-terminating_equipmenthttp://en.wikipedia.org/wiki/Data_circuit-terminating_equipmenthttp://en.wikipedia.org/wiki/Data_terminal_equipmenthttp://en.wikipedia.org/wiki/Data_terminal_equipmenthttp://en.wikipedia.org/wiki/Modular_connector#10P10Chttp://en.wikipedia.org/wiki/Modular_connector#8P8Chttp://en.wikipedia.org/wiki/Modified_Modular_Jackhttp://en.wikipedia.org/wiki/Modified_Modular_Jackhttp://en.wikipedia.org/wiki/TIA-574http://en.wikipedia.org/wiki/TIA-574http://en.wikipedia.org/wiki/TIA-574http://en.wikipedia.org/wiki/D-subminiaturehttp://en.wikipedia.org/wiki/D-subminiaturehttp://en.wikipedia.org/wiki/D-subminiaturehttp://en.wikipedia.org/wiki/D-subminiaturehttp://en.wikipedia.org/wiki/D-subminiaturehttp://en.wikipedia.org/wiki/Serial_port#cite_note-3
  • 7/28/2019 Embedded Documentation

    18/56

    To Send

    Clear To

    SendCTS 5 8 7 8 5 3 6 8

    Common

    Ground G common 7 5 3,4 4 4,5 4 6 5 7

    Protectiv

    e GroundPG common 1 1 4

    The signals are named from the standpoint of the DTE, for example, an IBM-PC compatible

    serial port. The ground signal is a common return for the other connections; it appears on two

    pins in the Yost standard but is the same signal. The DB-25 connector includes a second

    "protective ground" on pin 1. Connecting this to pin 7 (signal reference ground) is a common

    practice but not essential.

    The RS-232 standard is used by many specialized and custom-built devices. This list includes

    some of the more common devices that are connected to the serial port on a PC. Some of these

    such as modems and serial mice are falling into disuse while others are readily available.

    Serial ports are very common on most types ofmicrocontroller, where they can be used to

    communicate with a PC or other serial devices.

    Dial-up modems

    GPS receivers (typically NMEA 0183 at 4,800 bit/s)

    Bar code scanners and otherpoint of sale devices

    LED and LCD text displays

    Satellite phones, low-speed satellite modems and other satellite based transceiver devices

    Flat-screen (LCD and Plasma) monitors to control screen functions by external computer,

    other AV components or remotes

    Test and measuring equipment such as digital multimeters and weighing systems

    Updating Firmware on various consumer devices.

    Some CNC controllers

    Uninterruptible power supply

    Stenography orStenotype machines.

    http://en.wikipedia.org/wiki/Single-ended_signalinghttp://en.wikipedia.org/wiki/Microcontrollerhttp://en.wikipedia.org/wiki/Modemhttp://en.wikipedia.org/wiki/Global_Positioning_Systemhttp://en.wikipedia.org/wiki/NMEA_0183http://en.wikipedia.org/wiki/Barcode_readerhttp://en.wikipedia.org/wiki/Point_of_salehttp://en.wikipedia.org/wiki/Light-emitting_diodehttp://en.wikipedia.org/wiki/Liquid_crystal_displayhttp://en.wikipedia.org/wiki/Satellite_phonehttp://en.wikipedia.org/wiki/Multimeterhttp://en.wikipedia.org/wiki/Firmwarehttp://en.wikipedia.org/wiki/Numerical_controlhttp://en.wikipedia.org/wiki/Uninterruptible_power_supplyhttp://en.wikipedia.org/wiki/Stenotypehttp://en.wikipedia.org/wiki/Stenotypehttp://en.wikipedia.org/wiki/Uninterruptible_power_supplyhttp://en.wikipedia.org/wiki/Numerical_controlhttp://en.wikipedia.org/wiki/Firmwarehttp://en.wikipedia.org/wiki/Multimeterhttp://en.wikipedia.org/wiki/Satellite_phonehttp://en.wikipedia.org/wiki/Liquid_crystal_displayhttp://en.wikipedia.org/wiki/Light-emitting_diodehttp://en.wikipedia.org/wiki/Point_of_salehttp://en.wikipedia.org/wiki/Barcode_readerhttp://en.wikipedia.org/wiki/NMEA_0183http://en.wikipedia.org/wiki/Global_Positioning_Systemhttp://en.wikipedia.org/wiki/Modemhttp://en.wikipedia.org/wiki/Microcontrollerhttp://en.wikipedia.org/wiki/Single-ended_signaling
  • 7/28/2019 Embedded Documentation

    19/56

    Software debuggers that run on a second computer.

    Industrial field buses

    Printers

    Computer terminal, teletype

    Olderdigital cameras

    Networking (Macintosh AppleTalkusing RS-422 at 230.4 kbit/s)

    Serial mouse

    OlderGSM mobile phones

    Some Telescopes

    GSM THEORY:

    In recent years, vehicle thefts are increasing at an alarming rate around the world. People

    have started to use the theft control systems installed in their vehicles. The commercially

    available anti-theft vehicular systems are very expensive. Here, we make a modest attempt to

    design & develop a simple, low cost vehicle theft control scheme using an inbuilt

    microcontroller. This scheme involves a microcontroller & a mobile for the communication

    purposes The Global System for Mobile communications (GSM) is the most popular standard for

    mobile phones in the world. Over billion people use GSM service across the world. The usability

    of the GSM standard makes international roaming very common between mobile phone

    operators, enabling subscribers to use their phones in many parts of the world. GSM differs

    significantly from its predecessors in that both signaling and speech channels are digital, which

    means that it is considered a second generation (2G) mobile phone system. This fact has also

    meant that data communication was built into the system from very early on. We start off

    exploring the existing scenarios and later we move towards the proposed architecture, describing

    the various modules in detail and the working methodology. Finally we present the simulation

    results and the various component details. The concept of this paper has been implemented as a

    small prototype model.

    http://en.wikipedia.org/wiki/Printer_(computing)http://en.wikipedia.org/wiki/Computer_terminalhttp://en.wikipedia.org/wiki/Teletypehttp://en.wikipedia.org/wiki/Digital_camerahttp://en.wikipedia.org/wiki/Computer_networkhttp://en.wikipedia.org/wiki/AppleTalkhttp://en.wikipedia.org/wiki/RS-422http://en.wikipedia.org/wiki/Mouse_(computing)http://en.wikipedia.org/wiki/Groupe_Sp%C3%A9cial_Mobilehttp://en.wikipedia.org/wiki/Mobile_phone#Software_and_applicationshttp://en.wikipedia.org/wiki/GoTo_(telescopes)http://en.wikipedia.org/wiki/GoTo_(telescopes)http://en.wikipedia.org/wiki/Mobile_phone#Software_and_applicationshttp://en.wikipedia.org/wiki/Groupe_Sp%C3%A9cial_Mobilehttp://en.wikipedia.org/wiki/Mouse_(computing)http://en.wikipedia.org/wiki/RS-422http://en.wikipedia.org/wiki/AppleTalkhttp://en.wikipedia.org/wiki/Computer_networkhttp://en.wikipedia.org/wiki/Digital_camerahttp://en.wikipedia.org/wiki/Teletypehttp://en.wikipedia.org/wiki/Computer_terminalhttp://en.wikipedia.org/wiki/Printer_(computing)
  • 7/28/2019 Embedded Documentation

    20/56

    GSM module is used to establish communication between a computer and a GSM-GPRS

    system. Global System for Mobile communication (GSM) is an architecture used for mobile

    communication in most of the countries. Global Packet Radio Service (GPRS) is an extension

    of GSM that enables higher data transmission rate. GSM/GPRS module consists of a

    GSM/GPRS modem assembled together with power supply circuit and communication

    interfaces (like RS-232, USB, etc) for computer. The MODEM is the soul of such modules.

    Wireless MODEMs:

    Wireless MODEMs are the MODEM devices that generate, transmit or decode data from acellular network, for establishing communication between the cellular network and the computer.

    These are manufactured for specific cellular network (GSM/UMTS/CDMA) or specific cellular

    data standard (GSM/UMTS/GPRS/EDGE /HSDPA) or technology (GSM/SIM). Wireless

    MODEMs like other MODEM devices use serial communication to interface with and

    need Hayes compatible AT Commands for communication with the computer (any

    microprocessor or microcontroller system).

  • 7/28/2019 Embedded Documentation

    21/56

    GSM MODEM:

    GSM/GPRS MODEM is a class of wireless MODEM devices that are designed for

    communication of a computer with the GSM and GPRS network. It requires a SIM (Subscriber

    Identity Module) card just like mobile phones to activate communication with the network. Also

    they have IMEI (International Mobile Equipment Identity) number similar to mobile phones for

    their identification. A GSM/GPRS MODEM can perform the following operations:

    1. Receive, send or delete SMS messages in a SIM.

    2. Read, add, search phonebook entries of the SIM.

    3. Make, Receive, or reject a voice call.

    The MODEM needs AT commands, for interacting with processor or controller, which are

    communicated through serial communication. These commands are sent by the

    controller/processor. The MODEM sends back a result after it receives a command. Different AT

    commands supported by the MODEM can be sent by the processor/controller/computer to

    interact with the GSM and GPRS cellular network.

  • 7/28/2019 Embedded Documentation

    22/56

    GSM Module:

    A GSM/GPRS module assembles a GSM/GPRS modem with standard communication interfaces

    like RS-232 (Serial Port), USB etc., so that it can be easily interfaced with a computer or a

    microprocessor / microcontroller based system. The power supply circuit is also built in the

    module that can be activated by using a suitable adaptor.

    Mobile Station (Cell phones and SIM):

    A mobile phone and Subscriber Identity Module (SIM) together form a mobile station. It is the

    user equipment that communicates with the mobile network. A mobile phone comprises of

    Mobile Termination, Terminal Equipment and Terminal Adapter.

  • 7/28/2019 Embedded Documentation

    23/56

    Mobile Termination is interfaced with the GSM mobile network and is controlled by abaseband processor. It handles access to SIM, speech encoding and decoding, signaling and other

    network related tasks. The Terminal Equipment is an application processor that deals with

    handling operations related to keypad, screen, phone memory and other hardware and software

    services embedded into the handset. The Terminal Adapter establishes communication between

    the Terminal Equipment and the Mobile Termination using AT commands. The communication

    with the network in a GSM/GPRS mobile is carried out by the baseband processor.

    Difference between GSM mobile and GSM/GPRS module:

    A GSM mobile is a complete system in itself with embedded processors that are dedicated to

    provide an interface between the user and the mobile network. The AT commands are served

    between the processors of the mobile termination and the terminal equipment. The mobile

    handset can also be equipped with a USB interface to connect with a computer, but it may or

    may not support AT commands from the computer or an external processor/controller.

    The GSM/GPRS module, on the other hand, always needs a computer or external

    processor/controller to receive AT commands from. GSM/GPRS module itself does not provide

    any interface between the user and the network, but the computer to which module is connected

    is the interface between user and network.

  • 7/28/2019 Embedded Documentation

    24/56

    An advantage that GSM/GPRS modules offer is that they support concatenated SMS which may

    not be supported in some GSM mobile handsets. Also some mobile handsets cant receive MMS

    when connected to a computer.

    Applications of GSM/GPRS module:

    The GSM/GPRS module demonstrates the use of AT commands. They can feature all the

    functionalities of a mobile phone through computer like making and receiving calls, SMS, MMS

    etc. These are mainly employed for computer based SMS and MMS services.

    AT Commands:

    AT commands are used to control MODEMs. AT is the abbreviation for Attention. These

    commands come from Hayes commands that were used by the Hayes smart modems. The Hayes

    commands started with AT to indicate the attention from the MODEM. The dial up and wireless

    MODEMs (devices that involve machine to machine communication) need AT commands to

    interact with a computer. These include the Hayes command set as a subset, along with other

    extended AT commands.

    AT commands with a GSM/GPRS MODEM or mobile phone can be used to access following

    information and services:

    1. Information and configuration pertaining to mobile device or MODEM and SIM card.

    2. SMS services.

    3. MMS services.

    4. Fax services.

    5. Data and Voice link over mobile network.

    The Hayes subset commands are called the basic commands and the commands specific to a

    GSM network are called extended AT commands.

  • 7/28/2019 Embedded Documentation

    25/56

    Command, Information response and Result Codes:

    The AT commands are sent by the computer to the MODEM/ mobile phone. The MODEM sends

    back an Information Response i.e. the information requested by or pertaining to the action

    initiated by the AT command. This is followed by a Result Code. The result code tells about thesuccessful execution of that command.

    EXECUTION OF AT COMMANDS BLOCK DIAGRAM.

    There are also unsolicited Result Codes that are returned automatically by the MODEM to notify

    the occurrence of an event. For example the reception of a SMS will force MODEM to return anunsolicited result code.

  • 7/28/2019 Embedded Documentation

    26/56

    AT commands' syntax:

    Case Sensitivity -

    The AT commands are generally used in uppercase letters. However some MODEMs and mobile

    phones allow both uppercase and small case letters.Single Command -

    The AT commands include a prefix AT which indicates the beginning of the command to

    MODEM; and a carriage return which indicates the end of the command.

    AT COMMANDS SYNTAX

    However string AT itself is not the part of the command. For example in ATD, D is the

    command name not ATD.

    The extended AT commands have a + in the command name.

    For example: AT+CGMI

    Command Line -

    Multiple AT commands can be sent to MODEM in a single command line. The commands in a

    line are separated by a semi-colon (;).

    For example: AT+CGMI; +CBS

    String in Command Line

    Strings in a command line are enclosed in double quotes.

  • 7/28/2019 Embedded Documentation

    27/56

    For example: AT+CGML=ALL

    AT COMMAND LINE.

    Information Response and Result Code:

    The Information Response and Result Codes, returned by the MODEM, have a carriage return

    and line feed in the beginning as well as at the end.

    For example:

    OK

    ERROR

    +CBC: 0, 60 etc.

  • 7/28/2019 Embedded Documentation

    28/56

    Sequence of Execution -

    In the command line, the command appearing first is executed first. The execution then follows

    for second appeared command and so on. The execution of commands in a command line takes

    place in sequential manner.

    If an error occurs in the execution of a command, an error result code is returned by the

    MODEM and the execution of the command line is terminated irrespective of presence of other

    commands next in the command line.

    Types of commands:

    There are four types of AT commands:

    1) Test commands2) Read commands

    3) Set commands

    4) Execution commands.

    RESULT CODE DESCRIPTION

    OK Successful execution of a command

    ERROR Execution of a command failed

    +CMS ERROR Message service failure with return of a error code

    UN SOLICITED RESULT CODES+CDS Notify receipt of SMS status report of a new message to computer

    +CMT Notify forwarding of a new SMS to computer

    +CMTI Notify recipient of a message status

    Interfacing MODEM/Mobile phone with Windows platform:

    The Windows (XP and lower versions) comes with an application called HyperTerminal for

    data communication through serial port of the computer. The interfacing of the GSM/GPRS

    module with the serial port of the computer involves following steps:

    Connect RS-232 port of GSM module with the serial port of the computer. Insert a SIM card in

    the module.

    Open HyperTerminal from Start -> All Programs -> Accessories -> Communications -

    > HyperTerminal.

    Enter a name for the connection and press OK.

  • 7/28/2019 Embedded Documentation

    29/56

    Now select the communication port (COM) at which GSM module is connected.

    Create a new connection set on HyperTerminal. Set parameters, like baud rate as 9600,

    handshaking mode as none, parity bit as none, stop bit as 1 and data bit as 8.

    GLOBAL POSITIONING SYSTEM

    The Global Positioning System (GPS) is a space-based satellite navigation system that provides

    location and time information in all weather conditions, anywhere on or near the Earth where

    there is an unobstructed line of sight to four or more GPS satellites. The system provides critical

    capabilities to military, civil and commercial users around the world. It is maintained by

    the United States government and is freely accessible to anyone with a GPS receiver.

    The GPS project was developed in 1973 to overcome the limitations of previous navigation

    systems,[1]integrating ideas from several predecessors, including a number of classified

    engineering design studies from the 1960s. GPS was created and realized by the U.S.

    Department of Defense (DoD) and was originally run with 24 satellites. It became fully

    operational in 1994. Roger L. Easton is generally credited as its inventor.

    Advances in technology and new demands on the existing system have now led to efforts to

    modernize the GPS system and implement the next generation of GPS III satellites and Next

    Generation Operational Control System (OCX).[2]Announcements from the Vice President and

    the White House in 1998 initiated these changes. In 2000, U.S. Congress authorized the

    modernization effort, referred to as GPS III.

    In addition to GPS, other systems are in use or under development. The Russian Global

    Navigation Satellite System (GLONASS) was developed contemporaneously with GPS, but

    suffered from incomplete coverage of the globe until the mid-2000s. There are also the planned

    European Union Galileo, Chinese Compass navigation system, and Indian Regional Navigational

    Satellite System.

    http://en.wikipedia.org/wiki/Satellite_navigationhttp://en.wikipedia.org/wiki/United_Stateshttp://en.wikipedia.org/wiki/GPS_receiverhttp://en.wikipedia.org/wiki/GPS#cite_note-1http://en.wikipedia.org/wiki/GPS#cite_note-1http://en.wikipedia.org/wiki/GPS#cite_note-1http://en.wikipedia.org/wiki/U.S._Department_of_Defensehttp://en.wikipedia.org/wiki/U.S._Department_of_Defensehttp://en.wikipedia.org/wiki/Roger_L._Eastonhttp://en.wikipedia.org/wiki/GPS#cite_note-losangelesmil-2http://en.wikipedia.org/wiki/GPS#cite_note-losangelesmil-2http://en.wikipedia.org/wiki/GPS#cite_note-losangelesmil-2http://en.wikipedia.org/wiki/GLONASShttp://en.wikipedia.org/wiki/Compass_navigation_systemhttp://en.wikipedia.org/wiki/Indian_Regional_Navigational_Satellite_Systemhttp://en.wikipedia.org/wiki/Indian_Regional_Navigational_Satellite_Systemhttp://en.wikipedia.org/wiki/Indian_Regional_Navigational_Satellite_Systemhttp://en.wikipedia.org/wiki/Indian_Regional_Navigational_Satellite_Systemhttp://en.wikipedia.org/wiki/Compass_navigation_systemhttp://en.wikipedia.org/wiki/GLONASShttp://en.wikipedia.org/wiki/GPS#cite_note-losangelesmil-2http://en.wikipedia.org/wiki/Roger_L._Eastonhttp://en.wikipedia.org/wiki/U.S._Department_of_Defensehttp://en.wikipedia.org/wiki/U.S._Department_of_Defensehttp://en.wikipedia.org/wiki/GPS#cite_note-1http://en.wikipedia.org/wiki/GPS_receiverhttp://en.wikipedia.org/wiki/United_Stateshttp://en.wikipedia.org/wiki/Satellite_navigation
  • 7/28/2019 Embedded Documentation

    30/56

    HISTORY

    The design of GPS is based partly on similar ground-based radio-navigation systems, such

    as LORAN and the Decca Navigatordeveloped in the early 1940s, and used during World War

    II.

    Predecessors

    In 1956, the German-American physicist Friedwardt Winterbergproposed a test ofgeneral

    relativity (for time slowing in a strong gravitational field) using accurate atomic clocksplaced in

    orbit inside artificial satellites. (To achieve accuracy requirements, GPS uses principles of

    general relativity to correct the satellites' atomic clocks.) Additional inspiration for GPS came

    when the Soviet Union launched the first man-made satellite, Sputnikin 1957. Two American

    physicists, William Guier and George Weiffenbach, at Johns Hopkins's Applied Physics

    Laboratory (APL), decided on their own to monitor Sputnik's radio transmissions.[5]Within

    hours they realized that, because of the Doppler effect, they could pinpoint where the satellite

    was along its orbit from the Doppler shift. The Director of the APL gave them access to

    theirUNIVAC to do the heavy calculations required. The following spring, Frank McClure, the

    deputy director of the APL, asked Guier and Weiffenbach to investigate the inverse problem -

    pinpointing the user's location given that of the satellite. (The Navy was developing the

    submarine-launched Polaris missile, which required them to know the submarine's location.)

    This led them and APL to develop the Transit system.

    Official logo

    for NAVSTAR

    GPS

    Emblem o

    the50th Space

    Wing

    The first satellite navigation system, Transit, used by the United States Navy, was first

    successfully tested in 1960. It used a constellation of five satellites and could provide a

    navigational fix approximately once per hour. In 1967, the U.S. Navy developed

    the Timation satellite that proved the ability to place accurate clocks in space, a technology

    http://en.wikipedia.org/wiki/LORANhttp://en.wikipedia.org/wiki/Decca_Navigator_Systemhttp://en.wikipedia.org/wiki/World_War_IIhttp://en.wikipedia.org/wiki/World_War_IIhttp://en.wikipedia.org/wiki/Friedwardt_Winterberghttp://en.wikipedia.org/wiki/General_relativityhttp://en.wikipedia.org/wiki/General_relativityhttp://en.wikipedia.org/wiki/Gravitationhttp://en.wikipedia.org/wiki/Atomic_clockhttp://en.wikipedia.org/wiki/Soviet_Unionhttp://en.wikipedia.org/wiki/Sputnik_programhttp://en.wikipedia.org/wiki/Applied_Physics_Laboratoryhttp://en.wikipedia.org/wiki/Applied_Physics_Laboratoryhttp://en.wikipedia.org/wiki/GPS#cite_note-guier-weiffenbach-5http://en.wikipedia.org/wiki/GPS#cite_note-guier-weiffenbach-5http://en.wikipedia.org/wiki/GPS#cite_note-guier-weiffenbach-5http://en.wikipedia.org/wiki/Doppler_effecthttp://en.wikipedia.org/wiki/UNIVAC_Ihttp://en.wikipedia.org/wiki/UGM-27_Polarishttp://en.wikipedia.org/wiki/Transit_(satellite)http://en.wikipedia.org/wiki/50th_Space_Winghttp://en.wikipedia.org/wiki/50th_Space_Winghttp://en.wikipedia.org/wiki/United_States_Navyhttp://en.wikipedia.org/wiki/Timationhttp://en.wikipedia.org/wiki/File:50th_Space_Wing.pnghttp://en.wikipedia.org/wiki/File:NAVSTAR_GPS_logo_shield-official.jpghttp://en.wikipedia.org/wiki/File:50th_Space_Wing.pnghttp://en.wikipedia.org/wiki/File:NAVSTAR_GPS_logo_shield-official.jpghttp://en.wikipedia.org/wiki/Timationhttp://en.wikipedia.org/wiki/United_States_Navyhttp://en.wikipedia.org/wiki/50th_Space_Winghttp://en.wikipedia.org/wiki/50th_Space_Winghttp://en.wikipedia.org/wiki/Transit_(satellite)http://en.wikipedia.org/wiki/UGM-27_Polarishttp://en.wikipedia.org/wiki/UNIVAC_Ihttp://en.wikipedia.org/wiki/Doppler_effecthttp://en.wikipedia.org/wiki/GPS#cite_note-guier-weiffenbach-5http://en.wikipedia.org/wiki/Applied_Physics_Laboratoryhttp://en.wikipedia.org/wiki/Applied_Physics_Laboratoryhttp://en.wikipedia.org/wiki/Sputnik_programhttp://en.wikipedia.org/wiki/Soviet_Unionhttp://en.wikipedia.org/wiki/Atomic_clockhttp://en.wikipedia.org/wiki/Gravitationhttp://en.wikipedia.org/wiki/General_relativityhttp://en.wikipedia.org/wiki/General_relativityhttp://en.wikipedia.org/wiki/Friedwardt_Winterberghttp://en.wikipedia.org/wiki/World_War_IIhttp://en.wikipedia.org/wiki/World_War_IIhttp://en.wikipedia.org/wiki/Decca_Navigator_Systemhttp://en.wikipedia.org/wiki/LORAN
  • 7/28/2019 Embedded Documentation

    31/56

    required by GPS. In the 1970s, the ground-based Omega Navigation System, based on phase

    comparison of signal transmission from pairs of stations, became the first worldwide radio

    navigation system. Limitations of these systems drove the need for a more universal navigation

    solution with greater accuracy.

    While there were wide needs for accurate navigation in military and civilian sectors, almost none

    of those were seen as justification for the billions of dollars it would cost in research,

    development, deployment, and operation for a constellation of navigation satellites. During

    the Cold Wararms race, the nuclear threat to the existence of the United States was the one need

    that did justify this cost in the view of the United States Congress. This deterrent effect is why

    GPS was funded. It is also the reason for the ultra secrecy at that time. The nuclear

    triad consisted of the United States Navy's submarine-launched ballistic missiles (SLBMs) along

    with United States Air Force (USAF) strategic bombers and intercontinental ballistic

    missiles (ICBMs). Considered vital to the nuclear deterrence posture, accurate determination of

    the SLBM launch position was a force multiplier.

    Precise navigation would enable United States submarines to get an accurate fix of their

    positions prior to launching their SLBMs. The USAF with two-thirds of the nuclear triad also

    had requirements for a more accurate and reliable navigation system. The Navy and Air Force

    were developing their own technologies in parallel to solve what was essentially the same

    problem. To increase the survivability of ICBMs, there was a proposal to use mobile launch

    platforms (such as Russian SS-24 and SS-25) and so the need to fix the launch position had

    similarity to the SLBM situation.

    In 1960, the Air Force proposed a radio-navigation system called MOSAIC (Mobile System for

    Accurate ICBM Control) that was essentially a 3-D LORAN. A follow-on study called

    Project 57 was worked in 1963 and it was "in this study that the GPS concept was born." That

    same year the concept was pursued as Project 621B, which had "many of the attributes that you

    now see in GPS" and promised increased accuracy for Air Force bombers as well as ICBMs.

    Updates from the Navy Transit system were too slow for the high speeds of Air Force operation.

    The Navy Research Laboratory continued advancements with their Timation (Time Navigation)

    satellites, first launched in 1967, and with the third one in 1974 carrying the first atomic clock

    into orbit.

    http://en.wikipedia.org/wiki/Omega_Navigation_Systemhttp://en.wikipedia.org/wiki/Cold_Warhttp://en.wikipedia.org/wiki/Arms_racehttp://en.wikipedia.org/wiki/Nuclear_triadhttp://en.wikipedia.org/wiki/Nuclear_triadhttp://en.wikipedia.org/wiki/Submarine-launched_ballistic_missilehttp://en.wikipedia.org/wiki/United_States_Air_Forcehttp://en.wikipedia.org/wiki/Intercontinental_ballistic_missilehttp://en.wikipedia.org/wiki/Intercontinental_ballistic_missilehttp://en.wikipedia.org/wiki/Force_multiplierhttp://en.wikipedia.org/wiki/Submarinehttp://en.wikipedia.org/wiki/SS-24http://en.wikipedia.org/wiki/SS-25http://en.wikipedia.org/wiki/LORANhttp://en.wikipedia.org/wiki/LORANhttp://en.wikipedia.org/wiki/SS-25http://en.wikipedia.org/wiki/SS-24http://en.wikipedia.org/wiki/Submarinehttp://en.wikipedia.org/wiki/Force_multiplierhttp://en.wikipedia.org/wiki/Intercontinental_ballistic_missilehttp://en.wikipedia.org/wiki/Intercontinental_ballistic_missilehttp://en.wikipedia.org/wiki/United_States_Air_Forcehttp://en.wikipedia.org/wiki/Submarine-launched_ballistic_missilehttp://en.wikipedia.org/wiki/Nuclear_triadhttp://en.wikipedia.org/wiki/Nuclear_triadhttp://en.wikipedia.org/wiki/Arms_racehttp://en.wikipedia.org/wiki/Cold_Warhttp://en.wikipedia.org/wiki/Omega_Navigation_System
  • 7/28/2019 Embedded Documentation

    32/56

    Another important predecessor to GPS came from a different branch of the United States

    military. In 1964, the United States Army orbited its first Sequential Collation of Range

    (SECOR) satellite used for geodetic surveying. The SECOR system included three ground-based

    transmitters from known locations that would send signals to the satellite transponder in orbit. A

    fourth ground-based station at an undetermined position could then use those signals to fix its

    location precisely. The last SECOR satellite was launched in 1969. Decades later during the

    early years of GPS, civilian surveying became one of the first fields to make use of the new

    technology, because they could reap benefits of signals from the less-than-complete GPS

    constellation years before it was declared operational. GPS can be thought of as an evolution of

    the SECOR system where the ground-based transmitters have been migrated into orbit.

    Development

    With these parallel developments in the 1960s, it was realized that a superior system

    could be developed by synthesizing the best technologies from 621B, Transit, Timation, and

    SECOR in a multi-service program.

    During Labor Day weekend in 1973, a meeting of about 12 military officers at the Pentagon

    discussed the creation of aDefense Navigation Satellite System (DNSS). It was at this meeting

    that "the real synthesis that became GPS was created." Later that year, the DNSS program was

    namedNavstar. With the individual satellites being associated with the name Navstar (as with

    the predecessors Transit and Timation), a more fully encompassing name was used to identify

    the constellation of Navstar satellites,Navstar-GPS, which was later shortened simply to GPS.[12]

    AfterKorean Air Lines Flight 007, carrying 269 people, was shot down in 1983 after straying

    into the USSR's prohibited airspace, in the vicinity ofSakhalin and Moneron Islands, President

    Ronald issued a directive making GPS freely available for civilian use, once it was sufficiently

    developed, as a common good. The first satellite was launched in 1989, and the 24th satellite was

    launched in 1994. Roger L. Easton is widely credited as the primary inventor of GPS.

    Initially, the highest quality signal was reserved for military use, and the signal available for

    civilian use was intentionally degraded (Selective Availability). This changed with President Bill

    Clintonordering Selective Availability to be turned off at midnight May 1, 2000, improving the

    precision of civilian GPS from 100 meters (330 ft) to 20 meters (66 ft). The executive order

    signed in 1996 to turn off Selective Availability in 2000 was proposed by the US Secretary of

    http://en.wikipedia.org/wiki/United_States_Armyhttp://en.wikipedia.org/wiki/SECORhttp://en.wikipedia.org/wiki/GPS#cite_note-12http://en.wikipedia.org/wiki/GPS#cite_note-12http://en.wikipedia.org/wiki/GPS#cite_note-12http://en.wikipedia.org/wiki/Korean_Air_Lines_Flight_007http://en.wikipedia.org/wiki/Prohibited_airspacehttp://en.wikipedia.org/wiki/Sakhalinhttp://en.wikipedia.org/wiki/Moneron_Islandhttp://en.wikipedia.org/wiki/Roger_L._Eastonhttp://en.wikipedia.org/wiki/Selective_Availabilityhttp://en.wikipedia.org/wiki/Bill_Clintonhttp://en.wikipedia.org/wiki/Bill_Clintonhttp://en.wikipedia.org/wiki/Bill_Clintonhttp://en.wikipedia.org/wiki/Bill_Clintonhttp://en.wikipedia.org/wiki/Selective_Availabilityhttp://en.wikipedia.org/wiki/Roger_L._Eastonhttp://en.wikipedia.org/wiki/Moneron_Islandhttp://en.wikipedia.org/wiki/Sakhalinhttp://en.wikipedia.org/wiki/Prohibited_airspacehttp://en.wikipedia.org/wiki/Korean_Air_Lines_Flight_007http://en.wikipedia.org/wiki/GPS#cite_note-12http://en.wikipedia.org/wiki/SECORhttp://en.wikipedia.org/wiki/United_States_Army
  • 7/28/2019 Embedded Documentation

    33/56

    Defense, William Perry, because of the widespread growth ofdifferential GPS services to

    improve civilian accuracy and eliminate the US military advantage. Moreover, the US military

    was actively developing technologies to deny GPS service to potential adversaries on a regional

    basis.

    Over the last decade, the U.S. has implemented several improvements to the GPS service,

    including new signals for civil use and increased accuracy and integrity for all users, all while

    maintaining compatibility with existing GPS equipment.

    GPS modernization has now become an ongoing initiative to upgrade the Global Positioning

    System with new capabilities to meet growing military, civil, and commercial needs. The

    program is being implemented through a series of satellite acquisitions, including GPS Block III

    and the Next Generation Operational Control System (OCX). The U.S. Government continues to

    improve the GPS space and ground segments to increase performance and accuracy.

    GPS is owned and operated by the United States Government as a national resource. Department

    of Defense (DoD) is the steward of GPS.Interagency GPS Executive Board (IGEB) oversaw

    GPS policy matters from 1996 to 2004. After that the National Space-Based Positioning,

    Navigation and Timing Executive Committee was established by presidential directive in 2004 to

    advise and coordinate federal departments and agencies on matters concerning the GPS and

    related systems. The executive committee is chaired jointly by the deputy secretaries of defense

    and transportation. Its membership includes equivalent-level officials from the departments of

    state, commerce, and homeland security, the joint chiefs of staff, and NASA. Components of the

    executive office of the president participate as observers to the executive committee, and the

    FCC chairman participates as a liaison.

    The DoD is required by law to "maintain a Standard Positioning Service (as defined in the

    federal radio navigation plan and the standard positioning service signal specification) that will

    be available on a continuous, worldwide basis," and "develop measures to prevent hostile use of

    GPS and its augmentations without unduly disrupting or degrading civilian uses."

    http://en.wikipedia.org/wiki/William_Perryhttp://en.wikipedia.org/wiki/Differential_GPShttp://en.wikipedia.org/wiki/Differential_GPShttp://en.wikipedia.org/wiki/William_Perry
  • 7/28/2019 Embedded Documentation

    34/56

    Basic concept of GPS

    A GPS receiver calculates its position by precisely timing the signals sent by GPS satellites high

    above the Earth. Each satellite continually transmits messages that include

    the time the message was transmitted

    satellite position at time of message transmission

    The receiver uses the messages it receives to determine the transit time of each message and

    computes the distance to each satellite using the speed of light. Each of these distances and

    satellites' locations define a sphere. The receiver is on the surface of each of these spheres when

    the distances and the satellites' locations are correct. These distances and satellites' locations areused to compute the location of the receiver using the navigation equations. This location is then

    displayed, perhaps with a moving map display orlatitude and longitude; elevation information

    may be included. Many GPS units show derived information such as direction and speed,

    calculated from position changes.

    In typical GPS operation, four or more satellites must be visible to obtain an accurate result. Four

    sphere surfaces typically do not intersect. Because of this we can say with confidence that when

    we solve the navigation equations to find an intersection, this solution gives us the position of thereceiver along with accurate time thereby eliminating the need for a very large, expensive, and

    power hungry clock. The very accurately computed time is used only for display or not at all in

    many GPS applications, which use only the location. A number of applications for GPS do make

    use of this cheap and highly accurate timing. These include time transfer, traffic signal timing,

    and synchronization of cell phone base stations.

    Although four satellites are required for normal operation, fewer apply in special cases. If one

    variable is already known, a receiver can determine its position using only three satellites. For

    example, a ship or aircraft may have known elevation. Some GPS receivers may use additional

    clues or assumptions such as reusing the last known altitude, dead reckoning, inertial navigation,

    or including information from the vehicle computer, to give a (possibly degraded) position when

    fewer than four satellites are visible

    http://en.wikipedia.org/wiki/Satelliteshttp://en.wikipedia.org/wiki/GPS#Navigation_equationshttp://en.wikipedia.org/wiki/Latitudehttp://en.wikipedia.org/wiki/Longitudehttp://en.wikipedia.org/wiki/GPS#Navigation_equationshttp://en.wikipedia.org/wiki/Time_transferhttp://en.wikipedia.org/wiki/IS-95#Physical_layerhttp://en.wikipedia.org/wiki/Altitudehttp://en.wikipedia.org/wiki/Dead_reckoninghttp://en.wikipedia.org/wiki/Inertial_navigation_systemhttp://en.wikipedia.org/wiki/Inertial_navigation_systemhttp://en.wikipedia.org/wiki/Dead_reckoninghttp://en.wikipedia.org/wiki/Altitudehttp://en.wikipedia.org/wiki/IS-95#Physical_layerhttp://en.wikipedia.org/wiki/Time_transferhttp://en.wikipedia.org/wiki/GPS#Navigation_equationshttp://en.wikipedia.org/wiki/Longitudehttp://en.wikipedia.org/wiki/Latitudehttp://en.wikipedia.org/wiki/GPS#Navigation_equationshttp://en.wikipedia.org/wiki/Satellites
  • 7/28/2019 Embedded Documentation

    35/56

    Structure

    The current GPS consists of three major segments. These are the space segment (SS), a

    control segment (CS), and a user segment (US). The U.S. Air Force develops, maintains, and

    operates the space and control segments. GPS satellites broadcast signals from space, and each

    GPS receiver uses these signals to calculate its three-dimensional location (latitude, longitude,

    and altitude) and the current time.

    The space segment is composed of 24 to 32 satellites in medium Earth orbit and also

    includes the payload adapters to the boosters required to launch them into orbit. The control

    segment is composed of a master control station, an alternate master control station, and a host of

    dedicated and shared ground antennas and monitor stations. The user segment is composed of

    hundreds of thousands of U.S. and allied military users of the secure GPS Precise Positioning

    Service, and tens of millions of civil, commercial, and scientific users of the Standard

    Positioning Service

    Space segment

    The space segment (SS) is composed of the orbiting GPS satellites, or Space Vehicles (SV) in

    GPS parlance. The GPS design originally called for 24 SVs, eight each in three approximately

    circularorbits, but this was modified to six orbital planes with four satellites each. The orbits are

    centered on the Earth, not rotating with the Earth, but instead fixed with respect to the distant

    stars.[46]The six orbit planes have approximately 55inclination (tilt relative to Earth's equator)

    and are separated by 60 right ascension of the ascending node (angle along the equator from a

    reference point to the orbit's intersection). The orbital period is one-half a sidereal day, i.e., 11

    hours and 58 minutes. The orbits are arranged so that at least six satellites are always within lineof sight from almost everywhere on Earth's surface. The result of this objective is that the four

    satellites are not evenly spaced (90 degrees) apart within each orbit. In general terms, the angular

    difference between satellites in each orbit is 30, 105, 120, and 105 degrees apart which, of

    course, sum to 360 degrees.

    http://en.wikipedia.org/wiki/Broadcast_signalhttp://en.wikipedia.org/wiki/Latitudehttp://en.wikipedia.org/wiki/Longitudehttp://en.wikipedia.org/wiki/Altitudehttp://en.wikipedia.org/wiki/Medium_Earth_orbithttp://en.wikipedia.org/wiki/Ground_antennahttp://en.wikipedia.org/wiki/Orbital_plane_(astronomy)http://en.wikipedia.org/wiki/GPS#cite_note-47http://en.wikipedia.org/wiki/GPS#cite_note-47http://en.wikipedia.org/wiki/GPS#cite_note-47http://en.wikipedia.org/wiki/Inclinationhttp://en.wikipedia.org/wiki/Equatorhttp://en.wikipedia.org/wiki/Right_ascensionhttp://en.wikipedia.org/wiki/Orbital_nodehttp://en.wikipedia.org/wiki/Line-of-sight_propagationhttp://en.wikipedia.org/wiki/Line-of-sight_propagationhttp://en.wikipedia.org/wiki/Line-of-sight_propagationhttp://en.wikipedia.org/wiki/Line-of-sight_propagationhttp://en.wikipedia.org/wiki/Orbital_nodehttp://en.wikipedia.org/wiki/Right_ascensionhttp://en.wikipedia.org/wiki/Equatorhttp://en.wikipedia.org/wiki/Inclinationhttp://en.wikipedia.org/wiki/GPS#cite_note-47http://en.wikipedia.org/wiki/Orbital_plane_(astronomy)http://en.wikipedia.org/wiki/Ground_antennahttp://en.wikipedia.org/wiki/Medium_Earth_orbithttp://en.wikipedia.org/wiki/Altitudehttp://en.wikipedia.org/wiki/Longitudehttp://en.wikipedia.org/wiki/Latitudehttp://en.wikipedia.org/wiki/Broadcast_signal
  • 7/28/2019 Embedded Documentation

    36/56

    Orbiting at an altitude of approximately 20,200 km (12,600 mi); orbital radius of approximately

    26,600 km (16,500 mi), each SV makes two complete orbits each sidereal day, repeating the

    same ground track each day. This was very helpful during development because even with only

    four satellites, correct alignment means all four are visible from one spot for a few hours each

    day. For military operations, the ground track repeat can be used to ensure good coverage in

    combat zones.

    As of December 2012, there are 32 satellites in the GPS constellation. The additional satellites

    improve the precision of GPS receiver calculations by providing redundant measurements. With

    the increased number of satellites, the constellation was changed to a non uniform arrangement.

    Such an arrangement was shown to improve reliability and availability of the system, relative to

    a uniform system, when multiple satellites fail. About nine satellites are visible from any point

    on the ground at any one time (see animation at right), ensuring considerable redundancy over

    the minimum four satellites needed for a position.

    Control segment

    The control segment is composed of

    1. a master control station (MCS),

    2. an alternate master control station,

    3. four dedicated ground antennas and

    4. six dedicated monitor stations

    The MCS can also access U.S. Air Force Satellite Control Network (AFSCN) ground antennas

    (for additional command and control capability) and NGA (National Geospatial-Intelligence

    Agency) monitor stations. The flight paths of the satellites are tracked by dedicated U.S. Air

    Force monitoring stations in Hawaii, Kwajalein, Ascension Island, Diego Garcia, Colorado

    Springs, Colorado and Cape Canaveral, along with shared NGA monitor stations operated in

    England, Argentina, Ecuador, Bahrain, Australia and Washington DC. The tracking information

    is sent to the Air Force Space Command MCS at Schriever Air Force Base 25 km (16 mi) ESE

    of Colorado Springs, which is operated by the 2nd Space Operations Squadron(2 SOPS) of the

    U.S. Air Force. Then 2 SOPS contacts each GPS satellite regularly with a navigational update

    using dedicated or shared (AFSCN) ground antennas (GPS dedicated ground antennas are

    http://en.wikipedia.org/wiki/Altitudehttp://en.wikipedia.org/wiki/Sidereal_dayhttp://en.wikipedia.org/wiki/Satellite_constellationhttp://en.wikipedia.org/wiki/National_Geospatial-Intelligence_Agencyhttp://en.wikipedia.org/wiki/National_Geospatial-Intelligence_Agencyhttp://en.wikipedia.org/wiki/Hawaiihttp://en.wikipedia.org/wiki/Kwajaleinhttp://en.wikipedia.org/wiki/Ascension_Islandhttp://en.wikipedia.org/wiki/Diego_Garciahttp://en.wikipedia.org/wiki/Colorado_Springs,_Coloradohttp://en.wikipedia.org/wiki/Colorado_Springs,_Coloradohttp://en.wikipedia.org/wiki/Cape_Canaveralhttp://en.wikipedia.org/wiki/Schriever_Air_Force_Basehttp://en.wikipedia.org/wiki/2nd_Space_Operations_Squadronhttp://en.wikipedia.org/wiki/2nd_Space_Operations_Squadronhttp://en.wikipedia.org/wiki/Schriever_Air_Force_Basehttp://en.wikipedia.org/wiki/Cape_Canaveralhttp://en.wikipedia.org/wiki/Colorado_Springs,_Coloradohttp://en.wikipedia.org/wiki/Colorado_Springs,_Coloradohttp://en.wikipedia.org/wiki/Diego_Garciahttp://en.wikipedia.org/wiki/Ascension_Islandhttp://en.wikipedia.org/wiki/Kwajaleinhttp://en.wikipedia.org/wiki/Hawaiihttp://en.wikipedia.org/wiki/National_Geospatial-Intelligence_Agencyhttp://en.wikipedia.org/wiki/National_Geospatial-Intelligence_Agencyhttp://en.wikipedia.org/wiki/Satellite_constellationhttp://en.wikipedia.org/wiki/Sidereal_dayhttp://en.wikipedia.org/wiki/Altitude
  • 7/28/2019 Embedded Documentation

    37/56

    located at Kwajalein, Ascension Island, Diego Garcia, and Cape Canaveral). These updates

    synchronize the atomic clocks on board the satellites to within a few nanoseconds of each other,

    and adjust the ephemeris of each satellite's internal orbital model. The updates are created by

    a Kalman filterthat uses inputs from the ground monitoring stations, space weatherinformation,

    and various other inputs.

    Satellite maneuvers are not precise by GPS standards. So to change the orbit of a satellite, the

    satellite must be marked unhealthy, so receivers will not use it in their calculation. Then the

    maneuver can be carried out, and the resulting orbit tracked from the ground. Then the new

    ephemeris is uploaded and the satellite marked healthy again.

    The Operation Control Segment (OCS) currently serves as the control segment of record. It

    provides the operational capability that supports global GPS users and keeps the GPS system

    operational and performing within specification.

    OCS successfully replaced the legacy 1970s-era mainframe computer at Schriever Air Force

    Base in September 2007. After installation, the system helped enable upgrades and provide a

    foundation for a new security architecture that supported the U.S. armed forces. OCS will

    continue to be the ground control system of record until the new segment, Next Generation GPS

    Operation Control System (OCX), is fully developed and functional.

    The new capabilities provided by OCX will be the cornerstone for revolutionizing GPSsmission capabilities, and enabling Air Force Space Command to greatly enhance GPS

    operational services to U.S. combat forces, civil partners and myriad of domestic and

    international users.

    The GPS OCX program also will reduce cost, schedule and technical risk. It is designed to

    provide 50% sustainment cost savings through efficient software architecture and Performance-

    Based Logistics. In addition, GPS OCX expected to cost millions less than the cost to upgrade

    OCS while providing four times the capability.

    The GPS OCX program represents a critical part of GPS modernization and provides significant

    information assurance improvements over the current GPS OCS program.

    OCX will have the ability to control and manage GPS legacy satellites as well as the next

    generation of GPS III satellites, while enabling the full array of military signals.

    http://en.wikipedia.org/wiki/Kwajaleinhttp://en.wikipedia.org/wiki/Ascension_Islandhttp://en.wikipedia.org/wiki/Diego_Garciahttp://en.wikipedia.org/wiki/Cape_Canaveralhttp://en.wikipedia.org/wiki/Nanosecondhttp://en.wikipedia.org/wiki/Ephemerishttp://en.wikipedia.org/wiki/Kalman_filterhttp://en.wikipedia.org/wiki/Space_weatherhttp://en.wikipedia.org/wiki/Space_weatherhttp://en.wikipedia.org/wiki/Kalman_filterhttp://en.wikipedia.org/wiki/Ephemerishttp://en.wikipedia.org/wiki/Nanosecondhttp://en.wikipedia.org/wiki/Cape_Canaveralhttp://en.wikipedia.org/wiki/Diego_Garciahttp://en.wikipedia.org/wiki/Ascension_Islandhttp://en.wikipedia.org/wiki/Kwajalein
  • 7/28/2019 Embedded Documentation

    38/56

    Built on a flexible architecture that can rapidly adapt to the changing needs of todays and

    future GPS users allowing immediate access to GPS data and constellations status through

    secure, accurate and reliable information.

    Empowers the war fighter with more secure, actionable and predictive information to

    enhance situational awareness.

    Enables new modernized signals (L1C, L2C, and L5) and has M-code capability, which the

    legacy system is unable to do.

    Provides significant information assurance improvements over the current program including

    detecting and preventing cyber attacks, while isolating, containing and operating during such

    attacks.

    Supports higher volume near real-time command and control capabilities.

    On September 14, 2011, the U.S. Air Force announced the completion of GPS OCX Preliminary

    Design Review and confirmed that the OCX program is ready for the next phase of development.

    The GPS OCX program has achieved major milestones and is on track to support the GPS IIIA

    launch in May 2014.

    Communication:

    Main article: GPS signals

    The navigational signals transmitted by GPS satellites encode a variety of information including

    satellite positions, the state of the internal clocks, and the health of the network. These signals

    are transmitted on two separate carrier frequencies that are common to all satellites in the

    network. Two different encodings are used: a public encoding that enables lower resolution

    navigation, and an encrypted encoding used by the U.S. military.

    http://en.wikipedia.org/wiki/GPS_signalshttp://en.wikipedia.org/wiki/GPS_signals
  • 7/28/2019 Embedded Documentation

    39/56

    Message format :

    GPS message format

    Sub frames Description

    1Satellite clock,GPS time relationship

    23Ephemeris(precise satellite orbit)

    45Almanac component(satellite network synopsis,error correction)

    Each GPS satellite continuously broadcasts a navigation message on L1 C/A and L2 P/Y

    frequencies at a rate of 50 bits per second . Each complete message takes 750 seconds (12

    1/2 minutes) to complete. The message structure has a basic format of a 1500-bit-long frame

    made up of five s