Vous êtes sur la page 1sur 25


Wireless technology is in highest demand because of its various features.

Every industry is trying to capture its benefits. This project deals with the
automation of traditional examination procedure with the help of wireless
In this project every user will have its own Electronic Answer Pad. This
answer pad is a combination of keypad and display, so that user can enter
and view the selected answer of a particular question from a given question
paper. Once the exam is over, all the answers of users will be sent to server
system via Zigbee Technology, the server system will then analyze the
answers with the pre loaded answer sheet, in order to generate the results of
all users.

Block Diagram

Block Diagram Description

1. Electronic Answer Pad

This is a hand held unit, which will act as answer pad for all users. It will
contain a keypad with various keys like option keys A, B, C, D etc to select
the answer, OK, DELET in order to enter or modify the selected answer of a
ny question
in order to view the question number and selected answer this answer pad
will also contain a display unit, also in order to send the result it will use the
Zigbee module

2. Zigbee Module
Zigbee technology is the low power consumption technology,, it can be use
for long range data transfer. We are using Zigbee module in order to transfer
and receive the user data from answer pad

3. ARM LPC 2148

It is the heart of the entire system and used for data analysis and storage. It
will capture the all the answers feed by users and will do the comparison
with standard answers enter by system operator. ARM7 is a generation
of ARM processor designs. This generation introduced the Thumb 16-bit instruction set
providing improved code density compared to previous designs. The most widely used ARM7
designs implement the ARMv4T architecture, but some implement ARMv3 or ARMv5TEJ. All
these designs use a Von Neumann architecture, thus the few versions comprising a cache do not
separate data and instruction caches.

The NXP (founded by Philips) LPC2148 is an ARM7TDMI-S based high-performance 32-bit

RISC Microcontroller with Thumb extensions 512KB on-chip Flash ROM with In-System
Programming (ISP) and In-Application Programming (IAP), 32KB RAM, Vectored Interrupt
Controller, Two 10bit ADCs with 14 channels, USB 2.0 Full Speed Device Controller, Two
UARTs, one with full modem interface. Two I2C serial interfaces, Two SPI serial interfaces Two
32-bit timers, Watchdog Timer, PWM unit, Real Time Clock with optional battery backup,
Brown out detect circuit General purpose I/O pins. CPU clock up to 60 MHz, On-chip crystal
oscillator and On-chip PLL.
Features and benefits
2.1 Key features
* 16-bit/32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 package.
* 8 kB to 40 kB of on-chip static RAM and 32 kB to 512 kB of on-chip flash memory.
128-bit wide interface/accelerator enables high-speed 60 MHz operation.
* In-System Programming/In-Application Programming (ISP/IAP) via on-chip boot
loader software. Single flash sector or full chip erase in 400 ms and programming of
256 B in 1 ms.
* EmbeddedICE RT and Embedded Trace interfaces offer real-time debugging with the
on-chip RealMonitor software and high-speed tracing of instruction execution.
* USB 2.0 Full-speed compliant device controller with 2 kB of endpoint RAM.

In addition, the LPC2146/48 provides 8 kB of on-chip RAM accessible to USB by DMA.

* One or two (LPC2141/42 vs. LPC2144/46/48) 10-bit ADCs provide a total of 6/14
analog inputs, with conversion times as low as 2.44 s per channel.
* Single 10-bit DAC provides variable analog output (LPC2142/44/46/48 only).
* Two 32-bit timers/external event counters (with four capture and four compare
channels each), PWM unit (six outputs) and watchdog.
* Low power Real-Time Clock (RTC) with independent power and 32 kHz clock input

An Introduction to the ARM 7 Architecture

