Calculator Uses And Applications Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Calculator is one of the most commonly necessary tools at work, home, and school. However, visually impaired people may face some difficulty to gain the benefit out of it, and also the small kids who want to learn math through fun. So, the proposed design will drive their motivation The existing talking calculator has few limitations such as English language operation, need of PC with talking calculator software and unclear voice results. In my project, I have studied different types of microcomputers, non-volatile memories, digital voice coding, decoding, power amplifiers and communication standards.

ATMEL AVR microcontroller for project design is used, as RISC architectural (Reduced Instruction Set Computer) advantage of AVR will be more effective than HCS12 which has limited memory space usage in CodeWarrior software. Most popular open source software WinAVR C compiler for building the process of the source code and AVR studio for debugging is used.

To generate the digital voices to program EEPROM, Three software is used. First, the voice was record one by one by using windows sound recorder and it was saved as a wav file format for coding purpose. Then it was converted from the wav files to ASM files by using RC speech coder software which is convert the voice data into PCM (Pulse Code Modulation) data output format .

Talking calculator may has a key stroke to allow the user to operate with/without voice, when voice is activated, there is an option to switch over between English or Arabic. Upon every key stroke, the appropriate digital voice signal was retrieved from EEPROM, decoded using appropriate decoding method. The reconstructed voice is very weak, so the audio amplifier is used to amplify the signal. The matrix keypad interfaced through timer interrupt to avoid key debouncing. All the entries are made through the keypad and buttons in this calculator are smooth which offer no tactile clues to allow person with visual impairment to route him or herself to the keypad. The input and computed results are also displayed in 16X2 LCD.

Introduction

Project background:

This project is focused on developing the current calculator that is using in different science application. Nowadays calculator is to perform a variety of different mathematical operations without any auditory feedback. The problem comes when people with disabilities may face some difficulties to exploit all these benefits due to lack of tools to help them, and also the small kids who want to learn math through fun. But if I can solve this problem, I can make the human life a bite easier for both blind disabilities people and also small kids.

The focus of this project is to design and develop the current talking calculator to a new calculator which can be operated with auditory bilingual voices feedback Arabic and English languages to provide some sounds to allow visual impairment people to hear results. However, visual impairment people are often unable to press individual buttons accurately so, the buttons of this talking calculator will be smooth and very easy to allow their to route themselves to the keypad.

The first problem I need to clear in this project is to study various types of microcontrollers with all characteristics and aspects that they has to decide which type of it will be suitable for my project. The second problem need to be clear is how I can generate digital voices upon each key stroke of calculator, and design a key control stroke to allow the user to operate with/without voice. The final problem I need to clear it is to make talking calculator in small size, simple configuration, and very friendly to use compared to the old talking calculators. For all this to operate it together, I need to choose appropriate components with the specific rating current and voltage that is suitable to operate together and then start implementing and designing the proper circuit that connect all the system.

1.2 Main objectives:

To study various types of microcontrollers.

To study about microcontroller programming tools.

To design Talking calculator using suitable microcontroller.

To implement the design in real time.

Critically compare various voice synthesizers and implement it on the chip.

To design bilingual Talking Calculator (English and Arabic).

1.3 Scope of project:

To develop the currently Talking calculator (TC) into a new TC by implementing it with a single microcontroller chip, and Low power consumption which is approximately 5 v.

The new TC has a combination of visual display (LCD) and bilingual auditory feedback (English and Arabic).

The new TC calculator has portability which is easy to carry and use.

This project will also facilitate special Arab speaking nationals to facilitate and enjoy the outcome of science and modern technology.

1.4. Literature review

Talking calculator (TC) is a calculator is an electronic device which is common in every place. It is deal with the real number of simple precision, and upon each stroke of key is produce an auditory feedback. It is used to perform basic simple operations.

The working principle of talking calculator is as follows. The user hits the key stroke of the calculator. As a result, an analogue signal will be generated from the keypad which will go through microcontroller to read it. Next, after the analogue signal reaches the microcontroller, then, the microcontroller will perform multitasking process. First, it will perform the mathematical operation required and it will send it to the LCD to show it. Second, it will take the related voice from the digital voice memory, it will amplify it by using audio amplifier, and it will produce it out to the user by the loudspeaker.

