report of telephone directory project

May 6, 2017 | Author: simorge | Category: N/A
Share Embed Donate


Short Description

a report of electronic telephone directory...

Description

CHAPTER 1 INTRODUCTION 1.1Background A telephone directory (also called a telephone book and phone book) is a listing of telephone subscribers in a geographical area or subscribers to services provided by the organization that publishes the directory. It consists of the name as well as the telephone number of people added as contact in the directory. Name and telephone number are displayed in alphabetical order. 1.2 Objectives We are determined to design a system which is intended in saving name and number of desired persons. The main objective of telephone directory is to add, search, edit and delete various contacts. 1.3

Applications Telephone directory has been frequently in use in our daily life. We commonly see telephone directory installed in PSTN telephone sets, mobile phone etc. Telephone Directory application provides the ability to search, view, and manage entries in a directory. Mobile Directory application should allow any subscriber with any type of mobile device that supports GPRS to instantly search telephone contact number of any individual . The search result data loads directly to the mobile screen and gives the user option to CALL, SAVE, VIEW, SEND TO FRND or DISCARD. Mobile Directory eliminates the need to call any other call center.

1.4 Overview of Project The report is organized in six chapters; each dedicated to explaining the project in easier way. Although detailed information is not provided due to security reasons of the project and its replication protection, but the chapters are brief enough to convey the work done. In the first chapter, a brief introduction of the project is presented. The second chapter deals with the system description of the project where we have describe the block diagram of the project and hardware and software portion of the project. In the third chapter, we have described the detail information of project where function of each hardware components and software portion is described. Fourth chapter deals with observation. Fifth chapter deals with limitation and further implementation of project. And finally chapter six gives conclusion to the project.

1

CHAPTER 2 SYSTEM DESCRIPTION The main aim of the project is to create a directory that is able to provide the ability to search, view, and manage entries in a directory about various individuals.

2.1 Block Diagram

The basic block diagram of the project which shows how ‘Telephone Directory’ works is shown below.

Keypad

LCD

MICROCONTROLLER

EEPROM

Fig 2.1 Block Diagram

2.2 Description of the block diagram

The above block diagram describes the project architecture. From the block diagram we can understand the flow of the system. As shown above first of all number and name are entered via keypad .These data are displayed regularly in the lcd connected to a port of microcontroller.These contact of the individual can be stored in the external memory (EEPROM). As further these records can be further manipulated by 2

retrieving them from the EEPROM. These contacts can be edited, deleted, also searched as required by the user . There are mainly two parts in the block diagram. a. Software part b. Hardware part

2.2.1Software part

Software enables us to perform specific tasks. Software is a tool that interfaces with hardware and implements the user specifications. For interfacing between microcontroller and LCD, microcontroller and Keypad and EEPROM various software tools are used. The software tools used are as follows: a. C-programming b. SDCC c. EZ-Downloader d. Top view simulator e. Proteus a. C-programming The C programming is a popular and widely used high level programming language for creating computer programs. Programmers around the world embrace C because it gives maximum control and efficiency to the programmer. b. SDCC SDCC(Small Device C compiler) is an open source, re-target table, optimizing ANSI-C compiler designed for 8 bit microcontroller. The current version targets INTEL MCS51 based microcontroller (8051,8052 etc), Zilog Z80 based MCUs and various other microcontroller family. SDCC has extensive language extensions suitable for utilizing various microcontrollers and underlying hardware effectively. SDCC is not just a compiler, but a collection of tools by various developers. These include linker, assemblers, simulators and other components. Among those various components, SDCC-the compiler, and packihx are the two components used while developing program. c.

EZ-Downloader EZ-Downloader is software capable of writing Intel –HEX file to an 89Cxx Family. 3

d.

Top View simulator After writing the program, it is tested in a simulator. If its output is correct, it is burnt in microcontroller using the burner.

e.

Proteus Proteus is mainly used in simulation, a simple model of ckt was created and with particular program it was loaded to view output.