The principle feature of the ARM 7 microcontroller is that it is a register based load-andstore architecture with a number of operating modes. While the ARM7 is a 32 bit
microcontroller, it is also capable of running a 16-bit instruction set, known as THUMB. This
helps it achieve a greater code density and enhanced power saving. While all of the register-toregister data processing instructions are single-cycle, other instructions such as data transfer
instructions, are multi-cycle. To increase the performance of these instructions, the ARM 7 has a
three-stage pipeline. Due to the inherent simplicity of the design and low gate count, ARM 7 is
the industry leader in low-power processing on a watts per MIP basis. Finally, to assist the
developer, the ARM core has a built-in JTAG debug port and on-chip embedded ICE that
allows programs to be downloaded and fully debugged in-system.
In order to keep the ARM 7 both simple and cost-effective, the code and data regions are
accessed via a single data bus. Thus while the ARM 7 is capable of single-cycle execution of all
data processing instructions, data transfer instructions may take several cycles since they will
require at least two accesses onto the bus (one for the instruction one for the data). In order to
improve performance, a three stage pipeline is used that allows multiple instructions to be
processed simultaneously.
The pipeline has three stages; FETCH, DECODE and EXECUTE. The hardware of each stage is
designed to be independent so up to three instructions can be processed simultaneously. The
pipeline is most effective in speeding up sequential code. However a branch instruction will

cause the pipeline to be flushed marring its performance. As we shall see later the ARM 7
designers had some clever ideas to solve this problem.

ARM7 Programming Model

The programmers model of the ARM 7 consists of 15 user registers, as shown in Fig. 3, with
R15 being used as the Program Counter (PC). Since the ARM 7 is a load-and-store architecture,
an user program must load data from memory into the CPU registers, process this data and then
store the result back into memory. Unlike other processors no memory to memory instructions


Fig 2 Load And Store Architecture

As stated above R15 is the Program Counter. R13 and R14 also have special functions; R13 is
used as the stack pointer, though this has only been defined as a programming convention.
Unusually the ARM instruction set does not have PUSH and POP instructions so stack handling

is done via a set of instructions that allow loading and storing of multiple registers in a single
operation. Thus it is possible to PUSH or POP the entire register set onto the stack in a single
instruction. R14 has special significance and is called the link register. When a call is made to
a procedure, the return address is automatically placed into R14, rather than onto a stack, as
might be expected. A return can then be implemented by moving the contents of R14 into R15,
the PC. For multiple calling trees, the contents of R14 (the link register) must be placed onto the

Fig 3 User Mode Register Model
In addition to the 16 CPU registers, there is a current program status register (CPSR). This
contains a set of condition code flags in the upper four bits that record the result of a previous
instruction, as shown in Fig 4. In addition to the condition code flags, the CPSR contains a
number of user-configurable bits that can be used to change the processor mode, enter Thumb
processing and enable/disable interrupts.

Current Program Status Register and Flags

Exception and Interrupt Modes

The ARM 7 architecture has a total of six different operating modes, as shown below. These
modes are protected or exception modes which have associated interrupt sources and their own
register sets.
User: This mode is used to run the application code. Once in user mode the CPSR cannot be
written to and modes can only be changed when an exception is generated.
FIQ: (Fast Interrupt reQuest) This supports high speed interrupt handling. Generally it is used for
a single critical interrupt source in a system
IRQ: (Interrupt ReQuest) This supports all other interrupt sources in a system
Supervisor: A protected mode for running system level code to access hardware or run OS
calls. The ARM 7 enters this mode after reset.
Abort: If an instruction or data is fetched from an invalid memory region, an abort exception will
be generated
Undefined Instruction: If a FETCHED opcode is not an ARM instruction, an undefined
instruction exception will be generated.
The User registers R0-R7 are common to all operating modes. However FIQ mode has its own
R8 R14 that replace the user registers when FIQ is entered. Similarly, each of the other modes
have their own R13 and R14 so that each operating mode has its own unique Stack pointer and

Link register. The CPSR is also common to all modes. However in each of the exception modes,
an additional register - the saved program status register (SPSR), is added. When the processor
changes the current value of the CPSR stored in the SPSR, this can be restored on exiting the

Wireless Answer Pad For Aptitude Examinations

Fig 5 Full Register Set For ARM 7

Entry to the Exception modes is through the interrupt vector table.
Exceptions in the ARM processor can be split into three distinct types.
(i) Exceptions caused by executing an instruction, these include software
interrupts, undefined instruction exceptions and memory abort exceptions
(ii) Exceptions caused as a side effect of an instruction such as a abort
caused by trying to fetch data from an invalid memory region.
(iii) Exceptions unrelated to instruction execution, this includes reset, FIQ and
IRQ interrupts.