However, TC was firstly introduced in 1998 by three persons which are Ryan Fransen, Robin Foster, and John Wright. It is designed to be interfaced with the PC via RS232 serial port. The working principle is the module send all the entering data through keypad to the PC through serial cable port. Then, the software running on the PC to perform the mathematical calculations. Finally the result is returns to the module and operate the voice.

The old TC should be operated as an integral form with different software installed in DOS system PC computer which is responsible to perform the calculation process the user entered via keypad as shown in figure below:

DOS

PC

RS-232

PIC 54

PIC84

VOIC PROCESSOR

Keypad

Figure 1.1. Block diagram of talking calculator

As shown in figure above this talking calculator consists of different components, and each components has its own function like, Power switch which is used to turn calculator "on" or "off", the keyboard which is the main input device in the calculator, it is use to enter the desired function. Also, it has echo mode switch that allow the user to press any key and hear what that key is represents without distributing the current calculation. The value of the sound can be controlled by the volume control. Moreover, there are two microcontrollers has been used in this circuit which are PIC 54 that using for controlling the input data from the keypad, and the output data to the PC. Also PIC 84 microcontroller that is used for receiving and translating data from the PC. Further, it is used to control the voice circuit . Finally, there is a serial port connector that is RS232 cable to make a connection between the keypad and PC through COM2 port {1}.

The principle of working of this TC is as follows. First, the user enter numbers through the keypad. Then, the PC is received the data via RS 232 serial port. When the data is available in the PC, the "infix" software which is installed in the PC is responsible to perform the calculation of the data. Next, the result is stored in stack memory until the user pressed "equal" key. When the user hit the "equal" key, the data which is available in stack is converted to array of characters and it is nourished through the LCD display of calculator combining with the voice.

However, this TC was characterized with various advantages which are:

As the PC is responsible to do calculation through high infix software, so it can handle complex equations.

It can handle a multiple equations at the same time.

As the PIC 84 is responsible of the voice, so the value of the voice can be increased or decreased to specific amount.

As the PC store the data in stack memory, so it is able to store more data result in it.

The infix software is able to do an error checking in every data are received. Also it is able to calculate multi digit floating point number at the same scientific functions.

When any number divide by zero, the software is trapped at this stage, and is not fed any result data into the calculator.

Also there are different disadvantages of this design which was introduced when I evaluated all the components, features, aspects it is included:

As this calculator is fully rely to the pc software to perform the calculation, so it will be more costly, and useless.

The power consumption of this calculator is very high.

The user of this talking calculator is restricted to the people who has background information about PC computer,

The size of it is very large, and it has very complex configuration.

The "infix" software is only work in DOS windows system.

During the early research that have been done and the directive guidelines from various articles, it defines that the development of TC is focused only to develop a better device and not to improve the system of it because there are no articles that give the idea how to add the function and system to this TC. Until today what the article states is the process, types and function of each component included in it. So it is important to struggle and integrate all knowledge which gained and collected from different resources to design and develop something new for this device.

1.5 Dissertation Outline

This dissertation contains (**) chapters, and each chapter has its own purposes and targets. After considering the entire chapter in this dissertation, hopefully the reader and viewer can understand the whole system design for this project.

Chapter 1 describe on the background information of the project, objectives which I going to achieve it, scope of the project and the literature review that referred to the basic history about TC, basic components with the block diagram, and the different advantages and disadvantages that design characterized.

Chapter 2 is focused to the theory of talking calculator (TC), the importance or advantages, disadvantages, and where it described about problems they have it nowadays.

Chapter 2

Talking Calculator (TC)

2.1 introduction:

Calculator is an electronic device which is used to manipulate different mathematical operation. It is one of the most commonly required tools at different places such as home, work, and school. The Buttons on most calculators are smooth, and offer few or no tactile clues to allow a person with a visual impairment to directing him or herself to the keypad. People with visual impairments may not be able to see the proper buttons. Sometimes, some keypad in some calculator are made in brail language to allow them to differentiate between buttons easily. However, the modern calculators generally have an LCD which is made as an output screen, but the character size is generally small and there are often difficult to see it. Also the contrast between the numerals and the background is so low. So people with visual impairments are often unable to touch the individual buttons accurately on compact calculators with small buttons.{2}