2.2.2Hardware part The hardware parts of the project includes a. Microcontroller b.LCD display c. EEPROM d.Keypad 2.3 Basic Components It is important to get acquainted with the integral components and its purpose that is used in this project before going through the project details. The list of the major components that are used are as follows: 2.3.1 Hex Keypad Keypads are a part of Human Machine Interface and play really important role in a small embedded system where human interaction or human input is needed. Matrix keypads are well known for their simple architecture and ease of interfacing with any microcontroller. There are many methods depending on how we connect our keypad with our controller, but the basic logic is same i.e. we make the columns as input and we drive the rows making them output, this whole procedure of reading the keyboard is called scanning. The keypad we are using here is organized in a matrix of rows and columns. We are using 4x4 matrix keypad consisting of 16 keys which are connected to the two ports of microcontroller. 4 pins of port 3 are connected to the rows and 4 pins of port 0 are connected to the column of keypad. To determine the pressed key, both the ports are initially set to logic 1. Then the pin connected to the first row of the keypad is set to logic 0 and then scans the output from the entire column. In the process of scanning, it checks whether any of the outputs from the column is 0 if non of them are 0 then it sets the first row back to logic 1 and second row to logic 0. Then similar process of scanning continues until any of the output from the column is 0. When any of the output from the column is 0, it is first complimented and then multiplied with the corresponding key position. In this way we can identify which key has been pressed.

4

Fig 2.3.1 4X4 Hex Keypad 2.3.2 Microcontroller (AT89c51) 2.3.2.1 Description The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K Bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 and 80C52 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C52 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. 2.3.2.2 Features The AT89C51 microcontroller provides the following standard features: 1. 4KB of Flash memory 2. 128 bytes of RAM 3. 32 I/O lines with two 16-bit timer/counters 4. Five vector two-level interrupt architecture 5. Full duplex serial port 6. 0n-chip oscillator and clock circuitry. 2.3.2.3 Pin Description Pins 1-8: Pins 1 through 8 are the pins of port 1. Port 1 is a dedicated I/O port, so these pins are available for interfacing external devices as required. No alternative function is assigned to these pins. 5

Pin 9: Pin number 9 is the system RESET (RST) of CPU of AT89C52. Holding RST high for at least two machine cycles and then returning it low reset AT89C52. The reset may be manually activated using a switch, or may be activated upon power-up using RC network. After a system reset, Program counter is loaded pins are multifunctional with each having an alternate purpose related to special features. with 0000H. When RST returns low, program execution begins at first location in code memory at address 0000H

. Fig 2.3.2.3 Pin configuration of 89c51

Pins 10-17: Pins numbers 10 through 17 constitute port 3 that is a dual-purpose port. As well as general purpose I/O, these Pins 18-19: Pins numbers 18 and 19 comprise the inputs of crystal to be connected to the on-chip oscillator of AT89C52. Two stabilizing capacitors of 33 pf each are also required. Pin 20: It is the common ground of 89C51 and accompanying networks. Pins 21-28: Pins 21 through 28 are of port 2. Port 2 is also a dual purpose port. It can serve as a general purpose I/O port or as the high byte of the address bus for designs with external code memory of more than 128 bytes of data memory.

Pin 29 and Pin 31: These pins are used in conjunction with external code memory being used or else. On pin number 29 is control signal PSEN # (Program Store Enable) that enables external code (Program) memory. It is usually connected to EPROM’s. Output Enable (OE#) pin to permit reading of program bytes. Pin 31 i.e. EA# (External Access) is either tied high (+5V) or low (ground). If high, the C52 executes programs from internal ROM otherwise from external code memory (and then PSEN# comes into play).] 6

Pins 32-39 and Pin 30: Pins 32 through 39 make up port 0. Port 0, in addition to being used as an I/O port, has the capacity to act as multiplexed data and address bus. The discrimination of data and address is provided through ALE (Address Latch Enable) that is pin number 30. 2.3.3 Biasing ckt

Fig 2.3. 4 Biasing circuit for 8051

2.3.3.1 Crystal Oscillator A crystal oscillator is an electronic circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time, to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters, Phase Modulators, and receivers. The most common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits designed around them were called "crystal oscillators". The function of the crystal oscillator circuit is to provide an accurate and stable periodic clock signal to a micro-controller. The frequency of this clock signal range from a KHz to tens of MHz and determines how quickly the micro-controller executes in instructions.

7