Wireless Answer Pad For Aptitude Examinations

802.15.4 Standard
802.15.4 is a standard for wireless communication issued by the IEEE
(Institute for Electrical and Electronics Engineers). The IEEE is a technical
professional association that has written numerous standards to promote
growth and interoperability of existing and emerging technologies. IEEE has
published the standards that define communication in areas such as the
Internet, PC peripherals, industrial communication and wireless technology.
As a few examples, the IEEE 802.11 standard defines communication for
wireless LAN and 802.16 defines communication for broadband wireless
Metropolitan Area Networks. While both of those wireless standards are
concerned with higher bandwidth Internet access applications, 802.15.4 was
developed with lower data rate, simple connectivity and battery application
in mind. The 802.15.4 standard specifies that communication can occur in
the 868-868.8 MHz, the 902-928 MHz or the 2.400-2.4835 GHz Industrial
Scientific and Medical (ISM) bands.
While any of these bands can technically be used by 802.15.4
devices, the 2.4 GHz band is more popular as it is open in most of the
countries worldwide. The 868 MHz band is specified primarily for European
use, whereas the 902-928 MHz band can only be used in the United States,
Canada and a few other countries and territories that accept the FCC
regulations. The 802.15.4 standard specifies that communication should
occur in 5 MHz channels ranging from 2.405 to 2.480 GHz. In the2.4 GHz
band, a maximum over-the-air data rate of 250 kbps is specified, but due to
the overhead of the protocol the actual theoretical maximum data rate is
approximately half of that. While the standard specifies 5 MHz channels, only
approximately 2 MHz of the channel is consumed with the occupied
bandwidth. At 2.4 GHz, 802.15.4 specifies the use of Direct Sequence Spread
Spectrum and uses an Offset Quadrature Phase Shift Keying (O-QPSK) with

Wireless Answer Pad For Aptitude Examinations

half-sine pulse shaping to modulate the RF carrier. The graph below shows
the various channels at the spacing specified by 802.15.4.

The 802.15.4 standard allows for communication in a point-to-point or a

point-to-multipoint configuration. A typical application involves a central
coordinator with multiple remote nodes connecting back to this central host.
Digi's XBee 802.15.4 OEM RF modules can be set up to operate in a pointto-point, point-to-multipoint or a peer-to-peer configuration. While standard
802.15.4 always requires a coordinator, the Digi radios are set up so that a
coordinator is not\ required.

Wireless Answer Pad For Aptitude Examinations

Digi's XBee 802.15.4 OEM RF modules can be set up to operate in a pointto-point, point-to-multipoint or a peer-to-peer configuration.While standard
802.15.4 always requires a coordinator, the Digi radios are set up so that a
coordinator is notrequired.

ZigBee is a protocol that uses the 802.15.4 standard as a baseline and adds
additional routing and networking functionality. The ZigBee protocol was
developed by the ZigBee Alliance. The ZigBee Alliance is a group of
companies that worked in cooperation to develop a network protocol that
can be used in a variety of commercial and industrial low data rate
applications. ZigBee is designed to add mesh networking to the underlying
802.15.4 radio. Mesh networking is used in applications where the range
between two points may be beyond the range of the two radios located at
those points, but intermediate radios are in place that could forward on any
messages to and from the desired radios.

Wireless Answer Pad For Aptitude Examinations

As an example, in the figure above suppose you want to transmit data from
point A to point B, but the distance was too great between the points. The
message could be transmitted through point C and a few other radios to
reach the destination. The ZigBee protocol is designed so that if a number of
different radios were deployed as in the figure above, the radios would
automatically form a network without user intervention. The ZigBee protocol
within the radios will take care of retries, acknowledgements and data
message routing. ZigBee also has the ability to self-heal the network. If the
radio at point C was removed for some reason, a new path would be used to
route messages from A to B. Devices in the ZigBee specification can either
be used as End Devices, Routers or Coordinators. Routers can also be used

Wireless Answer Pad For Aptitude Examinations

as End Devices. Since the ZigBee protocol uses the 802.15.4 standard to
define the PHY and MAC layers, the frequency, signal bandwidth and
modulation techniques are identical. Because ZigBee was designed for low
power applications, it fits well into embedded systems and those markets
where reliability and versatility are important but a high bandwidth is not.
The following table offers a comparison of features with several other
popular wireless technologies and their different applications.