Unfortunately, people with disabilities may have difficulties for using like this standard calculators. As a result different voices synthesis is uses to make calculator with auditory feedback to help the visual impairments to learn mathematics easily without any difficulties. In April 1991, Auburn University established a service program for students with visual impairments disabilities. The university gave different courses for that students in basic mathematical operation and how they can use the talking calculator to solve any mathematical activities may face it. As a result, talking calculator overcome different problems the visual impairments may have it in learning mathematics. Also, they motivate them to continue their progress in learning and developing themselves.{3}

However, this chapter describe some detail about TC and about the basic operation so it will allow the reader to get a clear idea how the TC is working. Also it is provide different information from different articles and resources about the importance of it for the visual impairments students.

The objectives of this chapter are:

To know more about the TC and the basic components of it.

To understand the importance of it for the visual impairments students and small kids.

To evaluate the most disadvantages and weakness the talking calculator agony from.

2.1. The importance of Talking calculator:

talking calculator has different importance for visual impairments students, and for the small kids who want to learn mathematics through fun, and these benefits or importance are:

It has synthesized voice which provide an auditory feedback to the user to identify and differentiate between input buttons and to ensure the result before transfer it to the paper. "talking calculator has a built-in speech synthesizer that reads each number, and operation when the user press any key; it also vocalizes the answer to the mathematical operation. This auditory feedback may help him/or her to check the accuracy of the keys he / she presses and verify the answer before he / she write it in the answer sheet".{4}

It is allow the visual impairments students to study the brail languages because most of the modern calculator has a large push buttons designed in brail language.

It is immigrate the visual impairments students from mechanical calculator which is abacus to the electronic device which is talking calculator that include various concepts used in abacus {5}

Hearing the calculated answer from the calculator may help some of the people with Dyslexia or Dyscalculia to spell the number correctly and know how to solve different mathematical operation. "it is very important and a appropriate tool for students with Dyscalculia. The synthesized voice output of a talking calculator is the main advantage which provides feedback to the user that helps them to identify any input errors may occurs. Additionally, hearing the calculated answer from the calculator can provide a check against the transposition of numbers commonly reversed in reading by people with Dyslexia or Dyscalculia. {6}

Unfortunately, as the talking calculator has different advantages and importance which is discussed in above session, it is also has some disadvantages which are:

By using talking calculator, the student will lack the problem solving skills, because he / she the result directly from it. As Sewoll (2004) said "With a calculator the student just typing buttons. They don't have to do anything more, and unfortunately they don't even know the steps."{7}

A deaf blind students lack the ability to hear the auditory feedback from the talking calculator.{8}

If it uses in classroom setting with the voice switch is enable, it will be distracting for others.{9}

2.2 problem nowadays in TC.

TC is a wonderful and an appropriate tools for the visual impairments disabilities people. However, The main purpose of TC is to be portable which is easy to carry and use. But the problem that the nowadays TC available it should be operated with DOS PC system, but DOS system is very old system and rarely in usage right now due to the availability of new develop system.

TC also has very big circuit which include many types of microcontroller, and each one are dedicated for a single operation. As a result, all these components is made TC to be so complex, increase the programming source code, large power consumption, more expensive, and the percentage of errors occurs increase.

Moreover, TC has only one language auditory feedback which is English language. In addition, Arab country people may face some difficulty to exploit all the benefits of this TC and enjoy the outcome of science and modern technology in the world.

Finally, TC has unclear voice generation which cause the user to lack the benefits of auditory feedback that it has, and make it to be so useless.

All these problems is put it as the main targets which I should achieve it in my design to make portable, friendly, inexpensive, and more suitable for all people with different ages and various types of disability they have.

Chapter3

3. Block diagram description:

MCU

Keypad

Digital voice memory

LCD display

Speech decoder

Audio amplifier

Figure 2.1. Block diagram of talking calculator

As the figure 2.1 shown above, the new design of talking calculator consists of different parts which are:

2.1. Microcontroller