2.3.4 Liquid Crystal Display(LCD) Introduction LCD is a Liquid Crystal Display. A LCD is a thin, flat panel used for electronically displaying information such as text, images, and moving pictures. Its uses include monitors for computers, televisions, instrument panels, and other devices ranging from aircraft cockpit displays, to every-day consumer devices such as video players, gaming devices, clocks, watches, calculators, and telephones. Among its major features are its lightweight construction, its portability, and its ability to be produced in much larger screen sizes than are practical for the construction of cathode ray tube (CRT) display technology. Its low electrical power consumption LCD modules are available in a wide range like 8x1, 8x2, 16x1, 16x2, 20x2, 20x4, 40x4. In our project we have used 16x2- that means 2 rows of 16 characters. It has 16 pins including 2 pins for backlight. The most commonly used LCDs found in the market today are 1 Line, 2 Line or 4 Line LCDs which have only 1 controller and support at most of 80 characters, whereas LCDs supporting more than 80 characters make use of 2 HD44780 controllers. Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two pins are extra in both for back-light LED connections

Fig 2.3.4 LCD Pin Description VSS Ground VCC Power supply with + 5 volt VEE Contrast adjust RS, register select There are two very important registers inside the LCD. The RS pin is used for their selection as follows. If RS =0, then the instruction command code register is selected, allowing the user to send a command such as clear display, cursor home, etc. If RS=1, then the data register is selected, allowing the user to send data to be displayed on the LCD. R/W, read/write R/W input allows the user to write information to the LCD or read information from it. R/W=1 when reading; R/W=0 when writing. E, enable The enable pin is used by the LCD to latch information presented to its data pins. When data is supplied to data pins, a high-to-low pulse must be applied to this pin in order for the LCD to latch in the data present at data pins. This pulse must be a minimum of 450 ns wide.

8

D0-D7 The 8-bit data pins, D0-D7, are used to send information to the LCD or read the contents of the LCD’s internal registers. To display letters and numbers, we send ASCII codes for the letters A-Z, a-z, and numbers 0-9 to these pins while making RS=1. There are also instruction command codes that can be sent to the LCD to clear the display or force the cursor to the home position. We also use RS=0 to check the busy flag bit to see if the LCD is ready to receive information. This busy flag is D7 and can be read when R/W=1 and RS=0, as follows: if R/W=1, RS=0. When D7=1(busy flag=1), the LCD is busy taking care of internal operations and will not accept any new information. When D7=0, the LCD is ready to receive new information.

Table of LCD pin Pin

Function

1

Ground

2

VCC

3

Contrast

4

RS

5

RW

6

E

7

D0

8

D1

9

D2

10

D3

11

D4

12

D5

13

D6

14

D7

15

Backlight Ground

16

Backlight VCC

Table 2.1

2.3.5 EEPROM EEPROM (electrically erasable programmable read-only memory) is user-modifiable read-only memory (ROM) that can be erased and reprogrammed (written to) repeatedly through the application of higher than normal electrical voltage. Unlike EPROM chips, EEPROMs do not need to be removed from the computer to be modified. However, an EEPROM chip has to be erased and reprogrammed in its entirety, not selectively. It also has a limited life - that is, the number of times it can be reprogrammed is limited to tens or hundreds of thousands of times. In an EEPROM that is frequently reprogrammed while the computer is in use, the life of the EEPROM can be an important design consideration.

9

2.3.5.1 Features of AT24C16 • Low-voltage and Standard-voltage Operation – 2.7 (VCC = 2.7V to 5.5V) • Internally Organized 2048 x 8 (16K) • Two-wire Serial Interface • Schmitt Trigger, Filtered Inputs for Noise Suppression • Bidirectional Data Transfer Protocol • 400 kHz (2.7V, 5V) Compatibility • Write Protect Pin for Hardware Data Protection • 16-byte Page Write Modes • Partial Page Writes Allowed • Self-timed Write Cycle (5 ms max) • High-reliability – Endurance: 1 Million Write Cycles – Data Retention: 100 Years