Wireless Answer Pad For Aptitude Examinations

What Does ZigBee Do?

1. Designed for wireless controls and sensors
2. Operates in Personal Area Networks (PANs) and device-to-device networks
3. Connectivity between small packet devices
4. Control of lights, switches, thermostats, appliances, etc

ZigBee Frequencies
1. Operates in Unlicensed Bands
2. ISM 2.4 GHz Global Band at 250kbps
3. 868 MHz European Band at 20kbps
4. 915 MHz North American Band at 40kbps

ZigBee/IEEE 802.15.4 market feature

1. Low power consu2. mption
2. Low cost
3. Low offered message throughput
4. Supports large network orders (<= 65k nodes)
5. Low to no QoS guarantees
6. Flexible protocol design suitable for many applications

Wireless Answer Pad For Aptitude Examinations

Wireless Answer Pad For Aptitude Examinations

Liquid Crystal display (LCD):

The three control lines are EN, RS, and RW.
The EN line is called "Enable." This control line is used to tell the LCD that you are sending it
data. To send data to the LCD, your program should make sure this line is low (0) and then set
the other two control lines and/or put data on the data bus. When the other lines are completely
ready, bring EN high (1) and wait for the minimum amount of time required by the LCD
datasheet (this varies from LCD to LCD), and end by bringing it low (0) again.
The RS line is the "Register Select" line. When RS is low (0), the data is to be treated as a
command or special instruction (such as clear screen, position cursor, etc.). When RS is high (1),
the data being sent is text data which should be displayed on the screen. For example, to display
the letter "T" on the screen you would set RS high.
The RW line is the "Read/Write" control line. When RW is low (0), the information on the data
bus is being written to the LCD. When RW is high (1), the program is effectively querying (or
reading) the LCD. Only one instruction ("Get LCD status") is a read command. All others are
write commands--so RW will almost always be low.
Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selected by the
user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3, DB4,
DB5, DB6, and DB7.
Liquid Crystal Display also called as LCD is very helpful in providing user interface as well as
for debugging purpose. The most common type of LCD controller is HITACHI 44780 which
provides a simple interface between the controller & an LCD. These LCD's are very simple to
interface with the controller as well as are cost effective.

Wireless Answer Pad For Aptitude Examinations

2x16 Line Alphanumeric LCD Display

The most commonly used ALPHANUMERIC displays are 1x16 (Single Line & 16 characters),
2x16 (Double Line & 16 character per line) & 4x20 (four lines & Twenty characters per line).
The LCD requires 3 control lines (RS, R/W & EN) & 8 (or 4) data lines. The number on data
lines depends on the mode of operation. If operated in 8-bit mode then 8 data lines + 3 control
lines i.e. total 11 lines are required. And if operated in 4-bit mode then 4 data lines + 3 control
lines i.e. 7 lines are required. How do we decide which mode to use? Its simple if you have
sufficient data lines you can go for 8 bit mode & if there is a time constrain i.e. display should be
faster then we have to use 8-bit mode because basically 4-bit mode takes twice as more time as
compared to 8-bit mode.






Supply Voltage


Contrast Setting


Register Select


Read/Write Select


Chip Enable Signal

7-14 DB0-DB7 Data Lines



Gnd for the backlight


Vcc for backlight

Wireless Answer Pad For Aptitude Examinations

When RS is low (0), the data is to be treated as a command. When RS is high (1), the data being
sent is considered as text data which should be displayed on the screen.
When R/W is low (0), the information on the data bus is being written to the LCD. When RW is
high (1), the program is effectively reading from the LCD. Most of the times there is no need to
read from the LCD so this line can directly be connected to Gnd thus saving one controller line.
The ENABLE pin is used to latch the data present on the data pins. A HIGH - LOW signal is
required to latch the data. The LCD interprets and executes our command at the instant the EN
line is brought low. If you never bring EN low, your instruction will never be executed.

8051 Interfacing to LCD

RS-232 Protocol

Wireless Answer Pad For Aptitude Examinations