The microcontroller is the main part of my talking calculator which responsible to handle all the different types of operation inside it. Microcontroller is defined as a small completed digital computer in a single integrated circuit. However, the name of microcontroller itself is introduced from two portions which are Micro that tells the device is contain so much small circuits of gates, transistors and other. Second part which is controller that tells the device can be used to control event, processes, and different objects. Sometimes is called computer on chip or embedded and It is consists of a different components parts as shown in figure 2.2 which are:

Multipurpose CPU which is the main part of the controller that is used to fetches different instructions that is stored in special program memory, decodes these instructions, and executes them like basic logic, math, and other data functions.(10) Moreover, There are three different registers included in CPU which are:

The arithmetic logic unit (ALU) which the main part register in CPU. The main operation of it is to carry the arithmetic and logic units. Furthermore, ALU is divided into two units which are:

Arithmetic Unit (AU).

Logic Unit (LU). (11)

Instruction decoder of the processer is defined as a combinational integrated circuit which is in the form of read only memory (ROM), and sometimes is in the form of an ordinary combinatorial circuit. The main purpose of it is to translate an instruction code into the address code in the micro code which the instruction starts from it.(12)

Control circuitry is defined as the circuit which uses to control devices to determine when loads are energized or de-energized by controlling the current flow. Control circuits usually uses to carry lower voltages than power circuits.(13)

Serial Port which is very useful component on the controller that it is used to communicate with external peripheral such as PWM clock generators, event counters, watchdog, and timers, that uses to control the time period between the execution operations. On the other hand, the serial port can be operated at any required data transfer speed. Also it takes data bytes from the controller and shifts out the data to the output which is one bit at a time. Serial ports divided into two types which are synchronous and asynchronous. Synchronous data transfer needs an consorting and successive clock signal with each data bit for timing information. But the data transfer will be transferred without clock signal in asynchronous.(14)

I / O ports it is an electrical ports which provide and allow the embedded system to interface for connecting to the external devices.

Memory for storing data and essentially program in it like RAM " Read Access Memory", and EEPROM " Electrical Erasable Read Only Memory".

Analog I/O Port is performed using an analog-to-digital converter (ADC) which is used to read the data from sensor that is assembled in devices like temperature sensors Moreover, analog output is converted in digital waveform by using a digital-to-analog converter (DAC). Also most controllers are operated with pulse-width modulators that can be used to get analog voltage with a suitable external RC filter. DACs are used to drive motors.

I/O control unit

Read only memory

ROM

Clock

Read Access Memory

RAM

Processor "CPU"

Figure 2.2. block diagram of microcontroller

The microcontroller has been designed for dedicated application. Some of the microcontroller use an eight bits words and operate it at clock rate frequencies as 8 KHz, which can be handled for many typical applications, and characterized with low power consumption. Also, Some of the microcontroller use an sixteen bits words and operate at clock rate frequencies as 16 KHz However, the main operation of the microcontroller is to control various electronic devices such as , ATM machine, implantable medical devices, toys, automobile engine, remote controls, appliances, and many others. The main advantage for implementing different devices with the microcontroller is by reducing the size and cost compared to the other design which uses separate microprocessor, memory, I / O devices .

2.1.1. Features of microcontroller:

Interrupt:

The microcontrollers provide real time response to the event which occurs in embedded system that is controlling. However, when several events occur, an interrupt signal will produce to suspend processing the current instruction and to begin an interrupt service routine ISR. The ISR perform any processing is desired before return to the original instruction sequence for example: internal timer overflow, and Analogue to Digital converter ADC. Interrupt may be used also to wake the microcontroller from a low power sleep state.

I / O ports:

It I contain several general purpose input and output pins " GPIO ". It can be configured by using software configurable to either an input or an output port state. The GPIO pins which configured to an input state, they are often used to read sensors or external signals like analog to digital converter(ADC) . The GPIO pins which configured as output state can be used to drive external devices such as LED's or motors.

Higher integration:

The microcontroller is very high integration chip which is placed in a much smaller, cheaper package, and reduces the labor cost required to assemble and test circuit board.{2}

Single chip (CPU):

It is responsible for executing the data available in ROM, and control the performance of the microcontroller. {15} {16}

2.1.2. Advantages of microcontroller:

It has the microcontroller unit, which provide a high level of integration with very low cost. It also provide high level of reliability because it is not required any external circuit to perform the functions executions. However, it is include different parts which are:

