1
CHAPTER 1
INTRODUCTION
People with visual disabilities are often challenged by the places that
are not designed for their special condition. Examples of such places are bus,
train terminals, offices, hospitals, educational buildings, and shopping malls.
Everyday objects that are present in the environments become real obstacles
for blind people and even putting them at risk. Simple objects such as chair,
table and stairs hinder their movements and can often cause serious
accidents.
This problem involves many issues like accuracy, coverage, usability
and interoperability that are not easy to address with the current technology.
Therefore, this can be considered as an open problem. This project presents
a prototype of a navigation system that helps the visually impaired to move
within indoor environments. The system designed has been focused on
usability of the solution for the problem and also on its suitability for
deployment in several built areas.
The main objective of the system is to provide an real-time,
navigation information that enables the user to make appropriate and timely
decisions on which route to follow in an indoor space. In order to provide
such information, the system must take into the account of all the objects in
the immediate physical environment which may become potential obstacles
for blind people. This kind of solution is known as a micro-navigation
system. In order to deal with these issues the system uses the interaction
among several components which process the user and environment
information, to generate and deliver navigation messages to users while they
are moving in an indoor area. The system’s main components are infrared
LED and speaker.
2
When the user gives input by pressing the button in the keypad, the
Radio frequency receiver couples with the transmitter and APR33A3 which
is sound recording device guides the user with the direction. On reaching the
destination IR transmitter and receiver attains the line of sight path. This
indicates that the destination is reached through the speaker.
3
CHAPTER 2
BLIND PEOPLE NAVIGATION SYSTEM
2.1 TRANSMITTER BLOCK
INTRODUCTION
IR TRANSMITTER:
IR transmitter continuously transmits the IR signal to the receiver.
RF TRANSMITTER:
Waiting for the blind person to press any key be a pair with radio
frequency of the receiver.
MICROCONTROLLER:
Faster speed of execution and inexpensive.
Fig no.:2.1 Transmitter
4
2.2 RECEIVER BLOCK
INTRODUCTION
IR RECEIVER:
It receives the IR signal from the transmitter to detect any obstacle
crossing the way.
RF RECEIVER:
By using the radio frequen
cy (434 MHz) to be paired with the desired location.
KEYPAD:
Select to reach the target position.
Fig.:2.2Receiver
5
2.3 TRANSMITTER BLOCK CIRCUIT DIAGRAM
Fig no.:2.3 Blind people navigation system for indoor
environment(Transmitter)
6
2.4 RECEIVER BLOCK CIRCUIT DIAGRAM
Fig.:2.4 Blind people navigation system forindoor
environment(Receiver)
7
CHAPTER 3
HARDWARE DESCRIPTION
3.1 POWER SUPPLY
3.1.1 BATTERY
The battery has both terminals in a snap connector on one end. The
smaller circular terminal is positive, and the larger hexagonal or octagonal
terminal is the negative contact. The connectors on the battery are the same
as on the connector itself; the smaller one connects to the larger one and vice
versa. The same snap style connector is used on other battery types in
the power pack (PP) series. Battery polarization is normally obvious since
mechanical connection is usually only possible in one configuration. A
problem with this style of connector is that it is very easy to connect two
batteries together in a short circuit, which quickly discharges both batteries,
generating heat and possibly a fire. Because of this hazard, 9-volt batteries
should be kept in the original packaging until it is going to be used. An
advantage is that several nine-volt batteries can be connected to each other
in series in order to provide higher voltages.
3.1.2 TECHNICAL SPECIFICATIONS
The most common type of 9V battery is referred as 9V, although
there are less common 9V batteries of different sizes. Codes for the usual
size include PP3 (for size and voltage, any technology), 6LR61 (IEC code
for alkaline batteries).
The PP3 size battery has height 48.5 mm, length 26.5 mm, width
17.5 mm (or 1.9"x1.0"x0.68"). Both terminals are at one end and their
centers are 1/2 inch (12.7 mm) apart.
8
Inside an alkaline or carbon-zinc 9-volt battery there are six cylindrical
or flat cells connected in series. Some brands use welded tabsinternally to
attach to the cells, others press foil strips against the ends of the cells.
Rechargeable Nickel-Cadmium (Ni CD) and Nickel-Metal Hydride
(Ni MH) batteries of nominal 9V rating have between six and eight 1.2V
cells. Lithium ion versions typically use two cells (3.7V nominal each).
There are also lithium polymer and low self-discharge Ni MH versions.
Mercury batteries were formerly made in this size. They had higher
capacity than the standard carbon-zinc types, a nominal voltage of 8.4 V and
very stable voltage.
Fig no. 3.1.:Battery
9
3.1.3 REGULATOR
Voltage regulator ICs are available with fixed or variable output voltages.
Regulator IC unit contain the circuitry for reference source, comparator
amplifier, control device, and overload protection all in a single IC.
IC units provide regulation of either a fixed positive voltage, a fixed
negative voltage, or an adjustable set voltage. The regulators can be selected
for operation with load currents from hundreds of mA to tens of amperes,
corresponding to power ratings from mW to tens of watts.
A fixed three-terminal voltage regulator has an unregulated dc input
voltage, applied to one input terminal, a regulated dc output voltage obtained
from a second terminal, with the third terminal connected to ground. The
series 78 regulators provide fixed positive regulated voltages from 5 to 24 V.
7805 voltage regulator provides positive 5 V.
3.1.4 INTRODUCTION OF MICROCONTROLLER
Microcontroller is a general purpose device, which integrates a
number of the components of a microprocessor system on to single chip. It
has inbuilt CPU, memory and peripherals to make it as a mini computer.
Micro controller is a stand-alone unit, which can perform functions on
its own without any requirement for additional hardware like I/O ports and
external memory. The heart of the microcontroller is the CPU core. In the
past, this has traditionally been based on a 8-bit microprocessor unit. For
example Motorola uses a basic 6800 microprocessor core in their 6805/6808
microcontroller devices.
In the recent years, microcontrollers have been developed around
specifically designed CPU cores, for example the microchip PIC range of
microcontrollers.
10
3.1.5 INTRODUCTION TO PIC (PERIPHERAL
INTERFACE CONTROLLER)
The microcontroller that has been used for this project is from PIC
series. PIC microcontroller is the first RISC(Reduced Instruction Set
Computer) based microcontroller fabricated in CMOS (complementary
metal oxide semiconductor) that uses separate bus for instruction and data
allowing simultaneous access of program and data memory.
The main advantage of CMOS and RISC combination is low power
consumption resulting in a very small chip size with a small pin count. The
main advantage of CMOS is that it has immunity to noise than other
fabrication techniques.
3.1.6 PIC 16F877A
Various microcontrollers offer different kinds of memories.
EEPROM, EPROM, FLASH etc. are some of the memories in which
FLASH is the most recently developed. Technology that used in PIC
16F877A is flash technology, so that data is retained even when the power is
switched off. Easy Programming and Erasing are other features of PIC
16F877A.
3.1.7 SPECIAL FEATURES OF PIC MICROCONTROLLER
(i) CORE FEATURES
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.
11
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) Up to 256 x 8 bytes of
EEPROM data memory
Interrupt capability (up to 14 internal/external)
Eight level deep hardware stack
Direct, indirect, and relative addressing modes
Power-on Reset (POR)
Power-up Timer (PWRT) and Oscillator Start-up Timer (OST)
Watchdog Timer (WDT) with its own on-chip RC Oscillator for reliable
operation
Programmable code-protection
Low-power, high-speed CMOS EPROM/EEPROM technology
In-Circuit Serial Programming (ICSP) via two pins
In-Circuit Debugging via two pins
Processor read/write access to program memory
Wide operating voltage range: 2.5V to 5.5V
Low-power consumption: 2mA typical @ 5V, 4 MHz
20mA typical @ 3V, 32 kHz
1mA typical standby current
(ii) PERIPHERAL FEATURES
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 register, prescaler and postscaler.
12
Two Capture, Compare, PWM modules, Capture is 16-bit, max resolution is
12.5 ns, Compare is 16-bit, max resolution is 200 ns, PWM max. Resolution
is 10-bit.
10-bit multi-channel Analog-to-Digital converter.
Synchronous Serial Port (SSP) with SPI. (Master Mode) and I2C.
(Master/Slave).
Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI)
with 9- bit address detection.
3.1.8 PIN DIAGRAM OF PIC 16F877A
Fig.3.2 Pin Configuration of PIC 16F877A
14
3.1.10 I/O PORTS
Some pins for these I/O ports are multiplexed with an alternate
function for the peripheral features on the device. In general, when a
peripheral is enabled, that pin may not be used as a general purpose I/O pin.
(i)PORT A AND THE TRISA REGISTER
PORT A is a 6-bit wide bi-directional port. The corresponding data
direction register is TRISA. Setting a TRISA (bit=1) will make the
corresponding PORT A pin an input, i.e., put the corresponding output
driver in a High-impedance mode. Clearing a TRISA (bit=0) will make the
corresponding PORT A pin an output, i.e., put the contents of the output
latch on the selected pin. Reading the PORT A register reads the status of
the pins whereas writing to it will write to the port latch. All write operations
are read-modify-write operations. Therefore a write to a port implies that the
port pins are read; this value is modified, and then written to the port data
latch. Pin RA4 is multiplexed with the Timer0 module clock input to
become the RA4/T0CKI pin. The RA4/T0CKI pin is a Schmitt Trigger input
and an open drain output. All other RA port pins have TTL input levels and
full CMOS output drivers. Other PORT A pins are multiplexed with analog
inputs and analog VREF input. The operation of each pin is selected by
clearing/setting the control bits in the ADCON1 register (A/D Control
Register1).
15
(ii) PORT B AND TRISB REGISTER
PORT B is an 8-bit wide bi-directional port. The corresponding data
direction register is TRISB. Setting a TRISB (bit=1) will make the
corresponding PORT B pin an input, i.e., put the corresponding output driver in
a high-impedance mode. Clearing a TRISB (bit=0) will make the corresponding
PORT B pin an output, i.e., put the contents of the output latch on the selected
pin. Three pins of PORT B are multiplexed with the Low Voltage Programming
function; RB3/PGM, RB6/PGC and RB7/PGD. Each of the PORT B pins has a
weak internal pull-up.
Four of PORT B’s pins, RB7:RB4, have an interrupt on change feature.
Only pins configured as inputs can cause this interrupt to occur (i.e. any
RB7:RB4 pin configured as an output is excluded from the interrupt on change
comparison).
(iii) PORT C AND THE TRISC REGISTER:
PORT C is an 8-bit wide bi-directional port. The corresponding data
direction register is TRISC. Setting a TRISC (bit=1) will make the
corresponding PORT C pin an input, i.e., put the corresponding output driver in
a high-impedance mode. Clearing a TRISC (bit=0) will make the corresponding
PORT C pin an output, i.e., put the contents of the output latch on the selected
pin. PORT C is multiplexed with several peripheral functions. PORTC pins
have Schmitt Trigger input buffers. When the Inter Integrated Circuits module
is enabled, the PORT C (3:4) pins can be configured with normal Inter
Integrated Circuits levels or with SMBUS levels by using the CKE bit
(SSPSTAT <6>). When enabling peripheral functions, care should be taken in
defining TRIS bits for each PORT C pin. Some peripherals override the TRIS
bit to make a pin an output, while other peripherals override the TRIS bit to
16
make a pin an input. Since the TRIS bit override is in effect while the peripheral
is enabled, read-modify write instructions (BSF, BCF, XORWF) with TRISC as
destination should be avoided. The user should refer to the corresponding
peripheral section for the correct TRIS bit settings.
(iv) PORT D AND TRISD REGISTERS
PORT D is an 8-bit port with Schmitt Trigger input buffers. Each pin is
individually configurable as an input or output. PORT D can be configured as
an 8-bit wide microprocessor Port (parallel slave port) by setting control bit
PSPMODE (TRISE<4>). In this mode, the input buffers are TTL.
(v) PORT E AND TRISE REGISTER
PORT E has three pins RE0/RD/AN5, RE1/WR/AN6 and RE2/CS/AN7,
which are individually configurable as inputs or outputs. These pins have
Schmitt Trigger input buffers. The PORT E pins become control inputs for the
microprocessor port when bit PSPMODE (TRISE<4>) is set. In this mode, the
user must make sure that the TRISE<2:0> bits are set (pins are configured as
digital inputs). Ensure ADCON1 is configured for digital I/O. In this mode the
input buffers are TTL.
PORT E pins are multiplexed with analog inputs. When selected as an
analog input, these pins will read as '0's. TRISE controls the direction of the RE
pins, even when they are being used as analog inputs. The user must make sure
to keep the pins configured as inputs when using them as analog inputs.
17
3.1.11 MEMORY ORGANIZATION:
The memory module of the PIC controller has three memory blocks.
Program memory
Data memory
Stack
(i) Program Memory:
The PIC 16F8XX has 4k x14 program memory space (0000H-0FFFH).It
has a 13 bit Program counter(PC) to access any address (213
=4k).
(ii) Data memory:
The data memory of PIC 16F8XX is partitioned into multiple banks
which contain the general purpose registers and the Special function
Registers(SFRs).The bits RP1 and RP0 bits of the status register are used to
select these banks. Each bank extends upto 7FH (128 Bytes).The lower bytes of
the each bank are reserved for the Special Function Registers. Above the SFRs
are general purpose registers implemented as static RAM.
(iii) Stack:
PICs have a hardware call stack, which is used to save return addresses.
The hardware stack is not software accessible on earlier devices, but this
changed with the 18 series devices. Hardware support for a general purpose
parameter stack was lacking in early series, but this greatly improved in the 18
series, making the 18 series architecture supports to high level language
compilers.
18
3.1.12 CPU REGISTERS
The CPU registers are used in the execution of the instruction of the PIC
microcontroller. The PIC16F877AMicrocontroller has the following registers.
Working Register-W (Similar to Accumulator)
Status Register
FSR – File Select Register (Indirect Data memory address pointer)
INDF
Program Counter
(i) Working Register:
Working Register is used by many instructions as the source of an
operand. It also serves as the destination for the result of instruction execution
and it is similar to accumulator in other cs and ps.
(ii) Status Register:
This is an 8-bit register which denotes the status of ALU after any
arithmetic operation and also RESET status and the bank select bits for the data
memory.
7th
bit 0th
bit
Fig no.:3.4 Status Register
C: Carry/borrow bit
DC: Digit carry/borrow bit
Z: Zero bit
19
NOT_PD: Reset Status bit (Power-down mode bit)
NOT_TO: Reset Status bit (time- out bit)
RPO: Register bank Select
(iii) FSR – (File Select Register):
It is the pointer used for indirect addressing. In the indirect addressing
mode the 8-bit register file address is first written into FSR. It is a special
purpose register that serves as an address pointer to any address throughout the
entire register file.
(iv) INDF – (Indirect File):
It is not a physical register addressing but this INDF will cause indirect
addressing. Any instructions using the INDF register actually access the register
pointed to by the FSR.
(v) Program counter:
PIC16F877A has a 13 bit program counter in which PCL is the lower 8-
bits of the PC and PCLATH is the write buffer for the upper 5 bits of the PC.
12th
bit 0th
bit
Fig no.:3.5 Program counter
3.1.13 A/D CONVERTER:
The A/D converter carries out the process of analog to digital conversion.
A/D convertor is a single chip integrated circuit having a single input
connection for the analog signal and multiple pins for digital output. It may
have 8, 12, 16 or even more output pins, each representing an output bits.
20
Higher the numbers of bits will higher the precision of conversion. Each step
represents a change in the analog signal: 8-bits gives 256 steps, 12- bits
provides 4096 steps and we get 32768 steps with 16 output bits. Speed of an
A/D converter is generally expressed as its conversion time, i.e. the time
elapsed between application of a convert command and the availability of data
at its output. The speed of A/D Converter is measured by its settling time for a
full scale digital input change. The PIC 16F877A has an on-chip eight channel
10-bit Analog-to-Digital Converter (ADC) which enables the PIC
microcontroller to communicate with the peripherals which produce its output
asphysical quantity. So the physical quantities can be converted into digital
signals which are suitable for PIC operations by means of ADCs.
21
CHAPTER 4
4.1 ATMEL AT89C51 MICROCONTROLLER
4.1.1 INTRODUCTION
The AT89C51 is a low-power, high –performance CMOS 8-bit
microcomputer with 8Kbytes of Flash Erasable andProgrammable ReadOnly
Memory (EPROM). The device is manufactured using Atmel’s high-density
nonvolatilememory technology and is compatible with the industry-standard
80C51 instruction set and pin out .The on-chip flash allows the program
memory to be reprogrammed in-system or by a conventional
nonvolatilememory programmer. By combining a versatile8-bit CPU with Flash
on a monolithic chip, theAtmel AT89C51is a powerful microcomputer which
provides a highly-flexible and cost- effective solution to many embedded
control applications.
23
4.1.3ARCHITECTURE OF MICROCONTROLLER
(Atmel AT89C51)
Fig no. 4.2:-BlockDiagramof Microcontroller.
24
The AT89C51 provides the following standard features:
1.8KbytesofFlash
2.256 bytes of RAM
3.32 I/O lines
4. Three16-bit timer/counters
5. six-vectortwo-level interrupt architecture
6. Afull-duplex serial port
7. On-chip oscillator, and clock circuitry.
In addition, the AT89C51 is designed with static logic for operation
down to zero frequency and supports two software selectable power saving
modes.The Idle Mode stops the CPU while allowing the
RAM,timer/counters,serial port, and interrupt system to continue
functioning. The Power-down mode saves the RAM contents but freezes the
oscillator, disabling all other chip functions until the next hardware reset.
4.1.4PIN DESCRIPTION
Vcc-Supply voltage (+5V).
Gnd-Ground (0V).
(i) I/O PORTS
Port 0
Port0 is an 8-bit open drain bi-directional I/O port.When 1 iswritten to
port0 pins, the pins can be used as high- impedance inputs. Port 0 can also be
25
configured to be the multiplexed low-order address/ data bus during accesses
to external programdata memory .In this mode, P0 has internal pull-ups.
Port0 also receivesthe code bytesduring Flash programming and outputs the
code bytes during program verification. External pull-ups are required during
program verification.
Port 1
Port1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port1
output buffers can sink/source four TTL inputs. When 1 iswritten to Port1 pins,
they are pulled high by the internal pull-ups and can be used as inputs. As
inputs, Port1 pins that are externally beingpulled low will source
currentbecause of the internal pull-ups. In addition, P1.0 and P1.1 can be
configured to be the timer/counter 2 external countinput(P1.0/T2)and the
timer/counter 2 trigger input (P1.1/T2EX), respectively, as shown in the
following Table-4.1. Port1 also receives the low-order address bytes during
flash programming and verification.
Ports Alternate Functions
P1.0 T2 (external count input to
Timer/Counter2),
P1.1 T2 EX(Timer/Counter2
capture/reload trigger
Table no.:4.1: Port-1 Pins
26
Port2
Port2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port2
output buffers can sink/source four TTL inputs. When 1s are written to Port2
pins, they are pulled high by the internal pull-ups and can be used as inputs .As
inputs, Port2 pins that are externally being pulled low will source current (IIL)
because of the internal pull-ups.
Port2 emits the high-order address byte during fetches from external
program memory and during accesses to external data memory that use16-bit
addresses (MOVX @DPTR). In this application, Port2 uses strong internal
pull-ups when emitting 1s. During accesses to external data memory that use
8-bit addresses (MOVX@RI), Port2 emits the contents of the P2 Special
Function Register. Port2 also receives the high-order address bits and some
control signals during Flash programming and verification.
Port 3
Port3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port3
output buffers can sink/source four TTL inputs. When 1s are written to Port3
pins, they are pulled high by the internal pull-ups and can be used as inputs .As
inputs, Port3 pins that are externally being pulled low will source current
becauseof the pull-ups.
Port3 also serves the functions of various special features of
theAT89C51, as shown in the following Table no-4.2. Port3 also receives
some control signals for Flash programming and verification.
27
Port Pin Alternate Functions
P3.0 RXD(serial input port)
P3.1 TXD(serial output port)
P3.2 INT0(external interrupt 0)
P3.3 INT1(external interrupt 1)
P3.4 T0(timer0 external input)
P3.5 T1(timer1 external input)
P3.6 WR (external data memory write
P3.7 RD(external data memory read
Table no.:4.2 Port3 pins
(ii) RST
Reset input. A high on this pin for two machine cycles while the
oscillator is running resets the device.
(iii) ALE
Address Latch Enable (ALE)is an output pulse for latching the low
byte of the address during accesses to external memory. This pin is also the
program pulse input duringFlash programming. In normal operation, ALE is
emitted data constant rate of 1/6th
oscillator frequency and may be used for
external timing or clockingpurposes. Note, however, that one ALE pulse is
skipped during each access to external data memory. If desired, ALE
operation can be disabled by setting bit0 of SFR location 8EH. With the bit
set, ALE is active only during a MOVX or MOVC
instructionOtherwise;thepin is weakly pulled high.
28
(iv) PSEN
Program Store Enable (PSEN)is the read strobe to external program
memory.Whenthe AT89C51 is executing code from external program
memory, PSEN is activated twice each machine cycle, except that two PSEN
activations are skipped during each access to external data memory.
(v) EA/VPP
External Access Enable.Amust be strapped to GND in order to enable the
device to fetch code from external pro-gram memory locations starting at
0000H up to FFFFH. Note, however, that if lock bit1is programmed, EA will be
internally latched on reset. EA should be strapped to VCC for internal program
executions. This pin also receives the12-volt programming enable voltage
(VPP) during FlashProgramming when12- volt programming is selected.
(vi) XTAL1
Input to the inverting oscillator amplifier and input to the internal
clock operating circuit.
(vii)XTAL2
Output fromthe inverting oscillator amplifier.
4.1.5 SPECIAL FUNCTION REGISTER
(i) Timer 2 Registers
Control and status bits are contained in registers T2CON and
T2MODfor Timer 2.The register pair (RCAP2H,RCAP2L) are the
Capture/Reload registers for Timer2 in 16-bitcapture mode or 16-bit
Auto-reload mode.
29
(ii)Interrupt Registers
The individual interrupt enable bits are in the IE register. Two
priorities can be set for each of the six interrupt sources in the IP register.
Symbol Function
TF2 Timer 2overflow flag set by a Timer2 overflow and must be cleared by
software. EXF2 Timer2 external flag set when either a capture or reload is caused by a
negative transition on T2EX andEXEN2= 1. WhenTimer2 interrupt is
enabled, EXF2= 1will cause the CPU to vector to theTimer2 interrupt
routine.EXF2 must be cleared bysoftware.EXF2 does not cause an interrupt
in up/down counter.
RCLK Receive clock enable.
When set, causes the serial port to use Timer2 overflow pulses for its
receiveclock in serial port Modes1and 3.RCLK= 0causesTimer1
overflow to be used for the receive clock.
Table no.:4.3T2CON-Timer/Counter2ControlRegister
TCLK Transmit clock enable. When set, causes the serial port to useTimer2
overflow pulses for its transmit clock input.
Serial port Modes 1 and 3. TCLK= 0 causes Timer1 overflows to be used for
the transmit clock.
EXEN2 Timer2 external enable. When set, allows a capture or reload to occurs a
result of a negative transition on T2EX.
If Timer2 is not being used to clock the serial port.EXEN2= 0 causes
Timer2 to ignore events atT2EX.
TR2 Start/Stop control for Timer2. TR2= 1starts the timer.
C/T2 Timer or counter select for Timer2. C/T2= 0for timer function .C/T2=
1for external event counter (falling edge triggered).
Table no.:4.4 Timer2 Operating Modes
30
(iii) Data Memory
The AT89C51 implements 256 bytes of on-chip RAM. The upper
128 bytes occupy a parallel address space to the Special Function
Registers. That means the upper 128 bytes have the same addresses as
the SFR space but are physically separate from SFR space. When an
instruction accesses an internal location above address 7FH, the address
mode used in the instruction specifies whether the CPU accesses the
upper 128 bytes of RAM or the SFR space. Instructions that use
directaddressing access SFR space.
For example, the following direct addressing instruction
accessesthe SFR at location0A0H(which is P2).
MOV0A0H, #data
Instructions that use indirect addressing access the upper 128 bytes
of RAM. For example, the following indirect addressing instruction,
where R0 contains0A0H, accesses the data byte at address
0A0H,ratherthan P2 (whose address is 0A0H).
MOV@R0, #data
Note that stackoperations are examples of Indirect addressing,so the
upper128 bytes of data RAM are available as stack space.
(iv) Timer 0 and1
31
Timer 0 functions as either a Timer or event Counter in four modes of
operation. Timer 0 is controlled by the four lower bits of TMOD register and
bits 0,1, 4 and 5 of TCON register .
1. TMOD register selects the method of Timer gating (GATE0),
Timer or Counter operation (T/C0#) and mode of operation (M10
and M00). TCON register provides Timer 0 control functions:
overflow flag (TF0), run control bit (TR0), interrupt flag (IE0)
and interrupt type control bit (IT0).
2. Timer 1 can serve as the Baud Rate Generator for the Serial Port.
Mode 2 is best suited for this purpose.
3. For normal Timer operation (GATE1 = 0), setting TR1 allows
TL1 to be incremented by the selected input. Setting GATE1 and
TR1 allows external pin INT1# to control Timer operation.
4. Timer 1 overflows (count rolls over from all 1s to all 0s) sets the
TF1 flag generating an interrupt request.
5. When Timer 0 is in mode 3, it uses Timer 1’s overflow flag (TF1)
and run control bit (TR1). For this situation, use Timer 1 only for
applications that do not require an interrupt (such as a Baud Rate
Generator for the Serial Port) and switch Timer 1 in and out of
mode 3 to turn it off and on.
6. It is important to stop Timer/Counter before changing mode
(v) Timer 2
Timer2 is a 16-bit Timer/Counter that can operate as either a timer or
an event counter. The type of operation is selected by bit C/T2 in the
SFRT2CON.Timer2 has three operating modes: capture, auto-reload (up or
down counting),andbaud rate generator.
32
Timer2 consists of two8-bit registers, TH2 and TL2.In the Timer
function, the TL2register is incremented every machine cycle. Since a
machine cycle consists of 12 oscillator periods, thecountrate is 1/12 of the
oscillator frequency.
In the Counter function, the register is incremented in response to
a1-to-0 transition at its corresponding external input pin, T2. In this
function, the external input is sampled during S5P2 of every machine cycle.
When the samples show a high in one cycle and a low in the next cycle, the
count is incremented. The new count value appears in the register during
S3P1 of the cycle following the one in which the transition was detected.
Since two machine cycles (24 oscillator periods) are required to recognize a
1-to-0 transition, the maximum count rate is 1/24 of the oscillator
frequency. To ensure that a given level is sampled at least once before it
changes, the level should be held for at least one full machine cycle.
(vi)Capture mode
In the capture mode, twooptions are selected by bit EXEN2 in
T2CON. If EXEN2=0, Timer2 is a 16-bit timer or counter which up on
overflow sets bit TF2 in T2CON. This bit can then be used to generate an
interrupt. IfEXEN2=1,Timer2 performs the same operation, but a 1-to-0
transition at external input T2EX also causes the current value in TH2 and
TL2 to be captured into RCAP2H and RCAP2L , respectively. In addition,
the transition at T2EX causes bit EXF2 in T2CON to be set. The EXF2 bit,
like TF2, can generate an interrupt.
(vii) Autoreload (Up or down mode)
33
Timer2 can be programmed to count up or down when configured
in its 16-bit auto-reload mode. This feature is invoked by the DCEN (Down
Counter Enable) bit located in the SFRT2MOD.Upon reset, the DCEN bit is
set to 0 so that timer2 will default to count up. When DCEN is set, Timer 2
can count up or down, depending on the value of the T2EX pin.
4.2 RF TRANSMITTER / RECEIVER:
The frequency range of RF Transmitter and Receiver varies between
30 KHz & 300 GHz. In this RF system, the digital data is represented as
variations in the amplitude of carrier wave. This type of modulation is
known as Amplitude Shift Keying (ASK).
Transmission through RF is better than IR (Infrared) because of many
reasons. Firstly, the signals through RF can travel through larger distances
making it suitable for long range applications. Also, IR mostly operates in
line-of-sight mode; RF signals can travel even when there is an obstruction
between transmitter & receiver.
Next, RF transmission is more strong and reliable than IR
transmission. RF communication uses a specific frequency unlike IR signals
which are affected by other IR emitting sources.
This RF module comprises of an RF Transmitter and an RF Receiver.
The Transmitter/Receiver pair operates at a frequency of 434 MHz. An RF
transmitter receives serial data and transmits it wirelessly through RF
through its antenna connected at Pin4.
34
The transmission occurs at the rate of 1Kbps - 10Kbps.The
transmitted data is received by an RF receiver operating at the same
frequency as that of the transmitter.
4.2.1 RADIO FREQUENCY OF TRANSMITTER AND
RECEIVER
Fig no.:4.3 RF Transmitter and Receiver Pins
35
4.2.2 RF TRANSMITTER PIN DETAILS:
in No Function Name
1 Ground (0V) Ground
2 Serial data input pin Data
3 Supply voltage; 5V Vcc
4 Antenna output pin ANT
Table no.: 4.5 RF Transmitter Pin Details
The RF module is often used along with a pair of encoder/decoder. The
encoder is used for encoding parallel data for transmission feed while reception
is decoded by a decoder. HT12E-HT12D, HT640-HT648, etc. are some
commonly used encoder/decoder pair ICs.
4.2.3 RF RECEIVER PIN DETAILS:
Pin
No Function Name
1 Ground (0V) Ground
2 Serial data output pin Data
3 Linear output pin; not connected NC
4 Supply voltage; 5V Vcc
5 Supply voltage; 5V Vcc
6 Ground (0V) Ground
7 Ground (0V) Ground
8 Antenna input pin ANT
Table no.: 4.6 RF Receiver Pin Details
36
4.3 IR SENSOR
4.3.1 INTRODUCTION
Infrared (IR) technology is used in variety of wireless applications,
especially in the areas of sensing and remote control. Today’s newest products
such as cell phones, digital cameras, and DVD players as well as remote
controls for every market segment rely on IR sensing and control devices.
4.3.2 OPTICAL SENSORS
To understand infrared technology, the best starting point is the
electromagnetic spectrum. The IR portion of the electromagnetic spectrum is
usually divided into three regions: the near-mid- and far- infrared. Infrared
wavelengths range formed to violet. The frequencies are higher than microwave
but shorter than visible light.
Focusing on near infrared devices and applications, Photo-Optic
technologies are used for optical sensing and optical communications with
numerous general market applications, since light is less complex than RF when
implemented as the signal source. Optical sensors are used in industrial,
consumer and other applications for sensing movement, position, proximity,
ambient light, speed, and direction.
37
4.3.3IR RANGE
Fig no.: 4.7Wavelength Range of IR
Optical wireless communication uses IR data transmission for short range
applications such as computer peripherals and PDAs (personal digital
assistants). For optical communication, a modulated IR light beam transmitted
by an emitter LED is received by a silicon photodiode. Since IR does not
penetrate walls, it does not interfere with other signals in indoor environments.
IR technology is the most commonly used technique for remotely controlling
appliances.
4.3.4 SPECIAL FEATURES OF IR SENSOR:
• High reliability
• High radiant intensity
• Peak wavelength λp=940nm
• Low forward voltage
38
4.3.5 GENERAL APPLICATIONS FOR IR COMPONENT
• Office Automation (OA) equipment such as copiers, fax machines and
printers.
• Vending machines
• Gaming products
• Home entertainment products
• Medical / health care equipment
• Banking terminals such as ATMs
• Testing equipment such as IC/LSI testers, encoders and more.
4.3.6 TYPES OF IR DEVICES
To address the variety of sensing applications, products take advantage of
several IR technologies.
These include:
• IR Emitters
• IR Receivers (sensors)
• Photo interrupters & Photo Reflectors
• Tilt Sensors and
• Remote Control Module Receivers
An IR Emitter is a light emitting diode (LED). Different types of IR
LEDs are specified based on their packaging and special features, such as
39
output optical power, wavelength, and response time.IR Receivers are also
called sensors since they detect the wavelength and spectral radiation of the
light from the IR emitter. IR receivers are specified by optic features,
packaging, special circuitry such as an ambient light filter, wide viewing angle,
and more.
A photo interrupter is a photo sensor that integrates an optical receiver
and emitter in a single U-shaped package. In a transmission type photo
interrupter, the light emitting and detecting elements are placed facing each
other. Shape and size are two of the main differentiating features of a photo
interrupter.
Photo reflectors or reflective type sensors are side by-side emitter-sensor
(photo interrupter) devices that detect reflected beams from a surface. Key
electrical characteristics are transfer gain rate, sensor collector current, IR LED
current, wavelength, and response switching time. Reflective type sensors can
be used in proximity sensing applications.
Fig no.:4.8 Reflective type photo sensors detect light reflected by a target
object.
40
4.4APR33A3 (VOICE RECORDING DEVICE)
The APR33A series are powerful audio processor along with high
performance audio Analog to Digital Converters (ADCs) and Digital to Analog
Converters (DACs). The APR33A series incorporates all the functionality
required to perform demanding audio/voice applications. High quality
audio/voice systems with lower bill-of-material costs can be implemented with
the aPR33A series because of its integrated analog data converters and full suite
of quality-enhancing features such as sample-rate convertor.
The APR33A series C3.1 is Tape mode manages messages sequentially
much like traditional cassette tape recorders. Within tape mode two options
exist such as auto rewind and non-auto rewind. Auto rewind mode configures
the device to automatically rewind to the beginning of the message immediately
following recording or playback of the message. In tape mode, using either
option, messages must be recorded or played back sequentially, like a
traditional cassette tape recorder specially designed for simple key trigger, user
can record and playback the message. This mode provides the power-
management system. Users can let the chip enter power-down mode when it is
unused. It can effectively reduce electric current consuming to 15uA and
increase the using time in any projects powered by batteries.
41
Fi
Fig 4.9:- Diagram of APR33A3 (Voice recording IC)
4.5SPEAKER
Speakers are one of the most common output devices for the audio
outputs. Some speakers are designed to work specifically with computers, while
others can be hooked up to any type of sound system. The purpose of speakers
is to produce audio output that can be heard by the listener.
Speakers are transducers that convert electromagnetic waves into sound
waves. The speakers receive audio input from a device such as a computer or an
audio receiver. This input may be either in analog or digital form. Analog
speakers simply amplify the analog electromagnetic waves into sound waves.
42
Since sound waves are produced in analog form, digital speakers must first
convert the digital input to an analog signal, and then generate the sound waves.
The sound produced by speakers is defined by frequency and amplitude.
The frequency determines the pitch of the sound. A speaker system's ability to
accurately reproduce sound frequencies is a good indicator of how clear the
audio will be. Many speakers include multiple speaker cones for different
frequency ranges, which helps toproduce more accurate sounds for each range.
Two-way speakers typically have a tweeter and a mid-range speaker, while
three-way speakers have a tweeter, mid-range speaker, and subwoofer.
Amplitude, or loudness, is determined by the change in air pressure
created by the speaker sound waves. But the signal produced by some audio
sources is not very high (like a computer sound cards), it may need to be
amplified by the speakers. Therefore, most external computer speakers are
amplified, meaning they use electricity to amplify the signal. Speakers that can
amplify the sound input are often called active speakers. A speaker is active if it
has a volume control or can be plugged into an electrical outlet. Speakers that
don't have any internal amplification are called passive speakers. Since these
speakers don't amplify the audio signal, they require a high level of audio input,
which may be produced by an audio amplifier.
Speakers typically come in pairs, which allow them to produce stereo
sound. This means the left and right speakers transmit audio on two completely
separate channels. By using two speakers, music sounds are more natural since
our ears are used to hearing sounds from the left and right at the same time.
43
4.6 KEYPAD
A keypad is a set of buttons arranged in a block or pad which usually bear
digits, symbols and usually a complete set of alphabetical letters. If it contains
numbers then it can also be called a numeric keypad. Keypads are found on
many alphanumeric keyboards and on other devices such as calculators, push-
button telephones, combination locks, and digital door locks, which require
mainly numeric input.
44
CHAPTER 5
SOFTWARE TOOLS
There are various kinds of software tools are available to program the PIC
microcontroller. The software tools used in this project are:
Embedded C language
MP lab
PIC Kit2 boot loader
5.1 EMBEDDED C LANGUAGE:
The C for microcontrollers and the standard C syntax and semantics are
slightly different from each other. The former is aimed at the general purpose
programming paradigm whereas the latter is for a specific target microcontroller
such as 8051 or PIC. The underlying fact is that everything will be ultimately
mapped into the microcontroller machine code. If a certain feature such as
indirect access to I/O registers is inhibited in the target microcontroller, the
compiler will also restrict the same at higher level. Similarly some C operators
which are meant for general purpose computing are also not available with the
C for microcontrollers. Even theoperators and constructs which may lead to
memory inefficiency are not available in C programming meant for
microcontrollers.
Be aware that the target code should fit in the limited on-chip memory of
the processor. Even the I/O functions available in standard C such as printf() or
scanf() are either not made available in C compilers for microcontrollers or
advised not to use them. These functions eat up lot of memory space and are not
time-efficient owing to the dragging of supporting functions like floating point
routines and lot of delimiters. Another striking difference in case of embedded
systems programs is that they do nothave the umbrella or support of the
45
operating system. The programmer has to be accustomed with the absence of
system calls which makes life easy in traditional C.
5.2 MPLAB
MPLAB is a free integrated development environment for the
development of embedded applications on PIC and dspmicrocontrollers, and is
developed by Microchip Technology. MPLAB X is the latest edition of
MPLAB, and is developed on the net beans platform. MPLAB and MPLAB X
support project management, code editing, debugging and programming of
Microchip 8-bit, 16-bit and 32-bit PIC microcontrollers. MPLAB is designed to
work with MPLAB-certified devices such as the MPLAB ICD 3 and MPLAB
REAL ICE, for programming and debugging PIC microcontrollers using
a personal computer. PIC Kit programmers are also supported by MPLAB .
5.2.1 MPLAB IDE
MPLAB IDE is a software program that runs on a PC to develop
applications for Microchip microcontrollers. It is called an Integrated
Development Environment, or IDE, because it provides a single integrated
environment to develop code for embedded microcontrollers. Experienced
embedded systems designers may want to skip ahead.
MPLAB Integrated Development Environment (IDE) is a comprehensive
editor, project manager and design desktop for application development of
embedded designs using Microchip PICmicro MCUs and dspPIC DSCsof
MPLAB IDE. The basic steps involved are:
MPLAB IDE Features and Installation
Tutorial Overview
Selecting the Device
46
Creating the Project
Setting Up Language Tools
Naming the Project
Adding Files to the Project
Building the Project
Creating Code
Building the Project Again
Testing Code with the Simulator
Tutorial Summary MPLAB IDE Users Guide
5.2.2 MPLAB IDE FEATURES AND INSTALLATION
MPLAB IDE is a Windows Operating System (OS) based Integrated
Development Environment for the PICmicro MCU families and the dsPIC
Digital Signal Controllers. The MPLAB IDE provides the ability to:
Create and edit source code using the built-in editor.
Assemble, compile and link source code.
Debug the executable logic by watching program flow with the built-in
simulator or in real time with in-circuit emulators or in-circuit debuggers.
Make timing measurements with the simulator or emulator.
View variables in Watch windows.
Program firmware into devices with device programmers (for details,
consult the user’s guide for the specific device programmer).
5.2.3 SOFTWARE DEVELOPMENT
In order to create code that is executable by the target PICmicro MCU,
source files are needed to be put into a project. The code can then be built into
47
executable code using selected language tools (assemblers, compilers, linkers,
etc. . All projects will have these basic steps:
1. Select Device
The capabilities of MPLAB IDE vary according to which device is
selected. Device selection should be completed before starting a project.
2. Create Project
MPLAB IDE Project Wizard will be used to create a Project.
3. Select Language Tools
In the Project Wizard the language tools will be selected. For this tutorial,
the Built-in assembler and linker will be used. For other projects, one of the
Microchip compilers or other third party tools might be selected.
4. Put Files in Project
Two files will be put into the project, a template file and a linker script.
Both of these exist in sub-folders within the MPLAB IDE folder. It is easy to
get started using these two files.
5. Create Code
Some code will be added to the template file to send an incrementing
value out an I/O port.
6. Build Project
The project will be built ñ causing the source files to be assembled and
linked into machine code that can run on the selected PICmicro MCU.
7. Test Code with Simulator
Finally, the code will be tested with the simulator
5.3 PIC Kit BOOT LOADER
PIC kit boot loader is a family of programmers for PIC
microcontrollers made by Microchip Technology. They are used to program
and debug microcontrollers, as well as program EEPROM. They provide inter
48
communication between the software tool and the PIC microcontroller. It is
used to burn the program from MPLAB to PIC.
The most notable difference between the two is that the PICkit 2 has a
separate programmer/debugger unit which plugs into the board carrying
the chip to be programmed, whereas the PICkit 1 was a single unit. This
makes it possible to use the programmer with a custom circuit board via
an In Circuit Serial Programming (ICSP) header. This feature is not
intended for so-called "production" programming, however.
The PICkit 2 uses an internal PIC18F2550 with FullSpeed USB. The
latest PIC kit2 firmware allows the user to program and debug most of
the 8 and 16 bit PICmicro and dsPIC members of the Microchip product
line.
The PICkit 2 is open to the public, including its hardware schematic,
firmware source code (in C language) and application programs (in C#
language). End users and third parties can easily modify both the
hardware and software for enhanced features. E.g. GNU/Linux version of
PIC kit2 application software, DOS style CMD support, etc.
The PICkit 2 has a programmer-to-go (PTG) feature, which can
download the hex file and programming instructions into on-board
memory (128K byte I2C EEPROM or 256K byte I2C EEPROM), so that
no PC is required at the end application.
The Microchip version of PICkit 2 has a standard 128K byte memory.
256K byte memory can be achieved by modifying the hardware or from
third party.
Additionally, a 500 kHz three-channel logic analyzer and a UART tool
are built into the PICkit 2.
49
CHAPTER 6
WORKING MODULE
When the user gives input by pressing the button in the keypad, the Radio
frequency receiver couples with the transmitter and APR33A3 which is sound
recording device guides the user with the direction. On reaching the destination
IR transmitter and receiver attains the line of sight path. This indicates that the
destination is reached through the speaker.
51
CHAPTER 7
CONCLUSION AND FUTURE WORK
Thus the blind navigation using RFID for indoor environment helps the
blind people for direction guidance. Using this destination can be reached safely
by the blind people. Andthis system must be a worthwhile investment for blind
users in terms of cost of equipment and time invested in learning to use
it.Depending on the wide deployment of Radio Frequency for the system, or at
least consistent deployment within a particular area.
The future scope to implement this system as easily portable with the
hand stick. Then the direction commands are guided through Bluetooth device,
earphone, this portability helps the blind person to feel at ease and easy to
handle.IR sensor is used in the hand-stick for the obstacle detection. And also
by using GPRS, this system can be implemented in outdoor environment.
52
CHAPTER 8
REFERENCE
[1] KushagraTandon and TanujaPande, “A Blind Navigation System Using
RFID for Indoor Environment:” International Journal of Computer Systems,
Volume 2– Issue 4, April, 2015
[2] S. Willis and S. Helal, “RFID information grid for blind navigation and
way finding,” in Proceedings of the 2005 Ninth IEEE International Symposium
on Wearable Computers, 2005
[3] Arjun Sharma, Rahul Patidar, ShubhamMandovara, “Blind Audio
Guidance System”(Blind Navigation) International Journal of Emerging
Technology and Advanced Engineering, Volume 3, Special Issue 2, January
2013)
[4] F. Gaunet and X. Briffault, “Exploring the functional specifications of a
localized wayfinding verbal aid for blind pedestrians: simple and structured
urban areas,” Human Computer Interaction, vol. 20, no. 3, pp. 267–314, 2005.
[5] Programming and customizing with PIC microcontrollers-by, MykePredko,
3rd
edition, publisher: Tata McGraw Hil.
[6] PIC microcontrollers-by, Milan Verle, publisher: micro electronika
[7] Basic programming in PIC microcontrollers-by, Milan Verle, publisher:
micro electronika.
[8] http:\\www.microchip.com
[9] www.mdpi.com
[10]www.sciencedirect.com