You are on page 1of 69

www.final-yearproject.com | www.finalyearthesis.

com

ABSTRACT
The main aim of this project is to construct a user friendly multi-language communication system for illiterate/dumb people traveling by Airlines. As we have different languages in our world and its impossible for us to know all the languages. So, in this project we are building a device that helps them in expressing their needs with other language people (Air hostess) i.e. request them if we need anything in the flight like coffee, tea, drinks etc. In this project we use GLCD and Touch screen Technology to make it easy even to illiterates as it is also included with images, which indicates the needs. This even reduces the difficulty to airhostess in receiving the customers with different languages. Here for wireless communication purpose we use Zigbee technology. ZigBee is a wireless technology developed as an open global standard to address the unique needs of low-cost, low-power, wireless sensor networks. Zigbee is the set of specs built around the IEEE 802.15.4 wireless protocol. As Zigbee is the upcoming technology in wireless field, we had tried to demonstrate its way of functionality and various aspects like kinds, advantages and disadvantages using a small application of controlling the any kind of electronic devices and machines. The Zigbee technology is broadly adopted for bulk and fast data transmission over a dedicated channel. This project consists of Zigbee based system that transmits the wireless signals according to the input given by the user using touch screen. At the receiver (airhostess) end the information will be displayed on GLCD in English language. Here when user sends his need through touch screen, then micro controller transmits that information through Zigbee transmitter. The information received by the Zigbee receiver will be displayed on GLCD.

www.final-yearproject.com | www.finalyearthesis.com

INDEX
CHAPTER Page No:
1 3 4 7 9 9 16 28 29 33 37 43 52 57 58 64 65 66

1. INTRODUCTION 2. BLOCK DIAGRAM 3. CIRCUIT DIAGRAM 4. POWER SUPPLY 5. PIC 16F73


5.1 FEATURES 5.2 PIN DESCRIPTION 5.3 APPLICATIONS

6.TOUCHSCREEN SENSOR
6.1 GRAPHIC LCD WITH TOUCHSCREEN 6.2 TECHNOLOGIES

7. ZIGBEE TECHNOLOGY 8.GLCD 128x64 ADVANTAGES and APPLICATIONS 10. CODING 11. FUTURE SCOPE 12. CONCLUSION 13.BIBLIOGRAPHY

9.

www.final-yearproject.com | www.finalyearthesis.com

LIST OF FIGURES
2.1: Block Diagram 3.1: Touch Screen Airlines assistant Transmitter 3.2: Touch Screen Airlines assistant Receiver 5.1.1: Harvard vs von Neuman Block Architecture 5.1.2:Clock/ Instruction cycle 5.1.3: Instruction pipeline flow 5.2.1: pin diagram of PIC16f73 6.1: Working of Resistive Touch Screens 6.2: Block Diagram of Touch Screen Interface 6.1.1: Graphic LCD with Touch Screen 6.1.2: GLCD with Resistive Touch Screens 6.1.3: Four Wire Resistive Touch Screens 6.1.4: working of Resistive Touch Screens 7.1: ZIGBEE Stack Architecture 7.2 :ZIGBEE Topologies 7.3: ZIGBEE Network Model 8.1: Graphical LCD

Page No
3 4 5 13 14 15 17 30 32 33 34 34 35 46 48 49 53

LIST OF TABLES
6.2 : Comparison of touch screen technologies

Page No
41

www.final-yearproject.com | www.finalyearthesis.com

1.INTRODUCTION
The main aim of this project is to construct a user friendly multi-language communication system for illiterate/dumb people traveling by Airlines. As we have different languages in our world and its impossible for us to know all the languages. So, in this project we are building a device that helps them in expressing their needs with other language people (Air hostess) i.e. request them if we need anything in the flight like coffee, tea, drinks etc. In this project we use GLCD and Touch screen Technology to make it easy even to illiterates as it is also included with images, which indicates the needs. This even reduces the difficulty to airhostess in receiving the customers with different languages. Here for wireless communication purpose we use Zigbee technology. ZigBee is a wireless technology developed as an open global standard to address the unique needs of low-cost, low-power, wireless sensor networks. Zigbee is the set of specs built around the IEEE 802.15.4 wireless protocol. As Zigbee is the upcoming technology in wireless field, we had tried to demonstrate its way of functionality and various aspects like kinds, advantages and disadvantages using a small application of controlling the any kind of electronic devices and machines. The Zigbee technology is broadly adopted for bulk and fast data transmission over a dedicated channel. This project consists of Zigbee based system that transmits the wireless signals according to the input given by the user using touch screen. At the receiver (airhostess) end the information will be displayed on GLCD in English language. Here when user sends his need through touch screen, then micro controller transmits that information through Zigbee transmitter. The information received by the Zigbee receiver will be displayed on GLCD.

This project provides us with the learnings on the following aspects


Interfacing touch screen sensor with Microcontroller. Characteristics of touch screen sensor. Graphical LCD User Interface design. Zigbee receiver. Zigbee transmitter. 4

www.final-yearproject.com | www.finalyearthesis.com Embedded C programming. PCB designing.

The major building blocks of this project are


Two Microcontroller based Control Units with regulated power supply. Two Graphical LCDs. Two GLCD Drivers. Touch Screen Driver. Zigbee (Xbee) based Transmitter. Zigbee (Xbee) based Receiver. LED Indicators. Buzzer.

www.final-yearproject.com | www.finalyearthesis.com

2. BLOCK DIAGRAM
Description
This project consists of Zigbee based system that transmits the wireless signals according to the input given by the user using touch screen. At the receiver (airhostess) end the information will be displayed on GLCD in English language. The Zigbee technology is broadly adopted for bulk and fast data transmission over a dedicated channel. Here when user sends his need through touch screen, then micro controller transmits that information through Zigbee transmitter. The information received by the Zigbee receiver will be displayed on GLCD.

2.1 Block Diagram

Figure 2.1: Block Diagram

www.final-yearproject.com | www.finalyearthesis.com

3.CIRCUIT DIAGRAM

Transmitter

Figure 3.1: Touch Screen Airlines assistant Transmitter

www.final-yearproject.com | www.finalyearthesis.com

Receiver

Figure 3.2: Touch Screen Airlines assistant Receiver

www.final-yearproject.com | www.finalyearthesis.com

Snap shot for the circuit diagram

www.final-yearproject.com | www.finalyearthesis.com

4. POWER SUPPLY
Power supply is the major concern for every electronic device .Since the controller and other devices used are low power devices there is a need to step down the voltage and as well as rectify the output to convert the output to a constant dc

Transformer
Transformer is a device used to increment or decrement the input voltage given as per the requirement. The transformers are classified into two types depending upon their functionality they are Step up transformer and Step down transformer. Here we use a step down transformer for stepping down the house hold ac power supply i.e. the 230-240V power supply to 5V. We use a 5-0-5V center tapped step down transformer.Rectifier The output of the transformer is an ac and should be rectified to a constant dc for this it is necessary to feed the output of the transformer to a rectifier. The rectifier is employed to convert the alternating ac to a constant dc. There are many rectifiers available in the market some of them are Half wave rectifier,Full wave rectifier and Bridge rectifier The rectification is done by using one or more diodes connected in series or parallel. If only one diode is used then only first half cycle is rectified and it is termed as half wave rectification and the rectifier used is termed as Half wave rectifier. If two diodes are employed in parallel then both positive and negative half cycles are rectified and this is full wave rectification and the rectifier is termed as Full wave rectifier. If the diodes are arranged in the form of bridge then it is termed as Bridge rectifier,it acts as a full wave rectifier.These rectifiers are available in the market in the form of integrated chips.

Voltage Regulator
The voltage regulator is used for the voltage regulation purpose. We use IC 7805 voltage regulator.The IC number has a specific significance. The number 78 represents the series while 05 represent the output voltage generated by the IC

10

www.final-yearproject.com | www.finalyearthesis.com

LED
We employ a light emitting diode for testing the functionality of the power supply circuit. Here we use a 5 volts LED which is connected in series with the power supply circuit it verifies the functioning of the power supply. LEDs are also employed in other areas for many purposes. The following are the advantages of using LEDs. It helps us while troubleshooting the device i.e. when the device is malfunctioning it would be easy to detect where the actual problem araised. LED employed with microcontroller verifies whether data is being transmitted. It verifies the functionality of the power supply.

5.PIC16F73
11

www.final-yearproject.com | www.finalyearthesis.com

5.1 FEATURES
The PIC16f73 CMOS FLASH-based 8-bit microcontroller is upward compatible with the PIC16C5x, PIC12Cxxx and PIC16C7x devices. It features 200 ns instruction execution, 256 bytes of EEPROM data memory, self programming, an ICD, 2 Comparators, 8 channels of 8 bit Analog-to-Digital (A/D) converter, 2 capture/compare/PWM functions, a synchronous serial port that can be configured as either 3-wire SPI or 2-wire I2C bus, a USART, and a Parallel Slave Port.

High Performance RISC CPU


Only 35 single word instructions to learn All single cycle instructions except for program branches which are two-cycle Operating speed: DC 20 MHz clock input, DC 200 ns instruction cycle Up to 8K x 14 words of FLASH Program Memory Up to 368 x 8 bytes of Data Memory (RAM) Pin out compatible to the PIC16C73B/74B/76/77 Pin out compatible to the PIC16F873/874/876/877 Interrupt capability (up to 12 sources) Eight level deep hardware stack Direct, Indirect and Relative Addressing modes Processor read access to program memory

Special Microcontroller Features


Power up Timer (PWRT) and oscillator Start up Timer (OST) Watchdog Timer (WDT) with its own on chip RCoscillator for reliable operation Programmable code protection Power saving SLEEP mode Selectable oscillator options In Circuit Serial Programmingvia twoPins

Peripheral Features
12

www.final-yearproject.com | www.finalyearthesis.com Timer0: 8-bit timer/counter with 8-bit prescaler Timer1: 16-bit timer/counter with prescaler can be incremented during Sleep via external crystal/clock Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler Two Capture, Compare, PWM modules 16-bit Capture input; max resolution 12.5 ns 16-bit Compare; max resolution 200 ns PWM max resolution is 10-bit Synchronous Serial Port (SSP) with SPI (Master mode) and I2C (Slave) 8-bit, up to 8-channel Analog-to-Digital converter Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) Parallel Slave Port (PSP), 8-bits wide with external RD, WR and CS controls (40/44pin Only) Brown-out detection circuitry for Brown-Out Reset