2.3.5.2 Description The AT24C16 provides 16384 bits of serial electrically erasable and programmable read-only memory (EEPROM) organized as 2048 words of 8 bits each. The device is optimized for use in many industrial and commercial applications where low-power and low-voltage operation are essential. The AT24C16A is available in space-saving 8-leadPDIP, 8-lead JEDEC SOIC, 8-lead Ultra Thin Mini-MAP (MLP 2x3), 5-lead SOT23 (AT24C01A/AT24C02/AT24C04), 8-lead TSSOP, and 8-ball dBGA2 packages and is accessed via a Two-wire serial interface. In addition, the entire family is available in 2.7V (2.7V to 5.5V) and 1.8V (1.8V to 5.5V) versions.

Fig 2.3.5.2 pins of EEPROM 2.3.5.3 Pin Description SERIAL CLOCK (SCL): The SCL input is used to positive edge clock data into each EEPROM device and negative edge clock data out of each device. SERIAL DATA (SDA): The SDA pin is bidirectional for serial data transfer. This pin is open-drain driven and may be wired with any number of other open-drain or open collector devices. DEVICE/PAGE ADDRESSES (A2, A1, A0): The A2, A1 and A0 pins are device address inputs that are hard wired for the AT24C01A and the AT24C02. As many as eight 1K/2K devices may be addressed on a single bus system .The AT24C16A does not use the device address pins, which limits the number of devices on a single bus to one. The A0, A1 and A2 pins are no connects and can be connected to ground. WRITE PROTECT (WP): The AT24C16A has a Write Protect pin that provides hardware data protection. The Write Protect pin allows normal Read/Write operations when connected to ground (GND). When the Write Protect pin is connected to Vcc write protection operation is enabled. 10

2.3.6 MICROCONTROLLER (AT89C55) 2.3.6.1 DESCRIPTION The AT89C55 is a low-power, high-performance CMOS 8-bit microcomputer with 20K Bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel’s high-density nonvolatile memory 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 nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C55 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. 2.3.6.2Features It is a 20K bytes of In-System Reprogrammable Flash Memory. It has endurance of 1000 write/erase cycles. It has three level program memory lock. It has 256x8 bit internal RAM. It has 32 programmable I/O lines and three 16 bit timer/counters. It has eight interrupt sources. It has low power Idle and power down modes.

Fig 2.3.6.2: Microcontroller Interfacing with other Components 2.3.6.3PIN DESCRIPTION

Fig 2.3.6.3: AT89C55 11

CHAPTER 3 WORKING PRINCIPLE The basic working principle includes circuit detail and programming overview. The operating principle is accompanied with microcontroller, keypad, LCD and External memory interface. 3.1 Circuit Detail 3.1.1 Microcontroller Board: The microcontroller board consists of one crystal oscillator whose function is to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time, to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters. This oscillator is connected to 18 and 19 no. pin of microcontroller. The two capacitors of 30 pF are connected across the oscillator and another capacitor of 10microF is connected to Vcc. The main function of the capacitor is to charge or discharge electricity .The resistor of 8.2Kohm is placed between 10microF capacitor and the ground. A resistor can be defined by applying a potential difference V between those points and taking ratio of the measuring current I. Similarly, the reset switch is connected to 9 no. pin and between resistor and ground. The reset button is a simple normally-open switch .When the button is pressed, the switch is closed. When it is released, the system performs a hardware reset. 3.1.2 Keypad and LCD Interfacing To scan the keypad completely, we need to make rows low one by one and read the columns. If any of the buttons is pressed in a row, it will take the corresponding column to a low state which tells us that a key is pressed in that row. If button 1 of a row is pressed then Column 1 will become low, if button 2 then column2 and so on. Each button of Keypad is assigned with various functions. We have assigned keys with alphabets and number. Some keys have been allocated for special function like menu, delete, back. When these keys are pressed various special functions such as add, edit, search etc has been generated with certain functions in programming. When contact has to be added we insert name as well as number using keypad. Keypad is connected to P2 through which input is given to microcontroller. These datas are concurrently displayed in the LCD. LCD is connected to P1 and P3, which serves as output device. First of all LCD is initialized with following control codes as shown in the table. When data bus of LCD is provided with 8-bit data then certain output is generated.

12

Table 3.1: The Command Control Codes Command Clear display Display and Cursor Character entry mode Display on/off and cursor Display/ cursor shift Function set Set CGRAM address Set display address