Memory devices to store an instruction data, and it is include different parts:

Read Only Memory "ROM"

Read Access Memory "RAM"

Electrical Erasable Programmable ROM "EEPRO".

Electrically Erasable Memory "EEM"

Timer which include both real time clock , and real time interrupt.

I / O serial communication ports which consists:

Parallel port.

Analogue to Digital converter " A/ D"

Digital to Analogue converter " D/ A"

Liquid Crystal Display "LCD"

vacuum fluorescent display drivers (VFD).{17}

However, after I am going through the HCS12, and Atmega 128 microcontrollers, I decided to choose Atmel AVR because it has many features compared to HCS 12:

It is in system programmable by using single or parallel wires.

It has an internal EEPROM up to 4 KB, which I will use this size to store the voices, and the instruction source code.

It has an internal SRAM up to 8 KB.

It has Ethernet controller support.{18}

Unfortunately after all the researches and literature reviews which have done previously, it was found that the CodeWarior software has an limited memory space for the source code which is 2Kb. As a result this size is very small and it will not be sufficient to store my source code. So to overcome this problem, the HCS12 microcontroller is replaced with AVR microcontroller which has a capacity of free space up to 128 Kb and an open debugging software.

2.2. Keypad:

2.2.1. Definition of the keypad

It is a control panel tool, which includes the numeric characters (0 - 9), and function of operations. All the entries of the calculator are making through it. While during my project I am going to design a matrix keypad.

2.2.2. Matrix keypad:

It is an important part in every small embedded system where a human interaction or human input is needed. It has simple architecture as it is shown in figure 2.3 below, and it is easy for interfacing with any microcontroller.

Figure 2.3. Matrix keypad

2.2.3. How a keypad works

Keypads work as a switches, which each of its is connected to rows and columns. The number of rows and columns are depending on the number of the keypads which will be used. For example, if key "1" is pressed, the column 1 is electrically connected to row 1, if key "2" is pressed; the column 2 is electrically connected to row 1, and so on….

However, to find which keypad is pressed, it is necessary to connect all the column lines together to ground. Then connect all four row lines together via a resister, and to the operating voltage. If none of key is pressed, the row lines will remain at positive voltage, and if any key is pressed, it will cause to pull down the row line to zero volts.

To detect which key is pressed, pull down the column lines one by one to ground (pull one column to the ground, and the other column to the power supply voltage) and read the result from the other row lines. If one of the row lines is low, stop further reading and find the key code from the column and row information, and this operation called scanning process. The table below shows the scanning process for 4x4 keypad

Column

Row

Key

Col1

Col2

Col3

Col4

Row1

Row2

Row3

Row4

Character

0

0

0

0

1

1

1

1

(none)

0

1

1

1

0

1

1

1

1

1

0

1

1

0

1

1

1

2

1

1

0

1

0

1

1

1

3

1

1

1

0

0

1

1

1

+

0

1

1

1

1

0

1

1

4

1

0

1

1

1

0

1

1

5

1

1

0

1

1

0

1

1

6

1

1

1

0

1

0

1

1

-

0

1

1

1

1

1

0

1

7

1

0

1

1

1

1

0

1

8

1

1

0

1

1

1

0

1

9

1

1

1

0

1

1

0

1

x

0

1

1

1

1

1

1

0

On

1

0

1

1

1

1

1

0

0

1

1

0

1

1

1

1

0

=

1

1

1

0

1

1

1

0

÷

Table 2.1. matrix keypad rows and columns

2.2.4. AVR and I/O - connection of the matrix

Figure 2.4. Connection between AVR and matrix keypad

The keypad matrix can be connected directly to the I / O port of the AVR microcontroller without any additional hardware components. For example, the lower seven I / O pins of the port B is connected directly to the 4 x 4 matrix keypad like the port pins PB4 to the PB7 are defined as outputs, which provide the column signal, and the port pins PB0 to the PB3, which used to read the output result.{7}

2.3. Liquid Crystal Display (LCD):

It is the electronic device which is used for displaying images on its flat surface by shining the light through a combination of liquid crystals and polarized glass. It has different advantages like, smaller size, the contrast image is very good, less power consumptions, and lighter weight.{8}