Analog Comparator module


2 analog comparators Programmable on-chip voltage reference module Programmable input multiplexing from device inputs and internal VREF Comparator outputs are externally accessible

CMOS Technology
Low power, high speed CMOS FLASH technology Fully static design Wide operating voltage range: 2.0V to 5.5V High Sink/Source Current: 25 mA Industrial temperature range Low power consumption < 2 mA typical @ 5V, 4 MHz, A typical @ 3V, 32 kHz < 1 A typical standby current

Following are the major blocks of PIC Microcontroller. 13

www.final-yearproject.com | www.finalyearthesis.com

Program Memory (FLASH)


It is used for storing a written program. Since memory made in FLASH technology can be programmed and cleared more than once, it makes this microcontroller suitable for device development.

EEPROM
It is usually used for storing important data that must not be lost if power supply suddenly stops. For instance, one such data is an assigned temperature in temperature regulators. If during a loss of power supply this data was lost, we would have to make the adjustment once again upon return of supply. Thus our device looses on self-reliance.

RAM
Data memory used by a program during its execution. In RAM are stored all inter-results or temporary data during run-time.

FREE RUN TIMER


It is an 8-bit register inside a microcontroller that works independently of the program. On every fourth clock of the oscillator it increments its value until it reaches the maximum (255), and then it starts counting over again from zero. As we know the exact timing between each two increments of the timer contents, timer can be used for measuring time which is very useful with some devices.

CPU
Ithas a role of connective element between other blocks in the microcontroller. It coordinates the work of other blocks and executes the user program.Central processing unit (CPU) is the brain of a microcontroller. This part is responsible for finding and fetching the right instruction which needs to be executed, for decoding that instruction and finally for its execution. Central processing unit connects all parts of the microcontroller into one whole. Surely, its most important function is to decode program instructions. When programmer writes a program, instructions have a clear form like MOVLW 0x20. However, in order for a microcontroller to understand that, this letter form of an instruction must be translated into a series of zeros and ones which is called an opcode. This transition from a letter to binary form is done by translators such as assembler translator (also known as an assembler). Instruction thus fetched from program memory must be 14

www.final-yearproject.com | www.finalyearthesis.com decoded by a central processing unit. We can then select from the table of all the instructions a set of actions, which execute a assigned task defined by instruction. As instructions may within themselves contain assignments, which require different transfers of data from one memory into another, from memory onto ports, or some other calculations, CPU must be connected with all parts of the microcontroller. This is made possible through a data bus and an address bus. Arithmetic logic unit is responsible for performing operations of adding, subtracting, moving (left or right within a register) and logic operations. Moving data inside a register is also known as shifting. PIC16f73 contains an 8-bit arithmetic logic unit and 8-bit work registers. In instructions with two operands, ordinarily one operand is in work register (W register), and the other is one of the registers or a constant. By operand we mean the contents on which some operation is being done, and a register is any one of the GPR or SFR registers. GPR is an abbreviation for 'General Purposes Registers', and SFR for 'Special Function Registers'. In instructions with one operand, an operand is either W register or one of the registers. As an addition in doing operations in arithmetic and logic, ALU controls status bits (bits found in STATUS register). Execution of some instructions affects status bits, which depends on the result itself. Depending on which instruction is being executed, ALU can affect values of Carry (C), Digit Carry (DC), and Zero (Z) bits in STATUS register. These devices have a host of features to maximize system reliability, minimize cost through elimination of external components, provide power saving operating modes and offer code protection. These devices have a Watchdog Timer, which can be enabled or disabled, using a configuration bit. It turns off its own RC oscillator for added reliability SLEEP mode is designed to offer a very low current power down mode. The user can wake up from SLEEP through external RESET, watchdog Timer wake up, or through an interrupt. There are two Timers that offer necessary delays on power up. One is the oscillator start up timer intended to keep the chip in RESET until the crystal oscillator is stable. The other is the power up timer, which provides a fixed delay of 72ms on power up only

15

www.final-yearproject.com | www.finalyearthesis.com

Figure 5.1.1: Harvard vs Von Neuman Block Architecture

CISC and RISC


It has already been said that PIC16f73 has RISC architecture. Harvard architecture is a newer concept than Von Neumann. It rose out of the need to speed up the work of a microcontroller. In Harvard architecture data bus and address bus are separate. Thus a greater flow of data is possible through the central processing unit and of course a greater speed of work. Separating a program from data memory makes it further possible for instructions not to have to be 8 bit words. PIC16f73 uses 14 bits for instructions which allows for all instructions to be one word instructions. It is also typical for Harvard architecture to have fewer instructions than von-Neumann's, and to have instructions usually executed in one cycle. Microcontrollers with Harvard architecture are also called RISC Microcontrollers. RISC stands for Reduced Instruction Set Computer. Microcontrollers with Von Neumann's architecture are called CISC microcontrollers.Title CISC stands for Complex Instruction Set Computer.

Since PIC16f73 is a RISC Microcontroller that means that it has a reduced set of instructions more precisely 35 instructions. All of these instructions are executed in one cycle 16

www.final-yearproject.com | www.finalyearthesis.com except for jump and branch instructions. PIC16f73 usually reaches results of 2:1 in code compression and 4:1 in speed in relation to other 8 bit microcontrollers.

Clock / instruction cycle


Clock is microcontrollers main starter and is obtained from an external component called an oscillator. Clock from the oscillator enters a microcontroller via OSC1 pin where internal circuit of a microcontroller divides the clock into four even clocks Q1, Q2, Q3 and Q4 which do not overlap. These four clocks make up one instruction cycle executed. Execution of instruction starts by calling an instruction that is next in string. Instruction is called from program memory on every Q1 and is written in instruction register on Q4. Decoding and execution of instruction are done between the next Q1 and Q4 cycles. On the following diagram we can see the relationship between instruction cycle and clock of the oscillator (OSC1) as well as that of internal clocks Q1 to Q4. Program counter holds information about the address of the next instruction. during which one instruction is

Figure 5.1.2:Clock/ Instruction cycle

Pipelining
17

www.final-yearproject.com | www.finalyearthesis.com Instruction cycle consists of cycles Q1, Q2, Q3 and Q4. Cycles of calling and executing instructions are connected in such a way that in order to make a call one instruction cycle is needed and one more is needed for decoding and execution. However due to pipelining each instruction is effectively executed in one cycle. If instruction causes a change on program counter and PC doesn't point to the following but to some other address, two cycles are needed for executing an instruction. This is so because instruction must be processed again, but this time from the right address. Cycle of calling begins with Q1 clock, by writing into instruction register (IR). Decoding and executing begins with Q2, Q3 and Q4 clocks.