Hexadecimal code 01 02-03 04-07 08-0F 10-1F 20-3F 40-7F 80-FF

3.1.3 EEPROM 3.1.3.1 Device Operation Clock: The SDA pin is normally pulled high with an external device. Data on the SDA pin may change only during SCL low time periods. Data changes during SCL high periods will indicate a start or stop condition as defined below. Start : A high-to-low transition of SDA with SCL high is a start condition which must precede any other command. Stop: A low-to-high transition of SDA with SCL high is a stop condition. After a read sequence, the stop command will place the EEPROM in a standby power Mode. Acknowledge: All addresses and data words are serially transmitted to and from the EEPROM in 8bit words. The EEPROM sends a zero to acknowledge that it has received each word. This happens during the ninth clock cycle.

13

3.1.3.2 Write Cycle

Fig Data validity

Fig Start and stop condition

Fig Acknowledge Fig 3.1.3.2 Write Cycle Waveform 14

3.1.3.3 Write Operations A write operation requires an 8-bit data word address following the device address word and acknowledgment. Upon receipt of this address, the EEPROM will again respond with a zero and then clock in the first 8-bit data word. Following receipt of the 8-bit data word, the EEPROM will output a zero and the addressing device, such as a microcontroller, must terminate the write sequence with a stop condition. At this time the EEPROM enters an internally timed write cycle, twr, to the nonvolatile memory. All inputs are disabled during this write cycle and the EEPROM will not respond until the write is complete.

Fig 3.1.3.3 Device Address

Fig 3.1.3.3 write Operation 3.1.3.4. Read Operations Read operations are initiated the same way as write operations with the exception that the read/write select bit in the device address word is set to one.

15

Fig 3.1.3.4 Read Operation

Fig 3.1.3.4.1 Interfacing EEPROM with 8051

3.1.4 Flowchart section

16

17

CHAPTER 4 RESULT and DISCUSSION

4.1 DESCRIPTION OF FINDING Working in this project led us to many findings which initially we were unaware of. We not only got chance to implement our theoretical knowledge into practical but also got opportunity to learn new programming languages. This project has helped us to enhance our knowledge about electronics components, software development and wireless communication. Working in LCD we found out that to display alphanumeric value in LCD we can either use LCD table which provides us hex. code corresponding to the data that is to be displayed or we can use ASCII value of that data. While interfacing Keypad with Microcontroller we found out that same port must be used for both column and rows. While interfacing of EEPROM addressing is the key factor and using proper delay is very essential for output generation.

4.2 Limitations This project on “TELEPHONE DIRECTORY” has following limitations •

Delay in pressing the keys cannot be achieved perfectly.



EDIT option in this project could not be implemented.



Memory management is a great drawback.



This unit is having problem when back button is pressed.

4.3 Problem Occurred During Programming •

If we don’t use the same port for key pad entry then problem occurred…



While storing the flipped char in the array name[rr] all the flipped characters were also stored so a new name1[tt] array was made and the last value stored in name[rr] after each case was stored..eg..a,b,c was pressed then another button pressed then at (!=)case values was interchanged..



Problem occurred when tried to break out of while loop



Calculation of particular delay was difficult. 18

During Hardware Testing • • • •

Cables created were very fragile and ultimately we used glue stick to fix it. Zip Socket is troubled us with it’s pin holdings. Problem in Voltage regulation for microcontroller was fetched. Interfacing of EEPROM was a great challenge.

4.4 Further Implementation This architecture is a basic backbone for other electronics projects. •

The concept of “Telephone Directory “can be implemented with interfacing of MMC cards using SPI (Serial Peripheral Interface). • This architecture can be used in systems such as 1. Password Based door lock 2. Restaurant Automation System This architecture can be implemented in all systems that uses input as Keypad and Output as LCD.

19

CHAPTER 5 CONCLUSION The aim of this project was to build an Telephone directory through which allowed to add, search, delete contacts of individual and access to external memory device. At the completion of this project we are able to add, search and delete contacts hence the project is completed successfully. A approximate model of Telephone Directory was assembled using keypad, lcd, microcontroller and EEPROM.

20

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF