B 11 Documentation

Embed Size (px)

Citation preview

  • 7/29/2019 B 11 Documentation

    1/55

    CHAPTER1

    INTRODUCTION

    1.1EMBEDDED SYSTEMS

    Embedded systems are electronic devices that incorporate microprocessors with in

    their implementations. The main purposes of the microprocessors are to simplify the system

    design and provide flexibility. Having a microprocessor in the device helps in removing the

    bugs, making modifications, or adding new features are only matter of rewriting the software

    that controls the device. Or in other words embedded computer systems are electronic

    systems that include a microcomputer to perform a specific dedicated application. The

    computer is hidden inside these products. Embedded systems are ubiquitous. Every week

    millions of tiny computer chips come pouring out of factories finding their way into our

    everyday products.

    Embedded systems are self-contained programs that are embedded within a piece of

    hardware. Whereas a regular computer has many different applications and software that can

    be applied to various tasks, embedded systems are usually set to a specific task that cannot be

    altered without physically manipulating the circuitry. Another way to think of an embedded

    system is as a computer system that is created with optimal efficiency, thereby allowing it to

    complete specific functions as quickly as possible.

    Embedded systems designers usually have a significant grasp of hardware

    technologies. They use specific programming languages and software to develop embedded

    systems and manipulate the equipment. When searching online, companies offer embedded

    systems development kits and other embedded systems tools for use by engineers and

    businesses.

    Embedded systems technologies are usually fairly expensive due to the necessarydevelopment time and built in efficiencies, but they are also highly valued in specific

    industries. Smaller businesses may wish to hire a consultant to determine what sort of

    embedded systems will add value to their organization.

    1.2CHARACTERISTICS:

    Two major areas of differences are cost and power consumption. Since many

    embedded systems are produced in tens of thousands to millions of units range, reducing cost

    is a major concern. Embedded systems often use a (relatively) slow processor and small

    memory size to minimize costs.

    1

  • 7/29/2019 B 11 Documentation

    2/55

    The slowness is not just clock speed. The whole architecture of the computer is often

    intentionally simplified to lower costs. For example, embedded systems often use peripherals

    controlled by synchronous serial interfaces, which are ten to hundreds of times slower than

    comparable peripherals used in PCs. Programs on an embedded system often run with real-time constraints with limited hardware resources: often there is no disk drive, operating

    system, keyboard or screen. A flash drive may replace rotating media, and a small keypad and

    LCD screen may be used instead of a PC's keyboard and screen.

    Firmware is the name for software that is embedded in hardware devices, e.g. in one

    or more ROM/Flash memory IC chips. Embedded systems are routinely expected to maintain

    100% reliability while running continuously for long periods, sometimes measured in years.

    Firmware is usually developed and tested too much harsher requirements than is general-purpose software, which can usually be easily restarted if a problem occurs.

    1.3PLATFORM:

    There are many different CPU architectures used in embedded designs. This in

    contrast to the desktop computer market which is limited to just a few competing

    architectures mainly the Intel/AMD x86 and the Apple/Motorola/IBM Power PCs which are

    used in the Apple Macintosh. One common configuration for embedded systems is the system

    on a chip, an application-specific integrated circuit, for which the CPU was purchased as

    intellectual property to add to the IC's design.

    1.4TOOLS:

    Like a typical computer programmer, embedded system designers use compilers,

    assemblers and debuggers to develop an embedded system. Those software tools can come

    from several sources:

    Software companies that specialize in the embedded market Ported from the GNU

    software development tools. Sometimes, development tools for a personal computer can be

    used if the embedded processor is a close relative to a common PC processor. Embedded

    system designers also use a few software tools rarely used by typical computer programmers.

    Some designers keep a utility program to turn data files into code, so that they can include

    any kind of data in a program. Most designers also have utility programs to add a checksum

    or CRC to a program, so it can check its program data before executing it.

    2

  • 7/29/2019 B 11 Documentation

    3/55

    1.5 OPERATING SYSTEM:

    They often have no operating system, or a specialized embedded operating system

    (often a real-time operating system), or the programmer is assigned to port one of these to the

    new system.

    1.6 DEBUGGING:

    Debugging is usually performed with an in-circuit emulator, or some type of debugger

    that can interrupt the micro controllers internal microcode. The microcode interrupt lets the

    debugger operate in hardware in which only the CPU works. The CPU-based debugger can

    be used to test and debug the electronics of the computer from the viewpoint of the CPU.

    Developers should insist on debugging which shows the high-level language, with

    breakpoints and single stepping, because these features are widely available. Also, developers

    should write and use simple logging facilities to debug sequences of real-time events. PC or

    mainframe programmers first encountering this sort of programming often become confused

    about design priorities and acceptable methods. Mentoring, code-reviews and ego less

    programming are recommended.

    1.7 DESIGN OF EMBEDDED SYSTEMS:

    The electronics usually uses either a microprocessor or a microcontroller. Some large

    or old systems use general-purpose mainframes computers or minicomputers.

    START-UP:

    All embedded systems have start-up code. Usually it disables interrupts, sets up the

    electronics, tests the computer (RAM, CPU and software), and then starts the application

    code. Many embedded systems recover from short-term power failures by restarting (without

    recent self-tests). Restart times under a tenth of a second are common.

    Many designers have found one of more hardware plus software-controlled LEDs

    useful to indicate errors during development (and in some instances, after product release, to

    produce troubleshooting diagnostics). A common scheme is to have the electronics turn off

    the LED(s) at reset, whereupon the software turns it on at the first opportunity, to prove that

    the hardware and start-up software have performed their job so far. After that, the software

    blinks the LED(s) or sets up light patterns during normal operation, to indicate program

    execution progress and/or errors. This serves to reassure most technicians/engineers and some

    3

  • 7/29/2019 B 11 Documentation

    4/55

    users.

    1.8THE CONTROL LOOP:

    In this design, the software has a loop. The loop calls subroutines. Each subroutine

    manages a part of the hardware or software. Interrupts generally set flags, or update counters

    that are read by the rest of the software. A simple API disables and enables interrupts. Done

    right, it handles nested calls in nested subroutines, and restores the preceding interrupt state in

    the outermost enable. This is one of the simplest methods of creating an exocrine.

    Typically, there's some sort of subroutine in the loop to manage a list of software

    timers, using a periodic real time interrupt. When a timer expires, an associated subroutine is

    run, or flag is set. Any expected hardware event should be backed-up with a software timer.

    Hardware events fail about once in a trillion times.

    State machines may be implemented with a function-pointer per state-machine (in C+

    +, C or assembly, anyway). A change of state stores a different function into the pointer. The

    function pointer is executed every time the loop runs.

    Many designers recommend reading each IO device once per loop, and storing the

    result so the logic acts on consistent values. Many designers prefer to design their state

    machines to check only one or two things per state. Usually this is a hardware event, and a

    software timer. Designers recommend that hierarchical state machines should run the lower-

    level state machines before the higher, so the higher run with accurate information.

    Complex functions like internal combustion controls are often handled with multi-

    dimensional tables. Instead of complex calculations, the code looks up the values. The

    software can interpolate between entries, to keep the tables small and cheap.

    One major disadvantage of this system is that it does not guarantee a time to respond

    to any particular hardware event. Careful coding can easily assure that nothing disables

    interrupts for long. Thus interrupt code can run at very precise timings. Another major

    weakness of this system is that it can become complex to add new features. Algorithms that

    take a long time to run must be carefully broken down so only a little piece gets done each

    time through the main loop.

    This system's strength is its simplicity, and on small pieces of software the loop is

    usually so fast that nobody cares that it is not predictable. Another advantage is that this

    system guarantees that the software will run. There is no mysterious operating system to

    blame for bad behavior.

    4

  • 7/29/2019 B 11 Documentation

    5/55

    1.9 USER INTERFACES:

    Interface designers at PARC, Apple Computer, Boeing and HP minimize the number

    of types of user actions. For example, use two buttons (the absolute minimum) to control a

    menu system (just to be clear, one button should be "next menu entry" the other button should

    be "select this menu entry"). A touch-screen or screen-edge buttons also minimize the types

    of user actions.

    Another basic trick is to minimize and simplify the type of output. Designs should

    consider using a status light for each interface plug, or failure condition, to tell what failed. A

    cheap variation is to have two light bars with a printed matrix of errors that they select- the

    user can glue on the labels for the language that she speaks.

    For example, Boeing's standard test interface is a button and some lights. When you

    press the button, all the lights turn on. When you release the button, the lights with failures

    stay on. The labels are in Basic English.

    Designers use colors. Red defines the users can get hurt- think of blood. Yellow

    defines something might be wrong. Green defines everything's OK.

    Another essential trick is to make any modes absolutely clear on the user's display. If

    an interface has modes, they must be reversible in an obvious way. Most designers prefer thedisplay to respond to the user. The display should change immediately after a user action. If

    the machine is going to do anything, it should start within 7 seconds, or give progress reports.

    Block Diagram:

    Figure 1 block diagram

    Intelligent Transportation System is a crucial part of Chinas information construction. With

    the increasing city holdings of cars, there are more and more traffic jams, so requirements

    are that Intelligent Transportation needs more improvement. The key technology Of

    5

    2x16 LCD

    GSM ModemGPSModem

    ARM7

  • 7/29/2019 B 11 Documentation

    6/55

    Intelligent Transportation is Vehicle positioning System, while the key of which is positioning

    System. Nowadays the most widely used positioning system is the Global Positioning

    System of America (GPS), which is a system consisting 24 satellites whose searching area

    embrace the globe. It can ensure that more than 4 satellites will be observed at one time, nomatter what time it is or where you are, thus making sure that they can collect the longitude

    and latitude of the view point, and furthermore realizing the function of navigation,

    positioning, and time service.

    The design of this paper-Vehicle positioning System Based on ARM a

    combination of GPS and GSM can upload the information of the vehicle such as the position

    and speed to the Monitoring center in time, to make it convenient to control the traffic. Whats

    more, users can use the password to track vehicles, for security and anti-robbery, call

    Manual / automatic alarm, and check the vehicle position.

    Description:

    In this project, if we want to identify our vehicle location, we will send a SMS to the

    GSM modem which is interfaced with the microcontroller. The GSM modem will receive the

    message and switch on GPS Module and receives the position of the vehicle in terms of

    latitude and longitude. And the same information will be send back to the predefined number.

    The architecture and working theory of this system is introduced in details, and introduces the

    vehicle location system which uses the AT89S52 as a control unit to combinative with GPS

    and GSM

    HARDWARE COMPONENTS DISCRIPTION

    Hardware Tools:

    ARM7

    GPS Module

    GSM Modem

    BLOCK DIAGRAM DISCRIPTION:

    1.10ARM 7(LPC2148)

    2.2.1FEATURES OF ARM 7:

    It consist of 2/32-bit ports, 32-bit data bus&32-bit address bus.

    2/10-bit ADCs &1/10-bitDAcs.

    6

  • 7/29/2019 B 11 Documentation

    7/55

    2 UART s, 2/32 bit timers.

    32KB of on-chip RAM, 512KB of ROM, 4GB of external memory.

    Single flash sector or full chip erase in 400ms and programming of 256 bytes in 1m

    It is a 32 bit RISC.

    Its operating voltage is 3.3V.

    ARM processor mode supports low power applications.

    It supports 16-bit&32-bit instructions.

    Crystal oscillator frequency1MHz-60MHz (12MHz).

    The ARM architecture as shown in fig 2.2 is based on Reduced Instruction Set

    Computer (RISC) principles. The RISC instruction set and related decode mechanism are

    much simple than those of Complex Instruction Set Computer(CISC) designs.

    This simplicity gives:

    A high instruction throughput

    An excellent real-time interrupt response

    A small, cost-effective, processor macro cell.

    The ARM7TDMI processor has two instruction sets:

    The 32-bit ARM instruction set

    The 16-bit Thumb instruction set.

    The ARM7TDMI processor is an implementation of the ARMv4T architecture.

    Instruction compression

    Microprocessor architectures traditionally have the same width for instructions and

    data. In comparison with 16-bit architectures, 32-bit architectures exhibit higher performance

    when manipulating 32-bit data and can address a large address space much more efficiently.

    16-bit architectures typically have higher code density than 32-bit architectures, but

    approximately half the performance

    Thumb implements a 16-bit instruction set on a 32-bit architecture to provide:

    Higher performance than a 16-bit architecture

    Higher code density than a 32-bit architecture.

    1.11The Thumb instruction set

    The Thumb instruction set is a subset of the most commonly used 32-bit ARM

    7

  • 7/29/2019 B 11 Documentation

    8/55

    instructions. Thumb instructions are each 16 bits long, and have a corresponding 32-bit ARM

    instruction that has the same effect on the processor model. Thumb instructions operate with

    the standard ARM register configuration, allowing excellent interoperability between ARM

    and Thumb states. On execution, 16-bit Thumb instructions are transparently decompressedto full 32-bit ARM instructions in real time without performance loss.

    Thumb has all the advantages of a 32-bit core:

    32-bit address space

    32-bit registers

    ARM controller, In Vehicle terminal, as a central

    processing unit of the system, ARM embedded system has a critical

    influence on overall performance. So introduced by Philips, the 16/32-bit

    ARM7 TDMI-S core LPC2148 microcontroller with real-time simulation and

    tracking. Support is used. It has 16K bytes of static RAM and 128k

    bytes of embedded high speed Flash memory. In the 64-pin package, 46

    GPIO can be used. The Conversion Time of 4 10- bit A / D converter can

    be as few as 2.44us. It has Real-time clock and watchdog. A maximum

    operating frequency of 60MHz of the CPU can be achieved through the

    on-chip PL, and the rich on-chip resources can meet the needs of general

    industrial control. LPC2129 not only works stably and faster, but also has

    dual serial, so is accessible to the plan.

    GPS Wireless communication module, this design adapts the current leading GPS

    technology and the integrated positioning chip LEADTEK LR9548S. Specifically Designed

    for OEM Applications, it is a GPS receiver module with high sensitivity, low power

    consumption, and 20 channels. Com- pared with other independent GPS solutions GPS9548

    is able to help Users gain and continuously track GPS signals at a very low signal

    intensity, which means GPS9548 can be used in the environment where it has never been

    thought to be accessible, such as Buildings of the city building, dense forest, garage, and

    many indoor environment, with a positioning accuracy of less than 10 meters. With only an

    addition of relevant circuit at the periphery, positioning information including time, longitude,

    latitude, rate, moving direction, etc, can be output through the serial.

    GSM module TC35, Siemens TC35i wireless communication module is used.

    Having gained the domestic network card of Radio equipment, it operates in dual-

    band GSM900 and GSM1800, with power consumption of 2W and 1W respectively.

    The DC power supply ranges from 3.3v to4.8V. The Current consumption is as below

    8

  • 7/29/2019 B 11 Documentation

    9/55

    3.5mA at sleep state, 25mA at leisure state 300m (Average) at launchingstate, and the

    maximum is 2.5A.

    Combining RF and baseband, this module provides users with a standard ATcommand interface and a fast, secure and reliable transmission of data, voice, SMS and

    fax. The Data input / output interface of TC35 is in effect a Serial Asynchronous

    Receiver Transmitter. It has fixed parameters and is in line with ITU-T RS232 interface

    standard 8 data bits and 1 stop bit, no parity; the baud rate is selectable between 300bps

    and 115kbps. The Command Interface of TC35imodule Fully complies with specifications of

    GSM07.05 and GSM07.07. It sends standard AT commands through the serial port of a

    microprocessor LPC2129 to TC35i module serial port, to fulfill the Locators function

    of sending and receiving text messages, therefore realizing the communication with

    m o b i l e phone users outside.

    Combining RF and baseband, this module provides users with a standard AT

    command interface and a fast, secure and reliable transmission of data, voice, SMS and

    fax. The Data input / output interface of TC35 is in effect a Serial Asynchronous

    Receiver Transmitter. It has fixed parameters and is in line with ITU-T RS232 interface

    standard 8 data bits and 1 stop bit, no parity; the baud rate is selectable between 300bps

    and 115kbps. The Command Interface of TC35imodule Fully complies with specifications of

    GSM07.05 and GSM07.07. It sends standard AT commands through the serial port of a

    microprocessor LPC2129 to TC35i module serial port, to fulfill the Locators function

    of sending and receiving text messages, therefore realizing the communication with

    m o b i l e phone users outside.

    GPIO Interface is to be connected with Traffic recorder, Car alarm and security

    control. Through that Interface, Microprocessor can have real-time monitoring of vehicles,

    circuits, air pressure, temperature, central locking, alarm and other status information, in

    order to make response timely GSM module TC35. Siemens TC35i wireless

    communication module is used. Having gained the domestic network card of Radio

    equipment, it operates in dual-band GSM900 and GSM1800, with power consumption of

    2W and 1W respectively. The DC power supply ranges from 3.3v to 4.8V. The

    Current consumption is as below 3.5mA at sleep state, 25mA at leisure state 300m

    (Average) at launchingstate, and the maximum is 2.5A.

    When using GPS to position, each satellite will send to the receiving terminal three

    9

  • 7/29/2019 B 11 Documentation

    10/55

    key messages: Satellite number, satellite position, and time. The receiving terminal store

    and use the received information, which is also used to fix the time on the GPS receiver. By

    comparing the difference of the time when each satellite signal is received and the time

    when the satellite is sent, The GPS receiver calculate the distance from each satellite to thereceiver. When the receiver can contact enough satellites, it can use trigonometric formulas

    to calculate the location of the receiver. Three satellites can be able to operate 2D

    positioning (longitude and latitude), while four or more can be able to operate 3D positioning

    (longitude, latitude, and height). The key indicator of positioning is the accuracy. The

    horizontal position accuracy of most Civilian GPS receivers is about 5 to 10m. Using

    differential technique, cm- level even mm-level positioning accuracy can be achieved.

    A.map matching, the data source of Vehicle positioning System is mainly formed

    of Static data (electronic maps) and dynamic data (location data). The role of map matching

    in the vehicle positioning system .In practical application, the current civil positioning

    technique is far from the accuracy of the level of road width, so it is necessary to match

    with the electronic map to achieve good positioning and location service. The basic idea of

    map matching is that by matching the positioning coordinates of the vehicle trajectory with

    the factorized section of the object on the map, the road that vehicles currently exercise can

    be found, and the vehicle tab will be projected onto the road. That can be classified into two

    relatively independent processions: One is to find the road that vehicles currently exercise;

    the other is to project the vehicle tab onto the road. The map matching done at this

    stage is not perfect. The Vehicle Positioning System in practical application shows the

    phenomenon of serious zero drift or vehicle "driving" on both sides of the road on map.

    Therefore the improvement of Map Matching Algorithm is also the current research focus

    in vehicle positioning technology.

    3 Data compression / fusion, First and foremost, a vehicle positioning system is

    an embedded system, which has some requirements of the size and real-time of the data

    processing. So it is necessary to compress the received data of the positioning system.

    The ARM7TDMI core is a member of the ARM family of general-purpose 32-bit

    Microprocessors. The ARM [4] family offers high performance for very low power

    Consumption and small size.

    The ARM architecture as shown in fig 2.2 is based on Reduced Instruction Set Computer

    (RISC) principles. The RISC instruction set and related decode mechanism are much simple

    than those of Complex Instruction Set Computer(CISC) designs.

    This simplicity gives:

    10

  • 7/29/2019 B 11 Documentation

    11/55

    A high instruction throughput

    An excellent real-time interrupt response

    A small, cost-effective, processor macro cell.

    1.12 The instruction pipelineThe ARM7TDMI core uses a pipeline to increase the speed of the flow of instructions

    to the processor. This enables several operations to take place simultaneously, and the

    processing and memory systems to operate continuously.

    A three-stage pipeline is used as shown in fig 2.1, so instructions are executed in three

    stages:

    Fetch

    Decode Execute.

    Figure 2 Instruction pipeline

    During normal operation, while one instruction is being executed, its successor is

    being decoded, and a third instruction is being fetched from memory. The program counter

    points to the instruction being fetched rather than to the instruction being executed. This is

    important because it means that the Program Counter (PC) value used in an executing

    instruction is always two instructions ahead of the address.

    Memory access

    The ARM7TDMI core has Von Neumann architecture, with a single 32-bit data bus

    carrying both instructions and data. Only load, store, and swap instructions can access data

    from memory.

    Data can be:

    11

  • 7/29/2019 B 11 Documentation

    12/55

    FIQ SUPERVISOR ABORT IRQ UNDEFINED

    R0 R0 R0 R0 R0 R0

    R1 R1 R1 R1 R1 R1

    R2 R2 R2 R2 R2 R2

    R3 R3 R3 R3 R3 R3

    R4 R4 R4 R4 R4 R4

    R5 R5 R5 R5 R5 R5

    R6 R6 R6 R6 R6 R6

    R7 R7 R7 R7 R7 R7

    R8 R8_FIQ R8 R8 R8 R8

    R9 R9_FIQ R9 R9 R9 R9

    R10 R10_FIQ R10 R10 R10 R10

    R11 R11_FIQ R11 R11 R11 R11

    R12 R12__FIQ R12 R12 R12 R12

    R13 R13_FIQ R13_SVC R13_ABT R13_IRQ R13_UND

    R14 R14_FIQ R14_SVC R14_ABT R14_IRQ R14_UND

    R15(PC) R15(PC) R15(PC) R15(PC) R15(PC) R15(PC)

    12

  • 7/29/2019 B 11 Documentation

    13/55

    Figure 3 ARM7TDMI processor block diagram

    TABLE 1 UART SERIAL COMMUNICATION

    CPSR CPSR CPSR CPSR CPSR CPSR

    SPSR_FIQ SPSR_SVC SPSR_ABT SPSR_IRQ SPSR_UND

    The ARM7TDMI core has four basic types of memory cycle:

    Idle cycle

    Non sequential cycle

    Sequential cycle

    Coprocessor registers transfer cycle.

    4.1.3Architecture

    13

  • 7/29/2019 B 11 Documentation

    14/55

    The ARM7TDMI processor has two instruction sets:

    The 32-bit ARM instruction set

    The 16-bit Thumb instruction set.

    The ARM7TDMI processor is an implementation of the ARMv4T architecture.

    Instruction compression

    Microprocessor architectures traditionally have the same width for instructions and

    data. In comparison with 16-bit architectures, 32-bit architectures exhibit higher performance

    when manipulating 32-bit data and can address a large address space much more efficiently.

    16-bit architectures typically have higher code density than 32-bit architectures, but

    approximately half the performance.

    Thumb implements a 16-bit instruction set on a 32-bit architecture to provide:

    Higher performance than a 16-bit architecture

    Higher code density than a 32-bit architecture.

    The Thumb instruction set

    The Thumb instruction set is a subset of the most commonly used 32-bit ARM

    instructions. Thumb instructions are each 16 bits long, and have a corresponding 32-bit ARM

    instruction that has the same effect on the processor model. Thumb instructions operate with

    the standard ARM register configuration, allowing excellent interoperability between ARM

    and Thumb states. On execution, 16-bit Thumb instructions are transparently decompressed

    to full 32-bit ARM instructions in real time without performance loss.

    Thumb has all the advantages of a 32-bit core:

    32-bit address space

    32-bit registers

    32-bit shifter, and Arithmetic Logic Unit(ALU)

    32-bit memory transfer.

    Thumb therefore offers a Long Branch range, powerful arithmetic operations, and a

    large address space. Thumb code is typically 65% of the size of ARM code, and provides

    160% of the performance of ARM code when running from a 16-bit memory system.

    Thumb, therefore, makes the ARM7TDMI core ideally suited to embedded applications with

    restricted memory bandwidth, where code density and footprint is important.

    The availability of both 16-bit Thumb and 32-bit ARM instruction sets gives

    14

  • 7/29/2019 B 11 Documentation

    15/55

    designers the flexibility to emphasize performance or code size on a subroutine level,

    according to the requirements of their applications. For example, critical loops for

    applications such as fast interrupts and DSP algorithms can be coded using the full ARM

    instruction set then linked with Thumb code.

    4.1.4Software Development

    In this module we will be using an Integrated Development Environment from Kiel

    Electronic. This IDE is called u VISION (pronounced Micro Vision) and versions already

    exist for other popular microcontrollers including the 8051 and the In fine on C16X family. u

    VISION successfully integrates project management, editor, compiler and debugger in one

    seamless front-end. Although we are concentrating on the LPC2000 family in this book, the

    Kiel ARM tools can be used for any other ARM7 based microcontroller.

    The Compiler

    The u VISION development environment can be used with several different compiler

    tools. These include the ARM ADS compiler, the GNU compiler and Kiels own ARM

    compiler.

    The Kiel u VISION (u VISION) IDE is designed to support several compilers, the

    Gnu C compiler, The ARM development suite and the Kiel ARM compiler. Before compiling

    make sure you have the GNU compiler selected. This is done by activating the project

    workspace; right clicking and selecting manage components. In this dialog select the

    Folders/extensions tab and make sure the Kiel ARM tools box is selected.

    CHAPTER 2

    15

  • 7/29/2019 B 11 Documentation

    16/55

    KEIL SOFTWARE

    Keil Software

    Installing the Keil software on a Windows PC

    Insert the CD-ROM in your computers CD drive

    On most computers, the CD will auto run, and you will see the Keil installation

    menu. If the menu does not appear, manually double click on the Setup icon, in the

    root directory: you will then see the Keil menu.

    On the Keil menu, please select Install Evaluation Software. (You will not require a

    license number to install this software).

    Follow the installation instructions as they appear.

    Loading the Projects

    The example projects for this book are NOT loaded automatically when you install the Keil compiler.

    These files are stored on the CD in a directory /Pont. The files are arranged by chapter: for

    example, the project discussed in Chapter 3 is in the directory /Pont/Ch03_00-Hello.

    Rather than using the projects on the CD (where changes cannot be saved), please copy the

    files from CD onto an appropriate directory on your hard disk.

    Note: you will need to change the file properties after copying: file transferred from the CD

    will be read only.

    Configuring the Simulator

    Open the Keil Vision2

    Go to Project Select Device for Target Target1

    Now we need to check the oscillator frequency:

    Go to project Options for Target Target1

    Make sure that the oscillator frequency is 12MHz.

    Building the Target

    4.1.5Kiel Toolset

    16

  • 7/29/2019 B 11 Documentation

    17/55

    Step1: Open Kiel UVISION3.

    Step2: Add user manual.

    Step3: Create new file.

    17

  • 7/29/2019 B 11 Documentation

    18/55

    step4: Select LPC2148.

    step5: Add code to source file and build target

    18

  • 7/29/2019 B 11 Documentation

    19/55

    step6: Using simulator.

    19

  • 7/29/2019 B 11 Documentation

    20/55

    Step7: Using PHILIPS LPC2000 Flash Utility dump the hex file of the code

    20

  • 7/29/2019 B 11 Documentation

    21/55

    CHAPTER3

    GSM and GPS

    GSM/GPRS 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.

    Fig 3 GSM/GPRS module

    3.1 Wireless MODEMs

    Wireless MODEMs are the MODEM devices that generate, transmit or decode data

    from a cellular 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

    (GPS/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).

    21

    http://www.engineersgarage.com/tutorials/at-commandshttp://www.engineersgarage.com/tutorials/at-commands
  • 7/29/2019 B 11 Documentation

    22/55

    Fig 5 cellular data standard MODEM

    3.2 Applications of GSM/GPRS moduleThe 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.

    3.3 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.

    GSM (Global System for Mobile communications) is a cellular network, which means

    22

  • 7/29/2019 B 11 Documentation

    23/55

    that mobile phones connect to it by searching for cells in the immediate vicinity. GSM

    networks operate in four different frequency ranges. Most GSM networks operate in the 900

    MHz or 1800 MHz bands. Some countries in the Americas use the 850 MHz and 1900 MHz

    bands because the 900 and 1800 MHz frequency bands were already allocated.The rarer 400 and 450 MHz frequency bands are assigned in some countries, where

    these frequencies were previously used for first-generation systems.GSM-900 uses 890915

    MHz to send information from the mobile station to the base station (uplink) and 935960

    MHz for the other direction (downlink), providing 124 RF channels (channel numbers 1 to

    124) spaced at 200 kHz. Duplex spacing of 45 MHz is used. In some countries the GSM-900

    band has been extended to cover a larger frequency range. This 'extended GSM', E-GSM,

    uses 880915 MHz (uplink) and 925960 MHz (downlink), adding 50 channels (channel

    numbers 975 to 1023 and 0) to the original GSM-900 band. Time division multiplexing is

    used to allow eight full-rate or sixteen half-rate speech channels per radio frequency channel.

    There are eight radio timeslots (giving eight burst periods) grouped into what is called a

    TDMA frame. Half rate channels use alternate frames in the same timeslot. The channel data

    rate is 270.833 kbit/s, and the frame duration is 4.615 ms.

    3.4 GSM Advantages:

    GSM also pioneered a low-cost, to the network carrier, alternative to voice calls, the

    Short t message service (SMS, also called "text messaging"), which is now supported on

    other mobile standards as well. Another advantage is that the standard includes one

    worldwide Emergency telephone number, 112. This makes it easier for international travelers

    to connect to emergency services without knowing the local emergency number.

    3.5 GPS

    Long before Global Positioning System (GPS) arrived, researchers worked hard to

    arrive at a feasible solution to aid travelers from getting lost. Earlier, travelers used to rely on

    elaborate maps to track and monitor the route to their destination. But today, GPS technologyhas ensured hassle free trips and increased safety for vehicle owners. The figure below

    23

  • 7/29/2019 B 11 Documentation

    24/55

    illustrates a GPS satellite in orbit.

    Fig 6 GPS satellite in orbit

    Introduction

    GPS technologyGPS works all across the world and in all weather conditions, thus helping users track

    locations, objects, and even individuals! GPS technology can be used by any person if they

    have a GPS receiver. A GPS receiver calculates its position by carefully timing the signals

    sent by the constellation of GPS satellites high above the Earth. Each satellite continually

    transmits messages containing the time the message was sent, a precise orbit for the satellite

    sending the message (the ephemeris), and the general system health and rough orbits of all

    GPS satellites (the almanac). These signals travel at the speed of light through outer space,

    and slightly slower through the atmosphere. The receiver uses the arrival time of each

    message to measure the distance to each satellite, from which it determines the position of the

    receiver (conceptually the intersection of spheres - see trilateration ) The resulting

    coordinates are converted to more user-friendly forms such as latitude and longitude, or

    location on a map, then displayed to the user.

    It might seem that three satellites would be enough to solve for a position, since space

    has three dimensions. However, a three satellite solution requires the time be known to a

    nanosecond or so, far better than any non-laboratory clock can provide. Using four or more

    satellites allows the receiver to solve for time as well as geographical position, eliminating

    the need for a super accurate clock. In other words, the receiver uses four measurements tosolve for four variables: x, y, z, and t. While many GPS applications have no particular use

    24

  • 7/29/2019 B 11 Documentation

    25/55

    for this (very accurate) time, it is used in some GPS applications such as time transfer, and it

    is the only variable of interest in some applications, such as traffic signal timing.

    Although four satellites are required for normal operation, fewer may be needed in

    some special cases. If one variable is already known (for example, a ship or plane mayalready know its altitude), a receiver can determine its position using only three satellites.

    Also, in practice, receivers use additional clues (Doppler shift of satellite signals, last known

    position, dead reckoning, inertiral navigation, and so on) to give degraded answers when

    fewer than four satellites are visible.

    3.6 Position calculation:

    To provide an introductory description of how a GPS receiver works, errors will be

    ignored in this section. Using messages received from a minimum of four visible satellites, a

    GPS receiver is able to determine the satellite positions and time sent.

    The x, y, and z components of position and the time sent are designated as

    where the subscript i denotes the satellite number and has the value 1, 2, 3, or

    4. Knowing the indicated time the message was received , the GPS receiver can compute

    the indicated transit time, . of the message.

    Assuming the message traveled at the speed of light, c, the distance travelled, can

    be computed as . Knowing the distance from GPS receiver to a satellite

    25

  • 7/29/2019 B 11 Documentation

    26/55

    Fig 6.1 system segmentation

    System segmentation

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

    a control segment (CS), and a user segment (US).

    Space segment

    A visual example of the GPS constellation in motion with the Earth rotating, Notice how the

    number of satellites in view from a given point on the Earth's surface, in this example at

    45N, changes with time.

    26

  • 7/29/2019 B 11 Documentation

    27/55

    The space segment (SS) comprises the orbiting GPS satellites or Space Vehicles (SV)

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

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

    are centered on the Earth, not rotating with respect to the distant stars. The six planes haveapproximately 55 inclination (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 orbits are arranged so that at least six satellites are always within line of

    sight from almost everywhere on Earth's surface.

    Orbiting at an altitude of approximately 20,200 kilometers (12,600 miles or 10,900

    nautical miles; orbital radius of 26,600 km (16,500 mi or 14,400 NM)), each SV makes two

    complete orbits each sidereal day. The ground track of each satellite therefore repeats each

    (sidereal) day. This was very helpful during development, since even with just 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 March 2008, there are 31 actively broadcasting 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.

    Some reports in 2008 indicated that the 32nd satellite was causing difficulties for

    some GPS receivers.

    Control segment

    The flight paths of the satellites are tracked by US Air Force monitoring stations in

    Hawaii, Kwajalein, Ascension Island, Diego Garcia, and Colorado Springs, Colorado, along

    with monitor stations operated by the National Geospatial-Intelligence Agency (NGA). The

    tracking information is sent to the Air Force Space Command's master control station at

    Schriever Air Force Base in Colorado Springs, which is operated by the 2nd Space

    Operations Squadron (2 SOPS) of the United States Air Force (USAF). Then 2 SOPS

    contacts each GPS satellite regularly with a navigational update (using the ground antennas at

    Ascension Island, Diego Garcia, Kwajalein, and Colorado Springs). 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

    27

  • 7/29/2019 B 11 Documentation

    28/55

    created by a Kalman filter which uses inputs from the ground monitoring stations, space

    weather information, 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 theircalculation. 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.

    User segment

    PS receivers come in a variety of formats, from devices integrated into cars, phones,

    and watches, to dedicated devices such as those shown here from manufacturers Trimble,

    Garmin and Leica (left to right).

    The user's GPS receiver is the user segment (US) of the GPS. In general, GPS

    receivers are composed of an antenna, tuned to the frequencies transmitted by the satellites,

    receiver-processors, and a highly-stable clock (often a crystal oscillator). They may also

    include a display for providing location and speed information to the user. A receiver is often

    described by its number of channels: this signifies how many satellites it can monitor

    simultaneously. Originally limited to four or five, this has progressively increased over the

    years so that, as of 2007, receivers typically have between 12 and 20 channels.

    Space segment The satellites are the heart of the Global positioning system which helps to

    locate the position by broadcasting the signal used by the receiver. The signals are blocked

    when they travel through buildings, mountains, and people. To calculate the position, the

    signals of four satellites should be locked. You need to keep moving around to get clear

    28

  • 7/29/2019 B 11 Documentation

    29/55

    reception.

    User segment This segment includes military and civilian users. It comprises of a sensitive

    receiver which can detect signals (power of the signal to be less than a quadrillionth power ofa light bulb) and a computer to convert the data into useful information. GPS receiver helps

    to locate your own position but disallows you being tracked by someone else.

    Control segment This helps the entire system to work efficiently. It is essential that the

    transmission signals have to be updated and the satellites should be kept in their appropriate

    orbits.

    Working Principle:

    The GPS satellites rotate twice a day around the earth in a specific orbit. These

    satellites transmit signal information to earth. This signal information is received by the GPS

    receiver in order to measure the users correct position. The GPS receiver compares the time

    a satellite transmits the signal with the time the signal is received. The time difference

    calculated enables us to know the distance of the satellite. By measuring the distance of few

    more satellites, the users position can be verified and displayed on the units electronic map.

    To measure 2D position and track movement, the GPS receiver must lock the signal of three

    satellites. The receiver can measure 3D position (latitude, longitude and altitude) if the GPS

    receiver locks the signal of four or more satellites.

    On determining the position of the user, the unit of GPS can measure speed, trip

    distance, bearing, distance to destination, tack, time of sunrise and sunset, etc.

    Types of GPS receivers

    The three types of GPS receivers that offer different level of accuracy, and have different

    necessity to obtain the accuracies are:

    Coarse Acquisition (C/A) code receivers These receivers offer 1-5 meter GPS

    position accuracy with differential correction. With an occupation time of 1 second, these

    receivers offer 1-5 meter GPS position accuracy. The GPS position accuracies can be within1-3 meters consistently if the occupation time is long.

    29

  • 7/29/2019 B 11 Documentation

    30/55

    Carrier Phase receivers These receivers offer 10-30 meter GPS position accuracy

    with differential correction. The waves that carry C/A signal are counted to calculate the

    distance between the satellite and the receiver. High occupation time is required to obtainposition accuracy.

    Dual Frequency receivers These receivers offer sub-centimeter GPS position

    accuracy with differential correction. These receivers accept signals from the satellites on two

    different frequencies to find out accurate position.

    Note: Differential correction is a method to compare GPS data collected in the field to the

    GPS data collected at a known point.

    History

    GPS was initially meant for military applications and was built by the American

    Department of Defense (DOD) in 1978. It was originally called NAVSTAR and was

    introduced with the launch of the first satellite.

    Today, around thirty fully operational satellites orbit the earth covering a distance of

    20200 km. These GPS satellites transmit signals which help locate the precise location of a

    GPS receiver. The latest in efficient satellite technology ensures that the GPS signal can be

    used without any fee by any individual in possession of a GPS receiver.

    The predecessor of GPS used to be fixed radio stations spread across the globe in

    known locations. First, a master station sends out signals after which the slave stations across

    the globe start to respond. The slave stations send out these signals after a precise amount of

    time. The receivers then start to evaluate the time delay between the reception of the master

    and slave signals, thus determining a position relative to the slave stations.

    Fixed radio station broadcasting was a problem for the military. This is the main

    reason why Transit, the first navigation satellite, was introduced in the 1960s. The location

    was determined with the help of a receiver, which calculated the Doppler Effect on the

    frequency broadcasted by the satellite to the frequency actually received. After this, the

    30

  • 7/29/2019 B 11 Documentation

    31/55

    receiver closest to the satellite would get information and subsequent readings would

    precisely single out a location relative to the position of the satellite.

    Modern satellites work differently to determine exact positions. A satellite signal

    would include the satellites position and the time of signal transmission. With this crucialinformation, the ground unit would be able to successfully locate a target swiftly and

    efficiently. Every satellite signal places the ground unit on a sphere from the satellite. The

    location of the GPS receiver is then identified as the intersection of the spheres (for additional

    satellite signals).

    Latest/Current Research and Key developments

    In the mobile phone domain, GPS receivers are very much in demand today. In a few years

    from now, all GSM phones are expected to be fitted with superior GPS technology to help the

    user in navigation. This superior GPS technology will also help track other GPS-mobile

    enabled users. For example, anxious parents can keep a tab on the movements of their

    children. It also helps to keep track of individuals working in high-risk areas.

    Another important feature is the GPS-enabled theft-protection systems that are very

    much in demand these days. This helps motorcycle and automobile manufacturers to locate

    stolen vehicles with pinpoint accuracy.

    A big boost is provided to computer users in the form of Bluetooth GPS receivers.

    These receivers score over traditional connections because a cable is not required.

    GPS is also being introduced into supply chains, to ensure that all goods are transported

    without hassles and are free from theft.

    Problems being faced today

    The most common problem that arises with the GPS system is accuracy. Accuracy

    depends on the signal that is sent by the time unit. The accuracy gets disturbed if the time is

    off in the GPS unit. The time and calculations are affected when it encounters rough

    atmospheric conditions. Inaccuracy occurs when a signal is bounced back from mountains,

    skyscrapers etc.

    Another problem is related to its position that gets updated every twelve minutes.

    Once the signal has reached the updated time, the satellite is unable to know the correct

    location and can make calculation on based on the wrong information. This kind of errors isunavoidable.

    31

  • 7/29/2019 B 11 Documentation

    32/55

    Applications

    This technique was initially developed for military applications. During 1980, the

    government decided to make it available for the civilian use as well. GPS has become an

    efficient tool in the field of scientific use, commerce, surveillance and tracking.

    32

  • 7/29/2019 B 11 Documentation

    33/55

    CHAPTER 4

    CIRCUIT DIAGRAM

    Figure 7 Circuit Diagram

    33

  • 7/29/2019 B 11 Documentation

    34/55

    SNOP SHORT:

    4.1 DISCRIPTION OF CIRCUIT DIAGRAM

    MAX 232:

    A standard serial interface for PC, RS232C, requires negative logic, i.e., logic 1 is -3V

    to -12V and logic 0 is +3V to +12V. To convert TTL logic, say, TxD and RxD pins of the

    microcontroller thus need a converter chip. A MAX232 chip has long been using in many

    microcontrollers boards. It is a dual RS232 receiver / transmitter that meets all RS232

    specifications while using only +5V power supply. It has two onboard charge pump voltage

    converters which generate +10V to -10V power supplies from a single 5V supply. It has four

    level translators, two of which are RS232 transmitters that convert TTL/CMOS input levels

    into +9V RS232 outputs. The other two level translators are RS232 receivers that convert

    RS232 input to 5V. Typical MAX232 circuit is shown below.

    34

  • 7/29/2019 B 11 Documentation

    35/55

    Fig 8 MAX232 pin diagram

    1. Operates With Single 5-V Power Supply

    2. Lin BiCMOSE Process Technology

    3. Two Drivers and Two Receivers

    4. 30-V Input Levels

    5. Low Supply Current. 8 mA Typical

    6. Meets or Exceeds TIA/EIA-232-F and ITU Recommendation V.28

    7. Designed to be Interchangeable With

    DESCRIPTION:

    The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to

    supply TIA/EIA-232-F voltage levels from a single 5-V supply. Each receiver convertsTIA/EIA-232-F inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of

    1.3 V, a typical hysterics of 0.5 V, and can accept +/-30-V inputs. Each driver converts

    TTL/CMOS input levels into TIA/EIA-232-F levels.

    LOGIC DIAGRAM (POSITIVE LOGIC):

    35

  • 7/29/2019 B 11 Documentation

    36/55

    Figure 8.1 LOGIC DIAGRAM OFMAX232

    4.2 MAX232:

    The MAX232 is an integrated circuitthat converts signals from an RS-232 serial port

    to signals suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual

    driver/receiver and typically converts the RX, TX, CTS and RTS signals.

    The drivers provide RS-232 voltage level outputs (approx. 7.5 V) from a single

    + 5 V supply via on-chip charge pumps and external capacitors. This makes it useful for

    implementing RS-232 in devices that otherwise do not need any voltages outside the 0 V to

    + 5 V range, as power supply design does not need to be made more complicated just for

    driving the RS-232 in this case.

    The receivers reduce RS-232 inputs (which may be as high as 25 V), to standard

    5 V TTL levels. These receivers have a typical threshold of 1.3 V, and a typical hysteretic of

    0.5 V.

    The later MAX232A is backwards compatible with the original MAX232 but may

    operate at higherbaud rates and can use smaller external capacitors 0.1 F in place of the

    1.0 f capacitors used with the original device.

    RS-232 BASICS:

    RS-232 (Recommended Standard 232) is a standard for serial binary data signals

    connecting between a DTE (Data terminal equipment) and a DCE (Data Circuit-terminating

    Equipment).

    VOLTAGE LEVELS:

    The RS-232 standard defines the voltage levels that correspond to logical one and

    logical zero levels. Valid signals are plus or minus 3 to 25 volts. The range near zero volts is

    not a valid RS-232 level; logic one is defined as a negative voltage, the signal condition is

    called marking, and has the functional significance of OFF. Logic zero is positive; the signal

    condition is spacing, and has the function ON.

    So a Logic Zero represented as +3V to +25V and Logic One represented as -3V to -25V.

    36

    http://en.wikipedia.org/wiki/Integrated_circuithttp://en.wikipedia.org/wiki/Integrated_circuithttp://en.wikipedia.org/wiki/RS-232http://en.wikipedia.org/wiki/Transistor-transistor_logichttp://en.wikipedia.org/wiki/Charge_pumphttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/Transistor-transistor_logichttp://en.wikipedia.org/wiki/Baudhttp://en.wikipedia.org/wiki/Baudhttp://en.wikipedia.org/wiki/Faradhttp://en.wikipedia.org/wiki/Integrated_circuithttp://en.wikipedia.org/wiki/RS-232http://en.wikipedia.org/wiki/Transistor-transistor_logichttp://en.wikipedia.org/wiki/Charge_pumphttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/Transistor-transistor_logichttp://en.wikipedia.org/wiki/Baudhttp://en.wikipedia.org/wiki/Farad
  • 7/29/2019 B 11 Documentation

    37/55

    RS-232 Level Converters:

    Usually all the digital ICs work on TTL or CMOS voltage levels which cannot be

    used to communicate over RS-232 protocol. So a voltage or level converter is needed which

    can convert TTL to RS232 and RS232 to TTL voltage levels.

    The most commonly used RS-232 level converter is MAX232. This IC includes charge pump

    which can generate RS232 voltage levels (-10V and +10V) from 5V power supply. It also

    includes two receiver and two transmitters and is capable of full-duplex UART/USART

    communication.

    A charge pump is a kind ofDC to DC converterthat uses capacitors as energy storage

    elements to create either a higher or lower voltage power source. Charge pump circuits are

    capable of high efficiencies, sometimes as high as 90-95% while being electrically simple

    circuits. Charge pumps use some form of switching device(s) to control the connection of

    voltages to the capacitor. For instance, to generate a higher voltage, the first stage involves

    the capacitor being connected across a voltage and charged up. In the second stage, the

    capacitor is disconnected from the original charging voltage and reconnected with its

    negative terminal to the original positive charging voltage. Because the capacitor retains the

    voltage across it (ignoring leakage effects) the positive terminal voltage is added to the

    original, effectively doubling the voltage. The pulsing nature of the higher voltage output istypically smoothed by the use of an output capacitor.

    This is the charge pumping action, which typically operates at tens ofkilohertz up to

    several megahertz to minimize the amount of capacitance required. The capacitor used as the

    charge pump is typically known as the "flying capacitor". Another way to explain the

    operation of a charge pump is to consider it as the combination of a DC to AC converter (the

    switches) followed by a voltage multiplier.

    The voltage is load-dependent; higher loads result in lower average voltages. Chargepumps can double voltages, triple voltages, halve voltages, invert voltages, fractionally

    37

    http://en.wikipedia.org/wiki/DC_to_DC_converterhttp://en.wikipedia.org/wiki/DC_to_DC_converterhttp://en.wikipedia.org/wiki/DC_to_DC_converterhttp://en.wikipedia.org/wiki/Capacitorhttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Electrical_efficiencyhttp://en.wikipedia.org/wiki/Leakagehttp://en.wikipedia.org/wiki/Kilohertzhttp://en.wikipedia.org/wiki/Voltage_multiplierhttp://en.wikipedia.org/wiki/DC_to_DC_converterhttp://en.wikipedia.org/wiki/Capacitorhttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Electrical_efficiencyhttp://en.wikipedia.org/wiki/Leakagehttp://en.wikipedia.org/wiki/Kilohertzhttp://en.wikipedia.org/wiki/Voltage_multiplier
  • 7/29/2019 B 11 Documentation

    38/55

    multiply or scale voltages such as x3/2, x4/3, x2/3, etc. and generate arbitrary voltages,

    depending on the controller and circuit topology.

    The term 'charge pump' is also used in phase-locked loop (PLL) circuits. This is a

    completely different application. In a PLL the phase difference between the reference signal(often from a crystal oscillator) and the output signal is translated into two signals - UP and

    DN. The two signals control switches to steer current into or out of a capacitor, causing the

    voltage across the capacitor to increase or decrease. In each cycle, the time during which the

    switch is turned on is proportional to the phase difference; hence the charge delivered is

    dependent on the phase difference also. The capacitor acts to smooth out abrupt changes on

    the voltage and to ensure the PLL's closed-loop stability. The voltage on the capacitor is used

    to tune a voltage-controlled oscillator (VCO), generating the desired output signal frequency.

    The charge pump in a PLL design is constructed in integrated-circuit (IC) technology,

    consisting of pull-up, pull-down transistors and on-chip capacitors and resistors.

    4.3 IMPLEMENTATION PROCEDURE:

    Intelligent Transportation System is a crucial part of Chinas information construction.

    With the increasing city holdings of cars, there are more and more traffic jams, so

    requirements are that Intelligent Transportation needs more improvement. The key

    technology Of Intelligent Transportation is Vehicle positioning System, while the key of

    which is positioning System. Nowadays the most widely used positioning system is the

    Global Positioning System of America (GPS), which is a system consisting 24 satellites

    whose searching area embrace the globe. It can ensure that more than 4 satellites will be

    observed at one time, no matter what time it is or where you are, thus making sure that they

    can collect the longitude and latitude of the view point, and furthermore realizing the

    function of navigation, positioning, and time service.

    The design of this paper-Vehicle positioning System Based on ARMa combination of

    GPS and GSM can upload the information of the vehicle such as the position and speed to

    the Monitoring center in time, to make it convenient to control the traffic. Whats more,

    users can use the password to track vehicles, for security and anti-robbery, call Manual /

    automatic alarm, and check the vehicle position.

    When using GPS to position, each satellite will send to the receiving terminal three key

    messages: Satellite number, satellite position, and time. The receiving terminal store anduse the received information, which is also used to fix the time on the GPS receiver. By

    38

    http://en.wikipedia.org/wiki/Phase-locked_loophttp://en.wikipedia.org/wiki/Phase-locked_loop
  • 7/29/2019 B 11 Documentation

    39/55

    comparing the difference of the time when each satellite signal is received and the time

    when the satellite is sent, The GPS receiver calculate the distance from each satellite to

    the receiver. When the receiver can contact enough satellites, it can use trigonometric

    formulas to calculate the location of the receiver. Three satellites can be able to operate2D positioning (longitude and latitude), while four or more can be able to operate 3D

    positioning (longitude, latitude, and height). The key indicator of positioning is the

    accuracy. The horizontal position accuracy of most Civilian GPS receivers is about 5 to

    10m. Using differential technique, cm- level even mm-level positioning accuracy can be

    achieved.

    ARM controller: In Vehicle terminal, as a central processing unit of the system,

    ARM embedded system has a critical influence on overall performance. So introduced

    by Philips, the 16/32-bit ARM7 TDMI-S core LPC2129 microcontroller with real-time

    simulation and tracking. Support is used. It has 16K bytes of static RAM and 128k

    bytes of embedded high speed Flash memory. In the 64-pin package, 46 GPIO can be

    used. The Conversion Time of 4 10- bit A / D converter can be as few as 2.44us. It has

    Real-time clock and watchdog. A maximum operating frequency of 60MHz of the CPU

    39

  • 7/29/2019 B 11 Documentation

    40/55

    can be achieved through the on-chip PL, and the rich on-chip resources can meet the

    needs of general industrial control. LPC2129 not only works stably and faster, but also has

    dual serial, so is accessible to the plan.

    40

  • 7/29/2019 B 11 Documentation

    41/55

    CHAPTER 5

    ADVANTAGES AND DISADVANTAGES

    Advantages:

    Reduced fuel costs.

    Improved driver efficiency and productivity.

    Route Optimization & Journey Planning.

    Vehicle insurance premium discounts.

    Prevention of employee mileage and timesheet inaccuracies and abuse.

    Reduced time and expenditure on phone calls. Improved Customer Service.

    Reduced administration tasks for drivers and office staff.

    Improved fleet optimization. Increased vehicle security & driver safety.

    Improved ability to monitor employee compliance with road related Health & Safety,

    Duty of Care and Working Time Directive legislation.

    Improved response time to customer requests leading to a competitive advantage.

    Disadvantages:

    1. Network of SIM & SIM balance

    Vehicle tracking a great piece of technology but there are some disadvantages to it.

    Not many, but there are some and if you are going to invest in a tracking system then you

    should be aware of these disadvantages.

    2) To get a vehicle tracking system which can really help your business save money,

    increase productivity, help with customer service, lower insurance premiums, assist with

    health, keep tabs on staff and safety issues and increase profits you will need to make a large

    investment.

    3) Tracking systems can cause some resentment amongst your staff and sometimes there

    can be complaints of an invasion of privacy.

    4) Like any technology it can sometimes go wrong and let you down. Once you become to

    rely on it this can be a problem and cause stress within the business.

    5) If the company that supplies the vehicle tracking goes bankrupt you could be left

    paying for a tracking system that no longer provides you with the service. This is why you

    41

  • 7/29/2019 B 11 Documentation

    42/55

    need to be very careful who you buy vehicle tracking from. Vet the company and their credit

    record carefully. Another option is pay as you go tracking, its more expensive per month, but

    it avoids the problem of getting a lease and you do not have the same initial outlay or

    commitment. Read this article for more information on pay as you go tracking

    CHAPTER 6APPLICATIONS

    42

  • 7/29/2019 B 11 Documentation

    43/55

    Fleet management: When managing a fleet of vehicles, knowing the real-time

    location of all drivers allows management to meet customer needs more efficiently.

    Whether it is delivery, service or other multi-vehicle enterprises, drivers now only

    need a mobile phone with telephony or Internet connection to be inexpensivelytracked by and dispatched efficiently.

    Asset tracking: Companies needing to track valuable assets for insurance or other

    monitoring purposes can now plot the real-time asset location on a map and closely

    monitor movement and operating status.

    Field service management: Companies with a field service workforce for services

    such as repair or maintenance, must be able to plan field workers time, schedule

    subsequent customer visits and be able to operate these departments efficiently.Vehicle tracking allows companies to quickly locate a field engineer and dispatch the

    closest one to meet a new customer request or provide site arrival information.

    Field sales: Mobile sales professionals can access real-time locations. For example, in

    unfamiliar areas, they can locate themselves as well as customers and prospects, get

    driving directions and add nearby last-minute appointments to itineraries. Benefits

    include increased productivity, reduced driving time and increased time spent with

    customers and prospects.

    Trailer tracking: Haulage and Logistics companies often operate lorries with

    detachable load carrying units. The part of the vehicle that drives the load is known as

    the cab and the load carrying unit is known as the trailer. There are different types of

    trailer used for different applications, e.g., flat bed, refrigerated, curtain sider, box

    container.

    Surveillance: A tracker may be placed on a vehicle to follow the vehicle's

    movements.

    Transit tracking: This is the temporary tracking of assets or cargoes from one point to

    another. Users will ensure that the assets do not stop on route or do a U-Turn in order

    to ensure the security of the assets.

    Vehicle tracking systems are widely used worldwide. Components come in various shapes

    and forms but most utilize GPS technology and SMS services. While most will offer real-

    time tracking, others record real time data and store it to be read, similar to data loggers.

    Systems like these track and record and allow reports after certain points have

    43

    http://en.wikipedia.org/wiki/Surveillancehttp://en.wikipedia.org/wiki/Global_Positioning_Systemhttp://en.wikipedia.org/wiki/Surveillancehttp://en.wikipedia.org/wiki/Global_Positioning_System
  • 7/29/2019 B 11 Documentation

    44/55

    CHAPTER 7

    CONCLUSION AND FUTURE SCOPE

    Vehicle increasingly important in large cities and it is more secured than other

    systems. Now a days vehicle Theft is rapidly increasing, with this we can have a good

    control in it. The vehicle can be turned off by only with a simple SMS .Since, now a days the

    cost of the vehicles are increasing they will not step back to it, This setup can be made more

    interactive by adding a display to show some basic information about the vehicle and also

    add emergency numbers which can be used in case of emergency .Upgrading this setup is

    very easy which makes it open to future requirements without the everything from scratch,

    which also makes it more efficient

    44

  • 7/29/2019 B 11 Documentation

    45/55

    CHAPTER 8

    REFERENCE

    [1] Ezell, Barry, "Scenarios One and Two: Source to No 1 PS to No 1 Tank to No 2 PS to No2 tank (High level) for a Master-Slave SCADA System", SCADA Consultants, SCADA Mail

    List, [email protected] (August 1997).

    [2] Lambert, Robert, "An Interview in Newport News, Va.", President, Automation, Inc., June

    12, 1997.

    [3] National Security Telecommunications Advisory Committee (NSTAC), "Information

    Assurance Task Force

    [4] Risk Assessment", http://www.ncs.gov/n5_hp/reports/EPRA.html(October 10, 1997).

    Rockwell Automation SCADA System Selection Guide Allen-Bradley, Publication AG-2.1.

    1998.

    45

  • 7/29/2019 B 11 Documentation

    46/55

    CHAPTER 9

    APENDEX

    CODE

    #include

    void delay()

    {

    unsigned int i;

    for(i=0;i

  • 7/29/2019 B 11 Documentation

    47/55

    void disp(unsigned int i)

    {

    i

  • 7/29/2019 B 11 Documentation

    48/55

    while(!(U1LSR&0X01));

    x=U1RBR;

    if(x!='G')

    {

    goto back1;

    }

    while(!(U1LSR&0X01));

    x=U1RBR;

    if(x!='G')

    {

    goto back1;

    }

    while(!(U1LSR&0X01));

    x=U1RBR;

    if(x!='A')

    {

    goto back1;

    }

    for(i=0;i

  • 7/29/2019 B 11 Documentation

    49/55

    lo[i]=U1RBR;

    }

    cmd(0x01);

    cmd(0x80);

    for(i=0;i

  • 7/29/2019 B 11 Documentation

    50/55

    while(!(U0LSR&0X20));

    while(!(U0LSR&0X01));

    s=U0RBR;

    U0THR=0x0A;

    while(!(U0LSR&0X20));

    while(!(U0LSR&0X01));

    s=U0RBR;

    for(i=0;i

  • 7/29/2019 B 11 Documentation

    51/55

    {

    disp(lo[i]);

    U0THR=lo[i];

    while(!(U0LSR&0X20));

    while(!(U0LSR&0X01));

    s=U0RBR;

    }

    U0THR=0x1A;

    while(!(U0LSR&0X20));

    while(!(U0LSR&0X01));

    s=U0RBR;

    for(i=0;i

  • 7/29/2019 B 11 Documentation

    52/55

    IODIR1=0x03FF0000;

    IODIR0 = 0x00007070;

    U0LCR = 0x83;

    U0DLL = 0x61;

    U0DLM = 0x00;

    U0LCR = 0x03;

    U1LCR = 0x83;

    U1DLL = 0x61;

    U1DLM = 0x00;

    U1LCR = 0x03;

    lcd_init();

    for(i=0;i

  • 7/29/2019 B 11 Documentation

    53/55

    cmd(0x01);

    cmd(0x80);

    while(1)

    {

    cmd(0x01);

    cmd(0x80);

    while(!(U0LSR&0X01));

    x=U0RBR;

    while(x!=',')

    {

    while(!(U0LSR&0X01));

    x=U0RBR;

    }

    while(!(U0LSR&0X01));

    z=U0RBR;//disp(z);

    for(i=0;i

  • 7/29/2019 B 11 Documentation

    54/55

    U0THR=0x0D;

    while(!(U0LSR&0X20));

    while(!(U0LSR&0X01));

    s=U0RBR;

    U0THR=0x0A;

    while(!(U0LSR&0X20));

    while(!(U0LSR&0X01));

    s=U0RBR;

    while(x!='*')

    {

    while(!(U0LSR&0X01));

    x=U0RBR;

    }

    while(!(U0LSR&0X01));

    s=U0RBR;

    if(s=='G')

    {

    gps();

    delay();

    }

    for(i=0;i

  • 7/29/2019 B 11 Documentation

    55/55

    U0THR=z;

    while(!(U0LSR&0X20));

    while(!(U0LSR&0X01));

    s=U0RBR;

    U0THR=0x0D;

    while(!(U0LSR&0X20));

    while(!(U0LSR&0X01));

    s=U0RBR;

    U0THR=0x0A;

    while(!(U0LSR&0X20));

    while(!(U0LSR&0X01));

    s=U0RBR;

    }

    }