Figure 5.1.3: Instruction pipeline flow TCY0 reads in instruction MOVLW 55h (it doesn't matter to us what instruction was executed, because there is no rectangle pictured on the bottom).TCY1 executes instruction 18

www.final-yearproject.com | www.finalyearthesis.com MOVLW 55h and reads in MOVWF PORTB.TCY2 executes MOVWF PORTB and reads in CALL SUB_1.TCY3 executes a call of a subprogram CALL SUB_1, and reads in instruction BSF PORTA, BIT3. As this instruction is not the one we need, or is not the first instruction of a subprogram SUB_1 whose execution is next in order, instruction must be read in again. This is a good example of an instruction needing more than one cycle. .

5.2 PIN DESCRIPTION


PIC16f73 has a total of 40 pins. It is most frequently found in a DIP40 type of case but can also be found in SMD case which is smaller from a DIP. DIP is an abbreviation for Dual In Package. SMD is an abbreviation for Surface Mount Devices suggesting that holes for pins to go through when mounting aren't necessary in soldering this type of a component. PIC 16f73/76 devices are available only in 28 pin packages, while PIC16f74/77 devices are available in 40 pin and 44 pin packages. All devices in the PIC16f7X family share common architecture, with the following differences The PIC16f73 and PIC16f76 have one half of the total on chip memory of the PIC16f77. The 28 pin devices have 3 I/O ports, while the 40 and 44 pin devices have 5 I/O ports. The 28 pin devices have 11 interrupts, while the 40 and 44 pin devices have 12. The 28 pin devices have 5 A/D input channels, while the 40 and 44 pin devices have 8. The parallel slave port is implemented only on the 40 and 44 pin devices.

Pin Diagram

19

www.final-yearproject.com | www.finalyearthesis.com

Figure 5.2.1: pin diagram of PIC16f73 There are 40 pins on PIC16f73. Most of them can be used as an IO pin. Others are already for specific functions. By utilizing all of this pin so many application can be done such as 1. LCD connect to Port B pin. 2. LED connect to any pin declared as output. 3. Relay and Motor connect to any pin declared as output. 20

www.final-yearproject.com | www.finalyearthesis.com 4. External EEPROM to connect to I2C interface pin RC3 and RC4 (SCL and SDA) 5. LDR, Potentiometer and sensor to connect to analog input pin such as RA0. 6. RC7 for the serial communication interface using RS232 protocol.

Clock Generator
Oscillator circuit is used for providing a microcontroller with a clock. Clock is needed so that microcontroller could execute a program or program instructions.PIC16f73 can work with four different configurations of an oscillator. Since configurations with crystal oscillator and Resistor Capacitor are the ones that are used most frequently these are the only ones we will mention here. Microcontroller type with a crystal oscillator has in its designation XT and a microcontroller with Resistor Capacitor pair has a designation RC.

XT Oscillator
Crystal oscillator is kept in metal housing with two pins where you have written down the frequency at which crystal oscillates. One ceramic capacitor of 30pF whose other end is connected to the ground needs to be connected with each pin. Oscillator and capacitors can be packed in joint case with three pins. Such element is called ceramic resonator and is represented in charts like the one below. Center pins of the element is the ground, while end pins are connected with OSC1 and OSC2 pins on the microcontroller. When designing a device the rule is to place an oscillator nearer a microcontroller so as to avoid any interference on lines on which microcontroller is receiving a clock. RC Oscillator. In applications where great time precision is not necessary, RC oscillator offers additional savings during purchase. Resonant frequency of RC oscillator depends on supply voltage rate, resistance R, capacity C and working temperature. It should be mentioned here that resonant frequency is also influenced by normal variations in process parameters, by tolerance of external R and C components, etc.

Reset
Reset is used for putting the microcontroller into a 'known' condition. That practically means that microcontroller can behave rather inaccurately under certain undesirable conditions. In order to continue its proper functioning it has to be reset, meaning all registers would be placed in a starting position. 21

www.final-yearproject.com | www.finalyearthesis.com Reset is not only used when microcontroller doesn't behave the way we want it to, but can also be used when trying out a device as an interrupt in program execution, or to get a microcontroller ready when loading a program. In order to prevent from bringing a logical zero to MCLR pin accidentally (line above it means that reset is activated by a logical zero), MCLR has to be connected via resistor to the positive supply pole. Resistor should be between 5 and 10K.This kind of resistor, whose function is to keep a certain line on a logical one as a preventive, is called a pull up. Microcontroller PIC16f73 knows several sources of resets: Reset during power on, POR (Power-On Reset) Reset during regular work by bringing logical zero to MCLR microcontroller's pin Reset during SLEEP regime Reset at watchdog timer (WDT) overflow Reset during at WDT overflow during SLEEP work regime. The first one occurs each time a power supply is brought to the microcontroller and serves to bring all registers to a starting position initial state. The second one is a product of purposeful bringing in of a logical zero to MCLR pin during normal operation of the microcontroller. This second one is often used in program development. During a reset, RAM memory locations are not being reset. They are unknown during a power up and are not changed at any reset. Unlike these, SFR registers are reset to a starting position initial state. One of the most important effects of a reset is setting a program counter (PC) to zero (0000h), which enables the program to start executing from the first written instruction. Reset at supply voltage drop below the permissible (Brown-out Reset)

Impulse for resetting during voltage voltage-up is generated by microcontroller itself when it detects an increase in supply VDD (in a range from 1.2V to 1.8V).

That impulse lasts 72ms which is enough time for an oscillator to get stabilized. These 72ms are provided by an internal PWRT timer, which has its own RC oscillator. Microcontroller is in a reset mode as long as PWRT is active. However, as device is working, problem arises when supply doesn't drop to zero but falls below the limit that guarantees Microcontrollers proper functioning. 22

www.final-yearproject.com | www.finalyearthesis.com This is a likely case in practice, especially in industrial environment where disturbances and instability of supply are an everyday occurrence. To solve this problem we need to make sure that microcontroller is in a reset state each time supply falls below the approved limit.

PORTS
Port refers to a group of pins on a microcontroller which can be accessed simultaneously, or on which we can set the desired combination of zeros and ones, or read from them an existing status. Physically, port is a register inside a microcontroller, which is connected by wires to the pins of a microcontroller. Ports represent physical connection of Central Processing Unit with an outside world. Microcontroller uses them in order to monitor or control other components or devices. Due to functionality, some pins have twofold roles like PA4/TOCKI for instance, which is in the same time the fourth bit of port A and an external input for free-run counter. Selection of one of these two pin functions is done in one of the configuration registers. An illustration of this is the fifth bit T0CS in OPTION register. By selecting one of the functions the other one is disabled. All port pins can be designated as input or output, according to the needs of a device that's being developed. In order to define a pin as input or output pin, the right combination of zeros and ones must be written in TRIS register. If the appropriate bit of TRIS register contains logical "1", then that pin is an input pin, and if the opposite is true, it's an output pin. Every port has its proper TRIS register. Thus, port A has TRISA, and port B has TRISB. Pin direction can be changed during the course of work which is particularly fitting for one-line communication where data flow constantly changes direction. PORTA and PORTB state registers are located in bank 0, while TRISA and TRISB pin direction registers are located in bank 1.

PORTB and TRISB


PORTB has adjoined 8 pins. The appropriate register for data direction is TRISB. Setting a bit in TRISB register defines the corresponding port pin as input, and resetting a bit in TRISB register defines the corresponding port pin as output.

23

www.final-yearproject.com | www.finalyearthesis.com Each PORTB pin has a weak internal pull-up resistor (resistor which defines a line to logic one) which can be activated by resetting the seventh bit RBPU in OPTION register. These 'pull-up' resistors are automatically being turned off when port pin is configured as an output. When a microcontroller is started, pull-ups are disabled. Four pins PORTB, RB7:RB4 can cause an interrupt, which occurs when their status changes from logical one into logical zero and opposite. Only pins configured as input can cause this interrupt to occur (if any RB7:RB4 pin is configured as an output, an interrupt won't be generated at the change of status.) This interrupt option along with internal pull-up resistors makes it easier to solve common problems. we find in practice like for instance that of matrix keyboard. If rows on the keyboard are connected to these pins, each push on a key will then cause an interrupt. A microcontroller will determine which key is at hand while processing an interrupt It is not recommended to refer to port B at the same time that interrupt is being processed.

PORTA and TRISA


PORTA has 5 adjoining pins. The corresponding register for data direction is TRISA at address 85h. Like with port B, setting a bit in TRISA register defines also the corresponding port pin as input, and clearing a bit in TRISA register defines the corresponding port pin as output.It is important to note that PORTA pin RA4 can be input only. On that pin is also situated an external input for timer TMR0. Whether RA4 will be a standard input or an input for a counter depends on T0CS bit (TMR0 Clock Source Select bit). This pin enables the timer TMR0 to increment either from internal oscillator or via external impulses on RA4/T0CKI pin.

Memory organization
PIC16f73 has two separate memory blocks, one for data and the other for program. EEPROM memory with GPR and SFR registers in RAM memory make up the data block, while FLASH memory makes up the program block. The program memory and data memory have 24

www.final-yearproject.com | www.finalyearthesis.com separate buses so that concurrent access can occur. The program memory can be read internally by user code.

Program memory
The PIC16F7X devices have a 13 bit program counter capable of addressing an 8K word X 14 bit program memory space. The PIC16F77/76 devices have 8K words of FLASH program memory and the PIC16F73/74 devices have 4K words. The RESET vector is at 0000h and the interrupt vector is at 0004h. Program memory has been carried out in FLASH technology which makes it possible to program a microcontroller many times before it's installed into a device, and even after its installment if eventual changes in program or process parameters should occur. The size of program memory is 1024 locations with 14 bits width where locations zero and four are reserved for reset and interrupt vector. The FLASH program memory is readable during normal operation over the entire VDD range..it is indirectly addressed through the Special Function Registers. Up to 14 bit numbers can be stored into the memory for use as caliberation parameters, serial numbers, packed 7 bit ASCII, etc. Executing a program memory location containing data that forms an invalid instruction results in a NOP. There are five SFRs used to read the program and memory. Those registers are PMCON1, PMDATA, PMDATH, PMADR, PMADRH. A program memory location may be read by the writing two bytes of the address to the PMADR and PMADRH registers and then setting control bit RD. once the read control bit is set, the microcontroller will use the next two instruction cycles to read the data. The data is available in the PMDATA and PMDATH registers after the second NOP instruction. Therefore it can be read as two bytes in the following instructions. The PMDATA and PMDATH registers will hold this value until the next read operation.

Data memory
The Data memory is partitioned into multiple banks, which contain the General purpose registers and the Special function registers. Bits RP1 and RP0 are the bank select bits. Each bank

25

www.final-yearproject.com | www.finalyearthesis.com extends up to 7Fh. The lower locations of each bank are reserved for the Special Function Registers. Above the Special Function Registers are the General Purpose Registers, implemented as static RAM. All implemented banks contain Special Function Registers. Some frequently used Special function registers from one bank may be mirrored in another bank for code reduction and quicker access. The General Purpose Register file can be accessed directly or indirectly through the File Select Register FSR. The Special Function Registers used by the CPU and peripheral modules for controlling the desired operations of the device. These registers are implemented as static RAM. The Special Function Registers can be classified into two sets they are core and peripheral. Data memory consists of EEPROM and RAM memories. EEPROM memory consists of 256 eight-bit locations whose contents are not lost during loosing of power supply. EEPROM is not directly addressable, but is accessed indirectly through EEADR and EEDATA registers. As EEPROM memory usually serves for storing important parameters, there is a strict procedure for writing in EEPROM which must be followed in order to avoid accidental writing. RAM memory for data occupies space on a memory map from location 0x0C to 0x4F which comes to 68 locations. Locations of RAM memory are also called GPR registers which is an abbreviation for General Purpose Registers. GPR registers can be accessed regardless of which bank is selected at the moment.

Memory Banks
Beside this 'length' division to SFR and GPR registers, memory map is also divided in 'width'to two areas called 'banks'. Selecting one of the banks is done via RP0 bit in STATUS register. Bank selection can be also made via directive bankselafter which name of the register to be accessed is specified. In this manner, there is no need to memorize which register is in which bank.

Program Counter

26

www.final-yearproject.com | www.finalyearthesis.com The program counter is a 13 bits wide. The low byte comes from the PCL register, which is a readable and writableregister. The upper bits are not readable, but are indirectly writable to through the PCLATH register. On any RESET, the upper bits of the PC will be cleared Program counter (PC) is a 13-bit register that contains the address of the instruction being executed. It is physically carried out as a combination of a 5-bit register PCLATH for the five higher bits of the address, and the 8-bit register PCL for the lower 8 bits of the address. By its incrementing or change (i.e. in case of jumps) microcontroller executes program instructions step-by-step.

Stack
PIC16F73 has a 13-bit stack with 8 levels, or in other words, a group of 8 memory locations, 13 bits wide, with special purpose. The stack space is not part of either program or data space and the stack pointer is not readable or writable. The PC is pushed onto the stack when a CALL instruction is executed, or an interrupt causes branch. Its basic role is to keep the value of program counter after a jump from the main program to an address of a subprogram. In order for a program to know how to go back to the point where it started from, it has to return the value of a program counter from a stack. When moving from a program to a subprogram, program counter is being pushed onto a stack (example of this is CALL instruction). When executing instructions such as RETURN, RETLW or RETFIE which were executed at the end of a subprogram, program counter was taken from a stack so that program could continue where was stopped before it was interrupted. These operations of placing on and taking off from a program counter stack are called PUSH and POP, and are named according to similar instructions on some bigger Microcontrollers. The stack operates as a circular buffer. This means that after the stack has been pushed eight times, the ninth PUSH overwrites the value that was stored from the first push. The tenth push overwrites the second push.

In System Programming
27

www.final-yearproject.com | www.finalyearthesis.com In order to program a program memory, microcontroller must be set to special working mode by bringing up MCLR pin to 13.5V, and supply voltage Vdd has to be stabilized between 4.5V to 5.5V. Program memory can be programmed serially using two 'data/clock' pins, which must previously be separated from device lines, so that errors wouldn't come up during programming.

Addressing modes
RAM memory locations can be accessed directly or indirectly.

Direct Addressing
Direct Addressing is done through a 9-bit address. This address is obtained by connecting 7th bit of direct address of an instruction with two bits (RP1, RP0) from STATUS register. Any access to SFR registers is an example of direct addressing.

Indirect Addressing
Indirect unlike direct addressing does not take an address from an instruction but derives it from IRP bit of STATUS and FSR registers. Addressed location is accessed via INDF register which in fact holds the address indicated by a FSR. In other words, any instruction which uses INDF as its register in reality accesses data indicated by a FSR register. Let's say, for instance, that one general-purpose register (GPR) at address 0Fh contains a value of 20. By writing a value of 0Fh in FSR register we will get a register indicator at address 0Fh, and by reading from INDF register, we will get a value of 20, which means that we have read from the first register its value without accessing it directly (but via FSR and INDF). It appears that this type of addressing does not have any advantages over direct addressing, but certain needs do exist during programming which can be solved smoothly only through indirect addressing. Indirect addressing is very convenient for manipulating data arrays located in GPR registers. In this case, it is necessary to initialize FSR register with a starting address of the array, and the rest of the data can be accessed by incrementing the FSR register.

Such examples include sending a set of data via serial communication, working with buffers and indicators, or erasing a part of RAM memory (16 locations) as in the following

28

www.final-yearproject.com | www.finalyearthesis.com instance.Reading data from INDF register when the contents of FSR register is equal to zero returns the value of zero, and writing to it results in NOP operation (no operation).

Interrupts
Interrupts are a mechanism of a microcontroller, which enables it to respond to some events at the moment they occur, regardless of what microcontroller is doing at the time. This is a very important part, because it provides connection between a microcontroller and environment, which surrounds it. Generally, each interrupt changes the program flow, interrupts it and after executing an interrupt subprogram (interrupt routine) it continues from that same point on. Control register of an interrupt is called INTCON and can be accessed regardless of the bank selected. Its role is to allow or disallowed interrupts, and in case they are not allowed, it registers single interrupt requests through its own bits. PIC16f73 has four interrupt sources Termination of writing data to EEPROM TMR0 interrupt caused by timer overflow Interrupt during alteration on RB4, RB5, RB6 and RB7 pins of port B. External interrupt from RB0/INT pin of microcontroller

Free-run timer TMR0


Timers are usually the most complicated parts of a microcontroller, so it is necessary to set aside more time for understanding them thoroughly. Through their application it is possible to establish relations between a real dimension such as "time" and a variable which represents status of a timer within a microcontroller. Physically, timer is a register whose value is continually increasing to 255, and then it starts all over again: 0, 1, 2, 3, 4...255....0,1, 2, 3......etc. This incrementing is done in the background of everything a microcontroller does. It is up to programmer to think up a way how he will take advantage of this characteristic for his needs. One of the ways is increasing some variable on each timer overflow. If we know how much time a timer needs to make one complete round, then multiplying the value of a variable by that time will yield the total amount of elapsed time. PIC16f73 has an 8-bit timer. Number of bits determines what value timer counts to before starting to count from zero again. In the case of an 8-bit timer, that number is 256. A

29

www.final-yearproject.com | www.finalyearthesis.com simplified scheme of relation between a timer and a prescaler is represented on the previous diagram. Prescaler is a name for the part of a microcontroller which divides oscillator clock before it will reach logic that increases timer status. Number which divides a clock is defined through first three bits in OPTION register. The highest divisor is 256. This actually means that only at every 256th clock, timer value would increase by one. This provides us with the ability to measure longer timer periods. After each count up to 255, timer resets its value to zero and starts with a new cycle of counting to 255. During each transition from 255 to zero, T0IF bit in INTCOM register is set. If interrupts are allowed to occur, this can be taken advantage of in generating interrupts and in processing interrupt routine. It is up to programmer to reset T0IF bit in interrupt routine, so that new interrupt or new overflow could be detected. Beside the internal oscillator clock, timer status can also be increased by the external clock on RA4/TOCKI pin. Choosing one of these two options is done in OPTION register through T0CS bit. If this option of external clock was selected, it would be possible to define the edge of a signal (rising or falling), on which timer would increase its value. In practice, one of the typical example that is solved via external clock and a timer is counting full turns of an axis of some production machine, like transformer winder for instance. Let's wind four metal screws on the axis of a winder. These four screws will represent metal convexity. Let's place now the inductive sensor at a distance of 5mm from the head of a screw. Inductive sensor will generate the falling signal every time the head of the screw is parallel with sensor head. Each signal will represent one fourth of a full turn, and the sum of all full turns will be found in TMR0 timer. Program can easily read this data from the timer through a data bus.

EEPROM Data memory


PIC16f73 has 256 bytes of EEPROM memory locations on addresses from 00h to 63h that can be written to or read from. The most important characteristic of this memory is that it does not lose its contents with the loss of power supply. Data can be retained in EEPROM without power supply for up to 40 years (as manufacturer of PIC16f73 microcontroller states), and up to 1 million cycles of writing can be executed. 30

www.final-yearproject.com | www.finalyearthesis.com In practice, EEPROM memory is used for storing important data or process parameters. One such parameter is a given temperature, assigned when setting up a temperature regulator to some process. If that data wasn't retained, it would be necessary to adjust a given temperature after each loss of supply. Since this is very impractical (and even dangerous), manufacturers of microcontrollers have began installing one smaller type of EEPROM memory. EEPROM memory is placed in a special memory space and can be accessed through special registers. These registers are EEDATA EEADR EECON1 EECON2 Holds read data or that to be written. Contains an address of EEPROM location being accessed. Contains control bits. This register does not exist physically and serves to protect EEPROM from accidental writing.

5.3 APPLICATIONS
PIC16F73 perfectly fits many uses, from automotive industries and controlling home appliances to industrial instruments, remote sensors, electrical door locks and safety devices. It is also ideal for smart cards as well as for battery supplied devices because of its low consumption. EEPROM memory makes it easier to apply microcontrollers to devices where permanent storage of various parameters is needed (codes for transmitters, motor speed, receiver frequencies, etc.). Low cost, low consumption, easy handling and flexibility make PIC16F73 applicable even in areas where microcontrollers had not previously been considered (example: timer functions, interface replacement in larger systems, coprocessor applications, etc.). In System Programmability of this chip (along with using only two pins in data transfer) makes possible the flexibility of a product, after assembling and testing have been completed. This capability can be used to create assembly-line production, to store calibration data available only after final testing, or it can be used to improve programs on finished products.

6. TOUCH SCREEN SENSOR


Introduction
31

www.final-yearproject.com | www.finalyearthesis.com A Touch Screens is any monitor based either on LCD or CRT technology which accepts direct on screen input. The ability for direct onscreen input is facilitated by an external (light pen) or an internal device (touch overlay and controller) that relays the X, Y coordinates to the computer. Touch screen sensors are composed of a transparent touch screen surface surrounded by a sensor array that provides positional information to a processor. A touch screen sensor enables the display to be used as input device and replaces the keyboard or mouse as the primary method of input for interacting with a display's content. Touch screen sensors can be attached to computers and handheld devices. There are several basic types of touch screen sensors. Examples include capacitive glass touch screen sensors, resistive touch screens, and complete touch screen systems. A capacitive glass touch screen sensor is placed on a touch screen panel that is coated with indium tin oxide. The panel conducts a continuous electrical current across the sensor in order to detect changes in capacitance. A resistive touch screen panel is also coated with a thin-film, but in order to produce an electrically resistive layer. Each change in electrical resistance is marked as a touch event and sent to a controller for processing. A complete touch screen system allows a user to operate a computer or terminal by touching the display screen. A touch screen system consists of a touch screen sensor array, a controller card, and a software driver. Selecting touch screen sensors requires an analysis of performance specifications and application requirements. In general, resistive touch screens provide only 75% clarity. They are available in 12.1 in., 15.0 in., 17.1 in., 18.1 in., 19.1 in., and 20.1 in. models. Four-wire, 5-wire, and 8-wire resistive touch screens are commonly available. We are mostly using the 4 wire resistive touch sensor.

Touch screen sensors are used in many applications. Some touch screen sensors are used in pen digitizers for signature capture, smart phones, or personal digital assistants (PDAs). Other touch screen sensors are used in ATMs or portable game consoles. Specialized touch screen sensors can also be used in information appliances. 32

www.final-yearproject.com | www.finalyearthesis.com

RESISTIVE TOUCH SCREEN TECHNOLOGY


Resistive LCD touch screen monitors rely on a touch overlay, which is composed of a flexible top layer and a rigid bottom layer separated by insulating dots, attached to a touch screen controller. The inside surface of each of the two layers is coated with a transparent metal oxide coating (ITO) that facilitates a gradient across each layer when voltage is applied. Pressing the flexible top sheet creates electrical contact between the resistive layers, producing a switch closing in the circuit. The control electronics alternate voltage between the layers and pass the resulting X and Y touch coordinates to the touch screen controller. The touch screen controller data is then passed on to the computer operating system for processing. Resistive Touch Screens are composed of two flexible sheets coated with a resistive material and separated by an air gap or microdots. When contact is made to the surface of the Touch Screens, the two sheets are pressed together, registering the precise location of the touch. Because the Touch Screens senses input from contact with nearly any object (finger, stylus/pen, palm) resistive Touch Screens are a type of "passive" technology.

Working of Resistive Touch Screens

Figure 6.1: Working of Resistive Touch Screens 1. Polyester Film 2. Upper Resistive circuit Layer 3. Conductive ITO (Transparent Metal Coating). 33

www.final-yearproject.com | www.finalyearthesis.com 4. Lower Resistive Circuit Layer 5. Insulating Dots 6. Glass/Acrylic Substrate 7. Touching the overlay surface causes the (2) Upper Resistive Circuit Layer to contact the (4) Lower Resistive Circuit Layer, producing a circuit switch from the activated area. 8. The touch screen controller gets the alternating voltages between the (7) two circuit layers and converts them into the digital X and Y coordinates of the activated area. Because of its versatility and cost-effectiveness, resistive touch screen technology is the touch technology of choice for many markets and applications. Resistive touch screens are used in food service, retail point-of-sale (POS), medical monitoring devices, industrial process control and instrumentation, portable and handheld products. Resistive Touch Screen technology possesses many advantages over other alternative touch Screen technologies (acoustic wave, capacitive, Near Field imaging, and infrared). Highly durable, resistive Touch Screens are less susceptible to contaminants that easily infect acoustic waveTouch Screens. In addition, resistive Touch Screens are less sensitive to the effects of severe scratches that would incapacitate capacitive Touch Screens. For industrial applications, resistive Touch Screens are more cost-effective solutions than Near Field Imaging Touch Screens. A four-wire resistive touch screen panel consists of two flexible layers uniformly coated with a transparent resistive material and separated by an air gap. Electrodes placed along the edges of the layers provide a means for exciting and monitoring the touch screen.

Block Diagram of Touch Screen Interface

34

www.final-yearproject.com | www.finalyearthesis.com

Figure 6.2: Block Diagram of Touch Screen Interface When a position is measured on a 4-wire touch screen, voltage is applied across the screen in the Y direction; and a touch presses the layers together, where a voltage can be read from one of the X electrodes. The contact made as a result of the touch creates a voltage divider at that point, so the Y coordinate can be determined; the process then repeats with the X direction being driven, and a reading is taken from one of the Y electrodes. A touch-screen controller is simply an ADC that has built-in switches to control which electrodes are driven and which electrodes are used as the input to the ADC. An Analog Devices AD7843 scans the X and Y axes and determines the unique voltage drop for each axis. The four electrodes for scanning are labeled X+, X-, Y+, and Y-. These electrodes are connected to the AD7843 touch screen controller and the touch sensor is scanned and the analog voltages read. The four touch electrodes are connected to the inputs X+, X-, Y+, and Y- of the AD7843. A selected axis (X or Y) pair of electrodes is energized with a static voltage and the voltage of the positive electrode of the other pair in the 4 wire touch panel is measured. The sensed voltage is measured and converted to either an 8 bit or 12 bit resolution. A digital word representing the voltage at the contacting point on the touch panel is created and sent out via a high speed SPI serial interface.

6.1 GRAPHIC LCD WITH TOUCHSCREEN


35

www.final-yearproject.com | www.finalyearthesis.com These GLCD have common display drivers like KS0108 and T6963C and 4 wire resistive Touch Screens. There is no need for touch screen digitizer/controller for micro controllers having on chip ADC with four analog channels. Just connect the four wire of touch screen to analog inputs and read the respective digital data for X and Y direction of touched point.

Fig 6.1.1: Graphic LCD with Touch Screen

Comparisons of all Resistive Touch Technologies (4-, 5-, 6-, 7-, and 8-Wire)
Resistive Touch Screens are used in more applications than any other touch technology for example, PDAs, point-of-sale, industrial, medical, and office automation, as well as consumer electronics. All variations of Resistive Touch Screens have some things in common: They are all constructed similarly in layers-a back layer such as glass with a uniform resistive coating plus a polyester coversheet, with the layers separated by tiny insulating dots. When the screen is touched, it pushes the conductive coating on the coversheet against the coating on the glass, making electrical contact. The voltages produced are the analog representation of the position touched. An electronic controller converts these voltages into digital X and Y coordinates which are then transmitted to the host computer. Because Resistive Touch Screens are force activated, all kinds of touch input devices can activate the screen, including fingers, fingernails, styluses, gloved hands, and credit cards. All have similar optical properties, resistance to chemicals and abuse. 36

www.final-yearproject.com | www.finalyearthesis.com Both the Touch Screens and its electronics are simple to integrate into imbedded systems, thereby providing one of the most practical and cost-effective Touch Screens solutions.

Figure 6.1.2: GLCD with Resistive Touch Screens

FOUR WIRE RESISTIVE


Four-wire resistive technology is the simplest to understand and manufacture. It uses both the upper and lower layers in the Touch Screens "sandwich" to determine the X and Y coordinates. Typically constructed with uniform resistive coatings of indium tin oxide (ITO on the inner sides of the layers and silver buss bars along the edges, the combination sets up lines of equal potential in both X and Y.

Figure 6.1.3: Four Wire Resistive Touch Screens In the illustration below, the controller first applies 5V to the back layer. Upon touch, it probes the analog voltage with the coversheet, reading 2.5V, which represents a left-right 37

www.final-yearproject.com | www.finalyearthesis.com position or X axis. It then flips the process, applying 5V to the coversheet, and probes from the back layer to calculate an up-down position or Y axis. At any time, only three of the four wires are in use (5V, ground, and probe).

Figure 6.1.4: working of Resistive Touch Screens The primary drawback of four-wire technology is that one coordinate axis (usually the Y axis), uses the outer layer, the flexible coversheet, as a uniform voltage gradient. The constant flexing that occurs on the outer coversheet with use will eventually cause microscopic cracks in the ITO coating, changing its electrical characteristics (resistance), degrading the linearity and accuracy of this axis. Unsurprisingly, four-wire Touch Screens are not known for their durability. Typically, they test only to about 1 million touches with a finger-far less when activated by a pointed stylus which speeds the degradation process. Some four-wire products even specify 100,000 activations within a rather large, 20 mm x 20 mm area. In the real world of point-of-sale applications, a level of 100,000 activations with hard, pointed styluses (including fingernails, credit cards, ballpoint pens, etc.) is considered normal usage in just a few months' time.Also, accuracy can drift with environmental changes. The polyester coversheet expands and contracts with temperature and humidity changes, thereby causing long-term degradation to the coatings as well as drift in the touch location. 38

www.final-yearproject.com | www.finalyearthesis.com While all of these drawbacks can be insignificant in smaller sizes, they become increasingly apparent the larger theTouch Screens. Therefore Elo normally recommends fourwire Touch Screensin applications with a display size of 6.4" or smaller. However, the relative low cost, inherent low power consumption, and common availability of chipset controllers with support from imbedded operating systems, makes Elo AT4 four-wire Touch Screens ideal for hand-held devices such as PDAs, wearable computers, and many consumer devices. 4 WireResistive Add-on/Internal Touch Screen for less demanding touch applications. Great for general use, demos, trade shows, proto-typing, proof of concepts, low cost touch requirement.4wire analog resistive touch technology is suitable for applications that require ease of integration, low power consumption, lightweight, portability, cost effectiveness and compact mechanism. Affordable, durable and versatile, the 4-wire resistive touch screens are primarily used in mobile applications, such as smart phones, PDAs, e-books, web pads, digital cameras, GPS, and other consumer or office electronics. Features: Input Method: Stylus, Finger, Gloved Hand Widest Range in Sizes: 1.4" ~ 21" High Transmission Rate Low Power Consumption Narrow Boarder Design Writing and Signature Capture Capability Various Constructions Available: Film/Glass Film/Strengthened Glass Film/Film/PC Sunlight Readability Available Palm Rejection Model Available

6.2 TECHNOLOGIES
There are a number of types of Touch Screens technology.

Resistive
39

www.final-yearproject.com | www.finalyearthesis.com A resistive Touch Screens panel is composed of several layers, the most important of which are two thin, metallic, electrically conductive layers separated by a narrow gap. When an object, such as a finger, presses down on a point on the panel's outer surface the two metallic layers become connected at that point the panel then behaves as a pair of voltage dividers with connected outputs. This causes a change in the electrical current which is registered as a touch event and sent to the controller for processing. Resistive Touch Screenscan also support Multi touch.

Surface acoustic wave


Surface acoustic wave (SAW) technology uses ultrasonic waves that pass over the Touch Screens panel. When the panel is touched, a portion of the wave is absorbed. This change in the ultrasonic waves registers the position of the touch event and sends this information to the controller for processing. Surface wave Touch Screens panels can be damaged by outside elements. Contaminants on the surface can also interfere with the functionality of the Touch Screens.

Capacitive
A capacitive Touch Screens panel consists of an insulator such as glass, coated with a transparent conductor such as indium tin oxide (ITO). As the human body is also a conductor, touching the surface of the screen results in a distortion of the local electrostatic field, measurable as a change in capacitance. Different technologies may be used to determine the location of the touch. The location can be passed to a computer running a software application which will calculate how the user's touch relates to the computer software.

Surface Capacitance
In this basic technology, only one side of the insulator is coated with a conductive layer. A small voltage is applied to the layer, resulting in a uniform electrostatic field. When a conductor, such as a human finger, touches the uncoated surface, a capacitor is dynamically formed. The sensor's controller can determine the location of the touch indirectly from the change in the capacitance as measured from the four corners of the panel. As it has no moving parts, it is moderately durable but has limited resolution, is prone to false signals from parasitic capacitive

40

www.final-yearproject.com | www.finalyearthesis.com coupling, and needs calibration during manufacture. It is therefore most often used in simple applications such as industrial controls.

Projected Capacitance
Projected Capacitive Touch (PCT) technology is a capacitive technology which permits more accurate and flexible operation, by etching the conductive layer. An XY array is formed either by etching a single layer to form a grid pattern of electrodes, or by etching two separate, perpendicular layers of conductive material with parallel lines or tracks to form the grid (comparable to the pixel grid found in many LCD displays). Applying voltage to the array creates a grid of capacitors. Bringing a finger or conductive stylus close to the surface of the sensor changes the local electrostatic field. The capacitance change at every individual point on the grid can be measured to accurately determine the touch location. The use of a grid permits a higher resolution than resistive technology and also allows multi-touch operation. The greater resolution of PCT allows operation without direct contact, such that the conducting layers can be coated with further protective insulating layers, and operates even under screen protectors, or behind weather and vandal-proof glass. PCT is used in a wide range of applications including point of sale systems, smart phones, and public information kiosks. Visual Planet's VIPs Interactive Foil is an example of a kiosk PCT product, where a gloved hand can register a touch on a sensor surface through a glass window. Examples of consumer devices using projected capacitive Touch Screens include Apple Inc.'s iPhone and IPOD Touch, HTC's G1, and HTC Hero, Palm Inc.'s Palm Pre and Palm Pixi and more recently the LG KM900 Arena, Microsoft's Zune HD and Sony Walkman X series.

Infrared

41

www.final-yearproject.com | www.finalyearthesis.com Conventional optical-touch systems use an array of infrared (IR) light-emitting diodes (LEDs) on two adjacent bezel edges of a display, with photo sensors placed on the two opposite bezel edges to analyze the system and determine a touch event. The LED and photo sensor pairs create a grid of light beams across the display. An object (such as a finger or pen) that touches the screen interrupts the light beams, causing a measured decrease in light at the corresponding photo sensors. The measured photo sensor outputs can be used to locate a touch-point coordinate. Widespread adoption of infrared Touch Screen has been hampered by two factors: the relatively high cost of the technology compared to competing touch technologies and the issue of performance in bright ambient light. This latter problem is a result of background light increasing the noise floor at the optical sensor, sometimes to such a degree that the touch screens LED light cannot be detected at all, causing a temporary failure of the touch screen. This is most pronounced in direct sunlight conditions where the sun has a very high energy distribution in the infrared region. However, certain features of infrared touch remain desirable and represent attributes of the ideal Touch Screen, including the option to eliminate the glass or plastic overlay that most other touch technologies require in front of the display. In many cases, this overlay is coated with an electrically conducting transparent material such as ITO, which reduces the optical quality of the display. This advantage of optical Touch Screen is extremely important for many device and display vendors since devices are often sold on the perceived quality of the user display experience. Another feature of infrared touch which has been long desired is the digital nature of the sensor output when compared to many other touch systems that rely on analog-signal processing to determine a touch position. These competing analog systems normally require continual re-calibration,have a complex signal-processing demand (which adds cost and power consumption), demonstrate reduced accuracy and precision compared to a digital system, and have longer-term systemfailure modes due to the operating environment.

Strain gauge
42

www.final-yearproject.com | www.finalyearthesis.com In a strain gauge configuration, also called force panel technology, the screen is springmounted on the four corners and strain gauges are used to determine deflection when the screen is touched. This technology has been around since the 1960s but new advances by Vissumo and FOrigin have made the solution commercially viable. It can also measure the Z-axis and the force of a person's touch. Such screens are typically used in exposed public systems such as ticket machines due to their resistance to vandalism.

Optical imaging
A relatively-modern development in Touch Screen technology, two or more image sensors are placed around the edges (mostly the corners) of the screen. Infrared backlights are placed in the camera's field of view on the other sides of the screen. A touch shows up as a shadow and each pair of cameras can then be triangulated to locate the touch or even measure the size of the touching object (see visual hull). This technology is growing in popularity, due to its scalability, versatility, and affordability, especially for larger units.

Advantages of Four wire Resistive Touch Screen Sensors


It is working well even the surface suffered scraped damage if its glass won't been hurt. Our touch panel could be operated in the environment with -10 to 70 degree for automobile. Warranty is as longer as 1 year for normal operating with 5,000,000 touching times. We provide touch panel with high transparency (more than 78%). It is quite clear even our monitor with low transparency. We could customize various sizes for customers' request between 1.8 to 19 inch.

It is easy to install into varied brands of monitor

Comparison of Touch Screen Technologies


43

www.final-yearproject.com | www.finalyearthesis.com Technology Durability: Stability: Transparency: Installation: Touch: Intense lightresistant: Response time: Following Speed: Excursion: Monitor option: Waterproof: 4-Wire 5 year High Ok Built-in/On wall Anything Good <10ms Good No CRT Good SAW 5 Year Higher Good Built-in/On wall Finger/Pen Good 10ms low Small CRT Ok 5-Wire 3 Year High Good Built-in/On wall Anything Good <15ms Good Big CRT or LCD Good Infrared 3 Year High Good On wall Sharp Bad <20ms Good Big CRT or LCD Ok Capacitive 2 Year Ok Ok Built-in Conductive Bad <15ms Good Big CRT or LCD Good

Table 6.2 :Comparison of touch screen technologies

Advantages
Plug and play compatible. Support complete line of windows and Linux os. Support panels of curve type for CRT and flat type for LCD. Character recognition for English, Chinese and Japanese languages.

Can support any special request for panel, controller or driver Four wire Resistive Touch Screen Specification
input mode: Stylus pen or finger operation temperature: -10 degree to 60 degree 20%rh ~ 85%rh storage temperature: -20 degree to 80 degree 10%rh ~ 90%rh transparency: More than 78% linearity: X less than 1.5%, y less than 1.5% 44

www.final-yearproject.com | www.finalyearthesis.com chattering: Less than 15ms hardness: 3h knock test: 5,000,000 time

Applications of FourWire ResistiveTouch Screen


Light industrial. Home appliances. Portable sport devices. Access control terminals. Portable medical devices.

45

www.final-yearproject.com | www.finalyearthesis.com

7. ZIGBEE TECHNOLOGY
Introduction
When we hold the TV remote and wish to use it we have to necessarily point our control at the device. This one-way, line-of-sight, short-range communication uses infrared (IR) sensors to enable communication and control and it is possible to operate the TV remotely only with its control unit. Add other home theatre modules, an air- conditioner and remotely enabled fans and lights to our room, and we become a juggler who has to handle not only these remotes, but also more numbers that will accompany other home appliances we are likely to use. Some remotes do serve to control more than one device after memorizing' access codes, but this interoperability is restricted to LOS, that too only for a set of related equipment, like the different units of a home entertainment system Now picture a home with entertainment units, security systems including fire alarm, smoke detector and burglar alarm, air-conditioners and kitchen appliances all within whispering distance from each other and imagine a single unit that talks with all the devices, no longer depending on line-of-sight, and traffic no longer being one-way. This means that the devices and the control unit would all need a common standard to enable intelligible communication. ZIGBEE is such a standard for embedded application software and has been ratified in late 2004 under IEEE 802.15.4 Wireless Networking Standards. ZIGBEE is an established set of specifications for wireless personal area networking (WPAN), i.e., digital radio connections between computers and related devices. This kind of network eliminates use of physical data buses like USB and Ethernet cables. The devices could include telephones, hand-held digital assistants, sensors and controls located within a few meters of each other. ZIGBEE is one of the global standards of communication protocol formulated by the relevant task force under the IEEE 802.15 working group. The fourth in the series, WPAN Low Rate/ZIGBEE is the newest and provides specifications for devices that have low data rates, consume very low power and are thus characterized by long battery life.

46

www.final-yearproject.com | www.finalyearthesis.com Other standards like Blue tooth and IrDA address high data rate applications such as voice, video and LAN communications. The ZIGBEE Alliance has been set up as an association of companies working together to enable reliable, cost-effective, low-power, wirelessly networked, monitoring and control products based on an open global standard. Once a manufacturer enrolls in this Alliance for a fee, he can have access to the standard and implement it in his products in the form of ZIGBEE chipsets that would be built into the end devices. Philips, Motorola, Intel, HP are all members of the Alliance. The goal is to provide the consumer with ultimate flexibility, mobility, and ease of use by building wireless intelligence and capabilities into every day devices. ZIGBEE technology will be embedded in a wide range of products and applications across consumer, commercial, industrial and government markets worldwide. For the first time, companies will have a standards-based wireless platform optimized for the unique needs of remote monitoring and control applications, including simplicity, reliability, low-cost and lowpower. The target networks encompass a wide range of devices with low data rates in the Industrial, Scientific and Medical (ISM) radio bands, with building-automation controls like intruder/fire alarms, thermostats and remote (wireless) switches, video/audio remote controls likely to be the most popular applications. So far sensor and control devices have been marketed as proprietary items for want of a standard. With acceptance and implementation of ZIGBEE , interoperability will be enabled in multi-purpose, self-organizing mesh networks. ZigBee is a wireless technology developed as an open global standard to address the unique needs of low-cost, low-power, wireless sensor networks. Zigbee is the set of specs built around the IEEE 802.15.4 wireless protocol. As Zigbee is the upcoming technology in wireless field, we had tried to demonstrate its way of functionality and various aspects like kinds, advantages and disadvantages using a small application of controlling the any kind of electronic devices and machines. The Zigbee technology is broadly adopted for bulk and fast data transmission over a dedicated channel.

47

www.final-yearproject.com | www.finalyearthesis.com

Architecture
Though WPAN implies a reach of only a few meters, 30 feet in the case of ZIGBEE , the network will have several layers, so designed as to enable interpersonal communication within the network, connection to a network of higher level and ultimately an uplink to the Web. The ZIGBEE Standard has evolved standardized sets of solutions, called layers'. These layers facilitate the features that make ZIGBEE very attractive: low cost, easy implementation, reliable data transfer, short-range operations, Very low power consumption and adequate security features.

Network and Application Support layer


The network layer permits growth of network sans high power transmitters. This layer can handle huge numbers of nodes. This level in the ZIGBEE architecture includes the ZIGBEE Device Object (ZDO), user-defined application profile(s) and the Application Support (APS) sub-layer. The APS sub-layer's responsibilities include maintenance of tables that enable matching between two devices and communication among them, and also discovery, the aspect that identifies other devices that operate in the operating space of any device. The responsibility of determining the nature of the device (Coordinator / FFD or RFD) in the network, commencing and replying to binding requests and ensuring a secure relationship between devices rests with the ZDO (ZIGBEE Define Object). The user-defined application refers to the end device that conforms to the ZIGBEE Standard.

Physical (PHY) layer


The IEEE802.15.4 PHY physical layer accommodates high levels of integration by using direct sequence to permit simplicity in the analog circuitry and enable cheaper implementations.

Media Access Control (MAC) layer


The IEEE802.15.4 MAC media access control layer permits use of several topologies without introducing complexity and is meant to work with large numbers of devices.

48

www.final-yearproject.com | www.finalyearthesis.com

Figure 7.1: ZIGBEE Stack Architecture

Device Types
There are three different ZIGBEE device types that operate on these layers in any selforganizing application network. These devices have 64-bit IEEE addresses, with option to enable shorter addresses to reduce packet size, and work in either of two addressing modes star and peer-to-peer. The ZIGBEE coordinator node: There is one, and only one, ZIGBEE coordinator in each network to act as the router to other networks, and can be likened to the root of a (network) tree. It is designed to store information about the network. The full function device FFD: The FFD is an intermediary router transmitting data from other devices. It needs lesser memory than the ZIGBEE coordinator node, and entails lesser manufacturing costs. It can operate in all topologies and can act as a coordinator. The reduced function device RFD: This device is just capable of talking in the network; it cannot relay data from other devices. Requiring even less memory, (no flash, very little ROM and RAM), an RFD will thus be cheaper than an FFD. This device talks only to a network coordinator and can be implemented very simply in star topology.

49

www.final-yearproject.com | www.finalyearthesis.com

ZigbeeCharacterictics
The focus of network applications under the IEEE 802.15.4 / ZIGBEE standard include the features of low power consumption, needed for only two major modes (Tx/Rx or Sleep), high density of nodes per network, low costs and simple implementation. 2.4GHz and 868/915 MHz dual PHY modes. This represents three license-free bands: 2.4- 2.4835 GHz, 868-870 MHz and 902-928 MHz. The number of channels allotted to each frequency band is fixed at sixteen (numbered 11-26), one (numbered 0) and ten (numbered 1-10) respectively. The higher frequency band is applicable worldwide, and the lower band in the areas of North America, Europe, Australia and New Zealand. Low power consumption, with battery life ranging from months to years. Considering the number of devices with remotes in use at present, it is easy to see that more numbers of batteries need to be provisioned every so often, entailing regular (as well as timely), recurring expenditure. In the ZIGBEE standard, longer battery life is achievable by either of two means: continuous network connection and slow but sure battery drain, or intermittent connection and even slower battery drain. Maximum data rates allowed for each of these frequency bands are fixed as 250 kbps @2.4 GHz, 40 kbps @ 915 MHz, and 20 kbps @868MHz. High throughput and low latency for low duty-cycle applications (<0.1%) Channel access using Carrier Sense Multiple Access with Collision Avoidance (CSMA - CA) Addressing space of up to 64 bit IEEE address devices, 65,535 networks 50m typical range Fully reliable hand shaked data transfer protocol. Different topologies as illustrated below: star, peer-to-peer, mesh

50

www.final-yearproject.com | www.finalyearthesis.com

Figure 7.2 :ZIGBEE Topologies

Traffic Types
ZIGBEE /IEEE 802.15.4 addresses three typical traffic types. IEEE 802.15.4 MAC can accommodate all the types. Data is periodic isThe application dictates the rate, and the sensor activates, checks for data and deactivates. Data is intermittent isThe application, or other stimulus, determines the rate, as in the case of say smoke detectors. The device needs to connect to the network only when communication is necessitated. This type enables optimum saving on energy. Data is repetitive, and the rate is fixed a priori. Depending on allotted time slots, called GTS (guaranteed time slot), devices operate for fixed durations. ZIGBEE employs either of two modes, beacon or non-beacon to enable the to-and-fro data traffic. Beacon mode is used when the coordinator runs on batteries and thus offers maximum power savings, whereas the non-beacon mode finds favor when the coordinator is mains powered. In the beacon mode, a device watches out for the coordinator's beacon that gets transmitted at periodically, locks on and looks for messages addressed to it. If message transmission is complete, the coordinator dictates a schedule for the next beacon so that the device goes to sleep'; in fact, the coordinator itself switches to sleep mode.

51

www.final-yearproject.com | www.finalyearthesis.com

Network Model
The functions of the Coordinator, which usually remains in the receptive mode, encompass network set-up, beacon transmission, node management, storage of node information and message routing between nodes. The network node, however, is meant to save energy (and so sleeps' for long periods) and its functions include searching for network availability, data transfer, checks for pending data and queries for data from the coordinator.

Figure 7.3: ZIGBEE Network Model For the sake of simplicity without jeopardizing robustness, this particular IEEE standard defines a quartet frame structure and a super-frame structure used optionally only by the coordinator. The four frame structures are Beacon frame for transmission of beacons Data frame for all data transfers Acknowledgement frame for successful frame receipt confirmations MAC command frame

52

www.final-yearproject.com | www.finalyearthesis.com These frame structures and the coordinator's super-frame structure play critical roles in security of data and integrity in transmission. All protocol layers contribute headers and footers to the frame structure, such that the total overheads for each data packet range are from 15 octets (for short addresses) to 31 octets (for 64-bit addresses). The coordinator lays down the format for the super-frame for sending beacons after every 15.38 ms or/and multiples thereof, up to 252s. This interval is determined a priori and the coordinator thus enables sixteen time slots of identical width between beacons so that channel access is contention-less. Within each time slot, access is contention-based. Nonetheless, the coordinator provides as many as seven GTS (guaranteed time slots) for every beacon interval to ensure better quality.

Technology Comparisons
The Why ZIGBEE question has always had an implied, but never quite worded follower phrase when there is Blue tooth. A comparative study of the two can be found in ZIGBEE 'Wireless Control That Simply Works. The bandwidth of Blue tooth is 1 Mbps, ZIGBEE is one-fourth of this value. The strength of Blue tooth lies in its ability to allow interoperability and replacement of cables,ZIGBEE ,of course, is low costs and long battery life. In terms of protocol stack size, ZIGBEE 32 KB is about one-third of the stack size necessary in other wireless technologies (for limited capability end devices, the stack size is as low as 4 KB). Most important in any meaningful comparison are the diverse application areas of all the different wireless technologies. Blue tooth is meant for such target areas as wireless USB's, handsets and headsets, whereas ZIGBEE is meant to cater to the sensors and remote controls market and other battery operated products. In a gist, it may be said that they are neither complementary standards nor competitors, but just essential standards for different targeted applications. The earlier Blue tooth targets interfaces between PDA and other device (mobile phone / printer etc) and cordless audio applications.

53

www.final-yearproject.com | www.finalyearthesis.com The IEEE 802.15.4based ZIGBEE is designed for remote controls and sensors, which are very many in number, but need only small data packets and, mainly, extremely low power consumption for (long) life. Therefore they are naturally different in their approach to their respective application arenas.

ZIGBEE Applications
The ZIGBEE Alliance targets applications "across consumer, commercial, industrial and government markets worldwide". Unwired applications are highly sought after in many networks that are characterized by numerous nodes consuming minimum power and enjoying long battery lives. ZIGBEE technology is designed to best suit these applications, for the reason that it enables reduced costs of development, very fast market adoption, and rapid ROI. AIRBEE Wireless Inc has tied up with Radio crafts AS to deliver "out-of-thebox"ZIGBEE ready solutions, the former supplying the software and the latter making the module platforms. With even light controls and thermostat producers joining the ZIGBEE Alliance, the list is growing healthily and includes big OEM names like HP, Philips, Motorola and Intel. WithZIGBEE designed to enable two-way communications, not only will the consumer be able to monitor and keep track of domestic utilities usage, but also feed it to a computer system for data analysis. A recent analyst report issued by West Technology Research Solutions estimates that by the year 2008, "annual shipments forZIGBEE chipsets into the home automation segment alone will exceed 339 million units," and will show up in "light switches, fire and smoke detectors, thermostats, appliances in the kitchen, video and audio remote controls, landscaping, and security systems."

54

www.final-yearproject.com | www.finalyearthesis.com

8.GLCD 128x64
Introduction
This 128x64 graphic LCD is the latest high quality offering from Crystal Fonts. This production unit is much more than just a surplus LCD found on many electronics sites. This CFAX model comes with an EL backlight and a 4-wire analog touch screen! You can use it for anything.

Features

Ultra thin and light TAB construction Wide viewing angles Built-in controller: Samsung KS0713 (data sheet 850K). Great for hand held instruments, cell phones, PDAs, etc. Ultra low power consumption

Dimensions

56.0mm x 42.5mm Module Outline (less tab) 52.0mm x 33.5mm Viewing Area 47.76mm x 30.29mm Active Area 0.35mm x 0.40mm Dot Pitch

Salient features of the Interface with Graphical LCD Display are

Programming of additional vacuum signals and other Pheripheric equipment signals possible.

Up to Different languages are included and can be selected: English, German, French, Spanish, Chinese, etc. Standard molding machine interface [SPI & E12] Full diagnosis with text error messages

55

www.final-yearproject.com | www.finalyearthesis.com

LCD port
The LCD port provides the 14 standard signals required to interface to nearly all standard alphanumeric character mode displays from 8 to 80 characters. VDD provides +5 volt regulated power to the display (VSS is Ground). VEE ranges from 0 (maximum intensity) to 2 volts (minimum intensity) with the adjustment of the variable resistor located just above next to the power input. The E signal is an active high enable, which is asserted when the processor makes a memory access within the address range of 0xFE00 to 0xFEFF. RS and R/W are control lines for the display. In order to meet the timing requirements for all standard LCD displays, these are connected to the processor's address lines so they are asserted and remain stable while E is asserted. Because of this, separate locations are used to read and write to the LCD.

Description
Graphical LCD 128x64 controlled with the ATMega16, the graphic LCD GLCD HG1286418C-VA with a S6B0107/S6B0108 controller is used. See below for the pinout of the display. The display has 8 data bits and 5 control bits. The databits are hooked to PORTB and the control bits are hooked to PORTD of the Mega16.

Figure 8.1: Graphical LCD 56

www.final-yearproject.com | www.finalyearthesis.com A small PCB board is made for easy connection to the microcontroller. The program is made with the BASCOM-AVR compiler. The program shows text and a picture on the display. A library file needs to be included in theprogram, the library contains commands to control the display like Setfont - Sets the current font which can be used on the graphical displays. Lcdat - shows text on the display $BGF - Includes a BASCOM Graphic File in the program. Showpic - shows a graphic file on the display Line - draws a line on the display Circle - draws a circle on the display Pset - Sets a single pixel on the display There are several fonts available like a 8x8 font and a 16x16 font, but the font file consume memory, the large the font file the larger the program becomes. The core is used to provide a wishbone compliant interface to a graphical LCD. Currently it supports the Crystalfontz CFAG12864 family, which is based on the KS0108B controller. Other graphical LCDs may be supported at a later date.

Advantages
No time consuming graphic programming Free Windows LCD simulator and development software No expensive software licenses required. Easy to learn powerful commands Fast development, drastically reduced time-to-market Touch-screen driver and analogue touch-screen included Minimal electronics required to drive the display i.e memory, I/O, low cost CPU Hardware cost savings due to the onboard memory and low pin count interface. Variety of serial interfaces ( 5V RS-232, IC, SPI ) Breakout boards with USB, RS232 and RS485 interface Display requires only a single +5V supply Extremely compact construction with DIP connectors at the back of LCD

57

www.final-yearproject.com | www.finalyearthesis.com Stylish black alum. bezel and mounting system available LCD is available with analogue touch screen (order option -TP) Monochrome LCD's are available in blue/white, white/black positive FSTN and Amber Only best quality materials used Long products availability, recommended for industrial products

Applications
Medical equipment Electronic test equipment Industrial machinery Interface Serial terminal Advertising system EPOS Restaurant ordering systems Gaming box Security systems R&D Test units Climatizing units PLC Interface Simulators Environmental monitoring Lab development Student projects Home automation PC external display

HMI operator interface. Advantages of Graphic LCDs


Download high quality fonts of any size, style or language easily and quickly Create graphics using primitives such as bitmaps, pixels, lines, rectangles and bar graphs. Software Control Backlight & Contrast is adjustable in most models 4 different brightness settings 58

www.final-yearproject.com | www.finalyearthesis.com General Purpose Output (20mA drive) Line wrap and Auto screen scroll Bar Graphs and Large Digits Speed settings Splash/Start-up Screen

Features
Speeds from 19.2Kbps to a lighting fast 115Kbps 96 bit buffer 15872 bytes of memory! Store up to 30 full image screens Upload your own fonts for a customized look Communicate over RS232 or I2C Optional wide voltage efficient power regulator from +7 to +30Vdc Extended Black and white ST (MST) Tran missive mode Built-in CCFL backlight40 characters x 18 line capability240 x 128 dot graphic display Excellent readability and high-contrast ratio Built-in LCD controller (T6963C) Wide operating temperature range (0 to 50C) Some examples of graphic LCD controller chips are the Toshiba T6963, Seiko-Epson SED1330, and Hitachi HD61202. Here, we will be primarily concerned with character LCD modules that have the Hitachi HD44780 controller built-in.

59

www.final-yearproject.com | www.finalyearthesis.com

9. ADVANTAGES and APPLICATIONS


The Advantagesof this project are
Its operation is simple and easy It is less expensive It is highly efficient Power required is less Faster and secure data transmission User friendly and easy to install.

The Applicationsof this project are


It is used in airlines It is applicable in hospitals It is used in restaurents Very useful even for illiterates. Helpful in abroad to express users needs. Deaf and dump people also can interact with others. Can be used with any languages.

60

www.final-yearproject.com | www.finalyearthesis.com

10. CODING
//Source Code for Touch Screen Airlines Assistant Project (transmitter) #include <16F73.h> #use delay(clock=20000000) #use rs232 (baud = 9600, xmit=PIN_B0,rcv=PIN_B1,stream=WIRELESS) // WIRELESS communication

unsigned long x_coord, y_coord; voidsend_data(char sdata[]) { fputs(sdata,WIRELESS); }

unsigned long GetX() { unsigned long result; set_adc_channel(0); output_low(PIN_A2); output_high(PIN_A3); result = read_adc(); return result; } unsigned long GetY() { unsigned long result; set_adc_channel(1); output_low(PIN_A3); output_high(PIN_A2); result = read_adc(); return result; } void main() { char text[25]; output_high(PIN_C4); 61

www.final-yearproject.com | www.finalyearthesis.com delay_ms(1000); output_low(PIN_C4); delay_ms(1000); output_high(PIN_C4); delay_ms(1000); output_low(PIN_C4);

while(1) { x_coord = GetX(); //get X- coordinates of touched location on to variable x_coord

y_coord = GetY(); //Get the Y-coordingates of touched location

if((x_coord> 25) && (x_coord< 85) && (y_coord> 25) && (y_coord< 125)) { sprintf(text,"1"); send_data(text); output_high(PIN_C4); } else if((x_coord> 25) && (x_coord< 85) && (y_coord> 150) && (y_coord< 240)) { sprintf(text,"2"); send_data(text); output_high(PIN_C4); } else if((x_coord> 90) && (x_coord< 140) && (y_coord> 25) && (y_coord< 125)) { sprintf(text,"3"); send_data(text); output_high(PIN_C4); } else if((x_coord> 90) && (x_coord< 140) && (y_coord> 150) && (y_coord< 240)) { sprintf(text,"4"); send_data(text); output_high(PIN_C4); } else if((x_coord> 145) && (x_coord< 190) && (y_coord> 25) && (y_coord< 125)) { sprintf(text,"5"); send_data(text); 62

www.final-yearproject.com | www.finalyearthesis.com output_high(PIN_C4); } else if((x_coord> 145) && (x_coord< 190) && (y_coord> 150) && (y_coord< 240)) { sprintf(text,"6"); send_data(text); output_high(PIN_C4); } else if((x_coord> 195) && (x_coord< 250) && (y_coord> 25) && (y_coord< 125)) { output_high(PIN_C3); //LED Lamp ON } else if((x_coord> 195) && (x_coord< 250) && (y_coord> 150) && (y_coord< 240)) { output_low(PIN_C3); //LED Lamp OFF } delay_ms(100); output_low(PIN_C4); } }

63

www.final-yearproject.com | www.finalyearthesis.com //Source Code for Touch Screen Airlines Assistant Project (Receiver) #include <16F73.h> #use delay(clock=20000000) //crystal oscillator #use rs232 (baud = 9600, xmit=PIN_B1,rcv=PIN_B0,stream=WIRELESS) // WIRELESS communication #include <nokiaGLCD.c> //For Nokia Graphical LCD void main() { char text[25]; //For capturing the text charch;

//Following code is for Health Check (microcontroller) output_high(PIN_C4); //LED ON delay_ms(1000); output_low(PIN_C4); //LED OFF delay_ms(1000); output_high(PIN_C4); //LED ON delay_ms(1000); output_low(PIN_C4); //LED OFF nokia_init(); //Initialise Nokia GLCD //Nokia LCD got 6 row and 21 columns nokia_clear_screen(); //Clear the screen contents nokia_gotoxy(2,1); //Go to row number-1 and column number 2 sprintf(text," TOUCH SCREEN"); //this copies the text "TOUCH SCREEN" into the variable text. printf(nokia_printchar,"%s",text); //Print the text on to LCD delay_ms(1000); //wait for 1000 milli seconds nokia_gotoxy(2,3); //third row second column sprintf(text," AIR LINES"); //copies the text into text variable printf(nokia_printchar,"%s",text); delay_ms(500); nokia_gotoxy(2,5); //Fifth row and second column 64

www.final-yearproject.com | www.finalyearthesis.com sprintf(text," ASSISTANT"); printf(nokia_printchar,"%s",text); delay_ms(2000);

nokia_clear_screen(); //clear LCD contents nokia_gotoxy(3,3); sprintf(text,"*** READY ***"); printf(nokia_printchar,"%s",text); delay_ms(1000);

while(1) //Infinite loop starts here { if(!input(PIN_A0)) //If the clear button pressed, then clear the requests on LCD { output_high(PIN_C3); delay_ms(500); //Long Beep output_low(PIN_C3); nokia_clear_screen(); nokia_gotoxy(4,1); printf(nokia_printchar," NO"); nokia_gotoxy(4,3); printf(nokia_printchar," PENDING"); nokia_gotoxy(4,5); printf(nokia_printchar," REQUESTS"); output_low(PIN_C4); }

ch = fgetc(WIRELESS); //get character nokia_clear_screen(); // clear Nokia screen LCD nokia_gotoxy(1,1); printf(nokia_printchar," SEAT NO: A9"); output_high(PIN_C4); //LED ON switch(ch) //switch to the block based on character received. { case '1': nokia_gotoxy(4,3); printf(nokia_printchar," REQUESTING"); nokia_gotoxy(4,5); printf(nokia_printchar," WATER"); 65

www.final-yearproject.com | www.finalyearthesis.com break; case '2': nokia_gotoxy(4,3); printf(nokia_printchar," REQUESTING"); nokia_gotoxy(4,5); printf(nokia_printchar," FOOD"); break; case '3': nokia_gotoxy(4,3); printf(nokia_printchar," REQUESTING"); nokia_gotoxy(4,5); printf(nokia_printchar," MEDICINE"); break; case '4': nokia_gotoxy(4,3); printf(nokia_printchar," REQUESTING"); nokia_gotoxy(4,5); printf(nokia_printchar," BED SHEET"); break; case '5': nokia_gotoxy(4,3); printf(nokia_printchar," REQUESTING"); nokia_gotoxy(4,5); printf(nokia_printchar," SNACKS"); break; case '6': nokia_gotoxy(4,3); printf(nokia_printchar," REQUESTING"); nokia_gotoxy(4,5); printf(nokia_printchar," MAGAZINE"); break; } //end of switch statement } }

66

www.final-yearproject.com | www.finalyearthesis.com

11. FUTURE SCOPE


As we have different languages in our world and its impossible for us to know all the languages. So, in this project we are building a device that helps them in expressing their needs with other language people. As Zigbee is the upcoming technology in wireless field. The Zigbee technology is broadly adopted for bulk and fast data transmission over a dedicated channel. This is used for sending and receiving the information with the otherlanguage people in airlinesusing Touch screen and GLCD.TheprojectTOUCHSCREEN AND ZIGBEE BASED WIRELESSCOMMUNICATION ASSISTANT FOR DUMB/ILLITERATES IN AIRLINES has been successfully designed and tested. Integrating features of all the hardware components used have developed it. Presence of every module has been reasoned out and placed carefully thus contributing to the best working of the unit. Secondly, using highly advanced ICs, microcontrollers and with the help of growing technology the project has been successfully implemented

67

www.final-yearproject.com | www.finalyearthesis.com

12. CONCLUSION
The main aim of this project is to construct a user friendly multi-language communication system for illiterate/dumb people travelling by Airlines. As we have different languages in our world and its impossible for us to know all the languages. So, in this project we are building a device that helps them in expressing their needs with other language people (Air hostess) i.e. request them if we need anything in the flight like coffee, tea, drinks etc. In this project we use GLCD and Touch screen Technology to make it easy even to illiterates as it is also included with images, which indicates the needs. This even reduces the difficulty to airhostess in receiving the customers with different languages. Here for wireless communication purpose we use Zigbee technology. As Zigbee is the upcoming technology in wireless field, we had tried to demonstrate its way of functionality and various aspects like kinds, advantages and disadvantages using a small application of controlling the any kind of electronic devices and machines. The Zigbee technology is broadly adopted for bulk and fast data transmission over a dedicated channel.

68

www.final-yearproject.com | www.finalyearthesis.com

13. BIBLIOGRAPHY
REFERENCES
Embedded Design with the PIC 18F452Micro Controller by John Peatman,published PIC Micro Controller An Introduction to software & hardware interfacing,1 stEdition,Han

2003 by prentice Hall.

Way Huang, Leo Chartrand, published 2004 by DelmavCengage Learning. Potter, R., Weldon, L. and Shneiderman, B. Improving the accuracy of touch screen: An

experimental evaluation of three strategies. Proc. CHI'88. (Washington, D.C., May, 1988), ACM Press, 27-32. Designing Embedded systems with PIC MicroController, second Edition: Principles and Applications by Tim Wilmshurst, published 2009 by Newnes, 2nd edition.

WEB SITES
www.freescale.com www.networkworld.com www.touchscreens.com www.wikipedia.com

69

You might also like