2.3.1. 7 - Segment LED:

It is an electronic display device, which is consist of seven segments indicator. Each one has individually programmed on or off. It can be used to represent numbers and letters. It has low power consumption. The table 2.2. below show the comparison between 7 segment LED, and Liquid Crystal Display:{9}

Comparison

7 - segment display

Liquid Crystal Display

Power consumption

More power consumption

Less power consumption

The view angle

Less view angle due to the LED has small size

High view angle

Cost

More cost

Less cost

Table 2.2. comparison between 7 segment and LCD

As a result, I will use 2 x 16 alphanumeric display LCD in my project, because I want to offer number only.

2.3.2. Source code:

Default lines

The first three lines are used to define the type of microcontroller, and registers. program, and each of their have different characteristics and functions difference from other.

#include <hidef.h> /* common defines and macros */

#include <mc9s12e128.h> /* derivative information */

#pragma LINK_INFO DERIVATIVE "SampleS12"

Operate the LCD and control the word format

The LCD is connected to the microcontroller through port K and port P. Moreover, the port P for issuing various commands like, clear screen, and display string. The port K is for controlling the bit 3 in control port K, and it considered as an ASCII characters by making the first bit is 1.

#define setEN 0x04

#define cmd 0x00

#define dat 0x01

Control the columns

As the port A in HCS 12 is a general purpose input and output port, and this program is for the keypad 4x4 which consist for columns' and four rows. So the four columns for the keypad are configured by port A to control it and keep scanning .

#define keyport PORTA

#define col1 PORTA_BIT7

#define col2 PORTA_BIT6

#define col3 PORTA_BIT5

#define col4 PORTA_BIT4

As the control port shown above the enable bit should be functions. As a result the E bit should be 1. So in the hex numbers it comes 0x04. Moreover the LCD display start data read and write.

The second two lines is used to define the two statement true and false which will be used in scanning process.

#define TRUE 1

#define FALSE 0

Main program:

In this section of the source code, the main program is started. These program consist of two sections which are:

Initialize, cleared, and make ports as output  before start any experiment or in other word project, the necessary port should be cleared, and make it as an activate it as an output port.

Activate LCD to write situation  this stage is important, because the data should be inserted and save it in the LCD. However, the LCD should be cleared and initialized first and make it as an enable.

First section: Initialize, and active it to be output.

In this section, the necessary ports (K, P, T, A) are cleared to remove previous data, and make it as an output port to be enabled to accept any new program and data.

void initport(void);

void initport (void) {

PORTK = 0x00;

DDRK = 0xFF;

PTP = 0x00;

DDRP = 0xFF;

DDRT = 0xFF;

DDRA = 0x0F; //lower nib as op upper as ip

}

Delay program

The delay program is started to make the computer ready.

void delay (unsigned int);

void delay (unsigned int x) {

unsigned int y,z;

for (z=10;z>0;z--){

for (y=80;y>0;y--){

while (x>0)x--;

}

}

// delay for the computer to be ready

}

second section: initialize LCD:

The LCD display is initialize it, and make it is enable to receive the commands and variable data by controlling the port P and port K.

void LCDWrite(unsigned char,unsigned char );

void LCDWrite(unsigned char val,unsigned char command);

PTP = setEN | command; // set the control port P in bit E to enable.

delay(1);

PORTK = val;

delay (1); // give the computer some delay to be ready.

PTP = command;

delay (1); // give the computer some delay to be ready.

}

//To fully initialize the LCD, it is needed to follow 7 essentials function calling steps, these steps will be entered in the code through Port A which is the Data Port and Port K which is the Control Port. The functions are applied through the diagram shown below, Port K is always kept at #100 which equals to $4 since we are currently in a read state rather than write. Data in Port A will vary according to the functions by reference to the diagram below.

Figure 2.5. LCD initialization

void initLCD(void);