Devices which use serial cables for their communication are split into two categories. Thes DCE
(Data Communications Equipment) and DTE (Data Terminal Equipment.) Data Communication
Equipment are devices such as your modem, TA adapter, plotter etc while Data TermEquipment
is your Computer or Terminal. The electrical specifications of the serial port is contained in the
EIA (Electronics Industry Association) RS232C standard. It states many parameters such as 1.

A "Space" (logic 0) will be between +3 and +25 Volts.


A ark" (Logic 1) will be between -3 and -25 Volts.


The region between +3 and -3 volts is undefined.


An open circuit voltage should never exceed 25 volts. (In Reference to GND)


A short circuit current should not exceed 500mA. The driver should be able to hanwithout

damage. (Take note of this one!) Above is no where near a complete list of the EIA standard.
Line Capacitance, Maximum Baud Rates etc are also included. For more information please
consult the EIA RS232-C standard. It is interesting to note however, that the RS232C standard
specifies a maximum baud rate of 20,000 BPS!, which is rather slow by today's standards. A new
standard, RS-232D has been recently released. Serial Ports come in two "sizes", There are the
D-Type 25 pin connector and the D-Type 9 pin connector both of which are male on the back of
the PC, thus you will require a female connector on your device. Below is a table of pin
connections for the 9 pin and 25 pin D-Type connectors.
Serial Pinouts (D25 and D9 Connectors)
D-Type-25 Pin No.

D-Type-9 Pin No.

Pin 2 Pin 3 TD

Transmit Data

Pin 3 Pin 2 RD

Receive Data

Pin 4 Pin 7 RTS

Request To Send

Pin 5 Pin 8 CTS

Clear To Send

Pin 6 Pin 6 DSR

Data Set Ready

Pin 7 Pin 5 SG

Signal Ground

Abbreviation Full Name

Wireless Answer Pad For Aptitude Examinations

Pin 8 Pin 1 CD

Carrier Detect

Pin 20 Pin 4 DTR

Data Terminal Ready

Pin 22 Pin 9 RI

Ring Indicator

Pin Functions
Abbreviation Full Name



Transmit Data Serial Data Output (TXD)


Receive Data Serial Data Input (RXD)


Clear to Send This line indicates that the Modem is ready to exchange data.

DCD Data Carrier Detect

When the modem detects a "Carrier" from the modem at the other

end of the phone line, this Line becomes active.


Data Set Ready This tells the UART that the modem is ready to establish a link.


Data Terminal Ready This is the opposite to DSR. This tells the Modem that the UART

is ready to link.

Request To Send

This line informs the Modem that the UART is ready to exchange


It can be classified in following modes
1 Electronic Answer Pad
2. Server System

Wireless Answer Pad For Aptitude Examinations

1 Electronic Answer Pad

The electronic answer pad is a combination of microcontroller, keypad,
display and zigbee module it will act as individual device for each user, it will
be having a unique code for eacg user. So that the user data can be
separated from each other in this mode user will enter answers for all the
questions in exam paper with the help of option keys available on answer
pad. He will be able to see the question number and the answer entered by
him on the display attached to the answer pad. He can also modify the
answers if necessary. The microcontroller will store this data and will
continue sly send it to the server system with the help of Zigbee module
attached to the system
2. Server System
A server system will contain a zigbee receiver in order to capture the user
data from electronic answer pad of each user, also microcontroller and
server PC. It will capture this data in predefined sequence from all users in
this mode the server system will receive the data from zigbee module. It will
store it in the controller and compares it with the reference answer sheet.
Once this is done it will generate the result for all users and send it to the PC
via serial communication , the server system will store this results for future
use a


Wireless Answer Pad For Aptitude Examinations

Wireless Answer Pad For Aptitude Examinations

1 It avoid the manual errors in paper correction system
2. Very reliable, secure and accurate
3. It avoids proxy users as validation and user verification is perform by the
4. Time saving and user friendly system

1. For Aptitude Entrance examination
2. as voting meter for internal voting in organizations.
3. In Quiz shoes.
4. For Aptitude questions in companies for interview purpose.

Future Scope
1. With the help of internet we can increase the scope of this system.
2. By the use of face recognition and CCTV we can increase the security of
the system.
3. internet interface can be developed for future use.