void initLCD (void){

char x;

unsigned char init[]={0x30,0x30,0x30,0x38,0x0C,0x01,0x06};

for(x=0;x<7;x++) { // start the initializing loop, so when x <

7, the x will start incremented until x =0

and then the loop will stop.

LCDWrite(init[x],cmd);

}

void LCD_String(unsigned char* , unsigned char);

void LCD_String(unsigned char* str, unsigned char addr){

char x;

addr = addr | 0X80;

LCDWrite(addr,cmd);

for(x=0;str[x]!='\0';x++) {

LCDWrite(str[x],dat);

}

}

The scanning process:

The lines below define if any key is pressed in any column, the bits in port A which control the column will toggle to 1. For example if 1 is pressed in column 1 , it will cause the bits 7 in port A to toggle to 1 and other bits to 0.

unsigned char get_key(){

unsigned char i,k,key=0; // define the variable i and k, which I

will be for rows, k will be for column,

and make both of it equal to zero.

k=1; // set k = 1

for(i=0;i<4;i++){ //loop for 4 rows

keyport &=~(0x08>>i); //to make rows low 1 by 1

if(!col1){ //check if key1 is pressed

key = k+0; //set key number

while(!col1); //wait for release

return key; //return key number

} // the if condition check process

for the first column will finish.

if(!col2){ //check if key2 is pressed

key = k+1; //set key number

while(!col2); //wait for release

return key; //return key number

} // the if condition check process

for second column will finish.

if(!col3){ //check if key3 is pressed

key = k+2; //set key number

while(!col3); //wait for release

return key; //return key number

} // the if condition check process

for the third column will finish.

if(!col4){ //check if key4 is pressed

key = k+3; //set key number

while(!col4); //wait for release

return key;

} // the if condition check process

for the fourth column will finish.

k+=4; //next row key number

keyport |= 0x08>>i; //make the row high again

}

return FALSE; //return false if no key pressed

}

The main program is start executed in below lines.

void main(void) {

unsigned char val; // define the character variable

unsigned char key[]={0x46,0x45,0x44,0x43,0x42,0x41,0x30,0x39,0x38, 0x37,0x36,0x35,0x34,0x33,0x32,0x31 };

delay(50); // give delay for computer to be ready

initPort(); // the computer will go to the line 14 to initialize

ports until is completed in line 21.

initLCD(); // the computer will go to line 40 to start initialize

the LCD until will be finished at 46.

delay(10); // give delay for computer to be ready

EnableInterrupts; // the interrupts is enabled.

for(;;) { // start the loop

val=get_key(); // define the variable which will operated if there

is any key pressed.

if(val) // if val is operated

LCDWrite(key[val-1],dat); // the LCD will display the key which is

pressed.

} // end the for loap

} // end the main program

Figure 2.6. the output of LCD dispaly

2.4.Digital voice memory "EEPROM"

It is stand of Electrical Erasable programmable Read Only Memory. It is a non volatile memory, which mean the data is not removed even the power is turned off. It can be written in or programmed more than one times {10}. However, in my project I will use this memory to store the voice recorder files, and this process can be done by using one of these two method which are:

Allophonic

RC encoder

2.4.1. Allophonic:

It is defined as a speech of sound that can distinguish the words. Change the allophone will not change the meaning of the words but the sound will be unintelligible{11}. However, the table 2.2 below shows the Arabic characteristics allophone based to IPA phonemic value.

English

Num

Arabic

English

Num

Arabic

Kh a ms a

5

5

Se fa r

0

0

Se tt a

6

6

Wa hi d

1

1

Sa b aa

7

7

Eth na n

2

2

Th a ma nia

8

8

Th a la th a

3

3

Ti ss aa

9

9

Ar baa

4

4

Table 2.3. Arabic characteristics allophonic

There is some common of letters in numbers , those sharing some letters with other number, so I will make one voice which is common for other number.

2.4.2.RC encoder:

I will use speech decoder for performing two functions:

First  ADC for digitizing the voice, that go through some stages which are:

Record the voice one by one.

Samples the analogue signal.

Pass the samples signal into PCM filter.

Second  DAC for reconstructing the voice, that go through some stages which are:

Retrieve the code signal from memory.

Passes through the filter.

Reconstructed voice .{12}

2.5.Power amplifier:

The signal which reconstructed from the EEPROM memory is very weak which is need to amplify to increase the amplitude. So, I will use power amplifier device for this purpose. {13}

Writing Services

Essay Writing
Service

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing
Service

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision
Service

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.