Wednesday, April 22, 2009

Different Algorithims of Face Recognition

PCA
Derived from Karhunen-Loeve's transformation. Given an s-dimensional vector representation of each face in a training set of images, Principal Component Analysis (PCA) tends to find a t-dimensional subspace whose basis vectors correspond to the maximum variance direction in the original image space. This new subspace is normally lower dimensional .If the image elements are considered as random variables, the PCA basis vectors are defined as eigenvectors of the scatter matrix.

ICA
Independent Component Analysis (ICA) minimizes both second-order and higher-order dependencies in the input data and attempts to find the basis along which the data (when projected onto them) are - statistically independent . Bartlett et al. provided two architectures of ICA for face recognition task: Architecture I - statistically independent basis images, and Architecture II - factorial code representation.

LDA
Linear Discriminant Analysis (LDA) finds the vectors in the underlying space that best discriminate among classes. For all samples of all classes the between-class scatter matrix SB and the within-class scatter matrix SW are defined. The goal is to maximize SB while minimizing SW, in other words, maximize the ratio detSB/detSW . This ratio is maximized when the column vectors of the projection matrix are the eigenvectors of (SW^-1 × SB).

EP
Aa eigenspace-based adaptive approach that searches for the best set of projection axes in order to maximize a fitness function, measuring at the same time the classification accuracy and generalization ability of the system. Because the dimension of the solution space of this problem is too big, it is solved using a specific kind of genetic algorithm called Evolutionary Pursuit (EP).

EBGM
Elastic Bunch Graph Matching (EBGM). All human faces share a similar topological structure. Faces are represented as graphs, with nodes positioned at fiducial points. (exes, nose...) and edges labeled with 2-D distance vectors. Each node contains a set of 40 complex Gabor wavelet coefficients at different scales and orientations (phase, amplitude). They are called "jets". Recognition is based on labeled graphs. A labeled graph is a set of nodes connected by edges, nodes are labeled with jets, edges are labeled with distances.

Kernel Methods
The face manifold in subspace need not be linear. Kernel methods are a generalization of linear methods. Direct non-linear manifold schemes are explored to learn this non-linear manifold.

Trace Transform
The Trace transform, a generalization of the Radon transform, is a new tool for image processing which can be used for recognizing objects under transformations, e.g. rotation, translation and scaling. To produce the Trace transform one computes a functional along tracing lines of an image. Different Trace transforms can be produced from an image using different trace functionals.

AAM
An Active Appearance Model (AAM) is an integrated statistical model which combines a model of shape variation with a model of the appearance variations in a shape-normalized frame. An AAM contains a statistical model if the shape and gray-level appearance of the object of interest which can generalize to almost any valid example. Matching to an image involves finding model parameters which minimize the difference between the image and a synthesized model example projected into the image.

3-D Morphable Model
Human face is a surface lying in the 3-D space intrinsically. Therefore the 3-D model should be better for representing faces, especially to handle facial variations, such as pose, illumination etc. Blantz et al. proposed a method based on a 3-D morphable face model that encodes shape and texture in terms of model parameters, and algorithm that recovers these parameters from a single image of a face.

3-D Face Recognition
The main novelty of this approach is the ability to compare surfaces independent of natural deformations resulting from facial expressions. First, the range image and the texture of the face are acquired. Next, the range image is preprocessed by removing certain parts such as hair, which can complicate the recognition process. Finally, a canonical form of the facial surface is computed. Such a representation is insensitive to head orientations and facial expressions, thus significantly simplifying the recognition procedure. The recognition itself is performed on the canonical surfaces.

Digital Camera Face Recognition: How It Works?




Face detection technology, available from manufacturers such as Canon, Pentax and Fuji­Film, uses special algorithms to parse the scene while you aim the camera. What's it looking for? The shape of a human face, of course. When it finds one, the camera automatically adjusts both the focus and the exposure to provide the best portrait possible. In the case of FujiFilm's "Image Intelligence" system, for example, a chip inside the camera constantly scans the image in its viewfinder for two eyes, a nose, ears and a chin, making out up to 10 faces at a time before you've hit the shutter. Usually, a scanned face has to cover at least 10 percent of the height of the viewfinder LCD — this requirement prevents the camera from trying to lock on to faces far in the background. The face identification process takes about four one-hundredths of a second. You can turn off the face recognition feature for times when your subject isn't a human. However, according to FujiFilm project manager David Troy, research shows that "70 percent of images taken have a person as the subject." Face recognition can be used for more than just autofocus. Some cameras capture the location of the identified faces within each picture snapped. This lets you zoom in on the faces automatically on the camera's LCD after you take the shot — useful when checking if grandma's eyes were closed or open. Sometime soon, face detection may even give way to facial identification, discerning one subject from an-other. For instance, the camera could retain an image tagged "Mom" in its memory. Later, the camera would automatically recognize each subsequent picture of your mother and add the "Mom" tag to it. As for the question about animal faces, you're not alone in wondering how the new cameras handle our friends from other species. "You'd be surprised how often we get that question!" says FujiFilm spokeswoman Katherine Keane. "Unfortunately, FujiFilm's face detection technology can only detect human faces." So you'll just have to focus on Fido's friendly mug yourself.

Laplace edge detection with C++ code




The 5x5 Laplacian used is a convoluted mask to approximate the second derivative, unlike the Sobel method which approximates the gradient. And instead of 2 3x3 Sobel masks, one for the x and y direction, Laplace uses 1 5x5 mask for the 2nd derivative in both the x and y directions. However, because these masks are approximating a second derivative measurement on the image, they are very sensitive to noise, as can be seen by comparing edgeSob.bmp to edgeLap.bmp. The Laplace mask and code are shown below:

for(Y=0; Y<=(originalImage.rows-1); Y++) {
for(X=0; X<=(originalImage.cols-1); X++) {
SUM = 0;

/* image boundaries */
if(Y==0 Y==1 Y==originalImage.rows-2 Y==originalImage.rows-1)
SUM = 0;
else if(X==0 X==1 X==originalImage.cols-2 X==originalImage.cols-1)
SUM = 0;

/* Convolution starts here */
else {
for(I=-2; I<=2; I++) {
for(J=-2; J<=2; J++) {
SUM = SUM + (int)( (*(originalImage.data + X + I +
(Y + J)*originalImage.cols)) * MASK[I+2][J+2]);

}
}
}
if(SUM>255) SUM=255;
if(SUM<0) SUM=0;

*(edgeImage.data + X + Y*originalImage.cols) = 255 - (unsigned char)(SUM);
fwrite((edgeImage.data + X + Y*originalImage.cols),sizeof(char),1,bmpOutput);
}
}

SOBEL Edge Detection with C++ Code


Based on this one-dimensional analysis, the theory can be carried over to two-dimensions as long as there is an accurate approximation to calculate the derivative of a two-dimensional image. The Sobel operator performs a 2-D spatial gradient measurement on an image. Typically it is used to find the approximate absolute gradient magnitude at each point in an input grayscale image. The Sobel edge detector uses a pair of 3x3 convolution masks, one estimating the gradient in the x-direction (columns) and the other estimating the gradient in the y-direction (rows). A convolution mask is usually much smaller than the actual image. As a result, the mask is slid over the image, manipulating a square of pixels at a time.


void sobel( int *a, int sx, int sy, int *out)
{
// (In) a: The image (row major) containing elements of int.
// (In) sx: size of image along x-dimension.
// (In) sy: size of image along y-dimension.
// (Out) out: The output image with dimensions (sx-2, sy-2).

int i, j, ctr = 0;
int *p1, *p2, *p3;

p1 = a;
p2 = p1+sx;
p3 = p2+sx;

for( j = 0; j <>
for( i = 0; i <>
out[ctr++] = ( abs((p1[0]+ 2*p1[1] + p1[2]) - (p3[0] + 2*p3[1]+ p3[2])) + abs((p1[2] + 2*p2[2] + p3[2]) - (p1[0] + 2*p2[0] + p3[0])) ) / 6;
++p1;
++p2;
++p3;
}
p1 += 2;
p2 += 2;
p3 +=2; }
}





Robotic Fly for Surveillance


Harvard University engineers have created a robotic fly to serve as a stealth surveillance robot for the US Department of Defense. The robotic fly is designed to mimic the movements of a real fly. It weighs 60 milligrams and has a wingspan of 3 centimeters.
This is a major advancement in robotics because it’s the first 2 winged robot built to such a small scale that it can pass as a real fly but there are still some challenges.
At the moment, Wood’s fly is limited by a tether that keeps it moving in a straight, upward direction. The researchers are currently working on a flight controller so that the robot can move in different directions.
The researchers are also working on an onboard power source. (At the moment, the robotic fly is powered externally.) Wood says that a scaled-down lithium-polymer battery would provide less than five minutes of flying time.
Tiny, lightweight sensors need to be integrated as well. Chemical sensors could be used, for example, to detect toxic substances in hazardous areas so that people can go into the area with the appropriate safety gear. Wood and his colleagues will also need to develop software routines for the fly so that it will be able to avoid obstacles.

Tuesday, April 21, 2009

Comparison between PTCL and Link Dot Net Dsl ( Ptcl vs. Ldn )

PTCL:

Watch FREE Movies, Cricket Matches, Pakistani Plays & listen to all types of Music, Religious and Children's content exclusively available to PTCL Broadband Users.

http://entertainment.ptcl.net/


LDN:

LINKdotNET, after its successful launch in Pakistan extends another step towards changing the way you live by offering enhanced DSL packages for consumers.

http://mylink.net.pk/

Download speed:

PTCL student package 839 Rs. = 100 kbps average
LDN student package 885 Rs. = 28 kbps average ( if you are lucky enough max. you will get is 48 kbps)

Charges:

LDN costs more than PTCL.


Disconnection Issue:

Disconnection issue is almost same and mostly depends on your ptcl landline. But if you have LDN DSL service then you have to wait for the Ptcl lineman if there arrives any problem in your land line. so another plus point for PTCL.

Smart TV:

You can get other facilities such as smart TV with PTCl.


Conclusion:

I myself user of Link Dot net student package suggest you shuld go for PTCL Dsl if it is available in your area.

Stepper Motor code with proteus design




//instead of 270 enter your desired angle.

// this code is for unipolar 6 terminal stepper motor.




# include
# include

void delay(void);
void main (void)
{
int i;



for(i=0;i<(270/(1.8*4));i++)
{

P2_0=0;
delay();
P2_0=1,P2_1=0;
delay();
P2_1=1,P2_2=0;
delay();
P2_2=1,P2_3=0;
delay();
P2_3=1;
}



for(i=0;i<(270/(1.8*4));i++)
{

P1_0=0;
delay();
P1_0=1,P1_1=0;
delay();
P1_1=1,P1_2=0;
delay();
P1_2=1,P1_3=0;
delay();
P1_3=1;
}


for(i=0;i<(180/(1.8*4));i++)
{

P3_0=0;
delay();
P3_0=1,P3_1=0;
delay();
P3_1=1,P3_2=0;
delay();
P3_2=1,P3_3=0;
delay();
P3_3=1;
}


for(i=0;i<(270/(1.8*4));i++)
{

P2_3=0;
delay();
P2_3=1,P2_2=0;
delay();
P2_2=1,P2_1=0;
delay();
P2_1=1,P2_0=0;
delay();
P2_0=1;
}


for(i=0;i<(270/(1.8*4));i++)
{

P1_4=0;
delay();
P1_4=1,P1_5=0;
delay();
P1_5=1,P1_6=0;
delay();
P1_6=1,P1_7=0;
delay();
P1_7=1;
}


while(1);

}

void delay(void)
{
TMOD=0x10;
TL1=0x58;
TH1=0x9E;
TR1=1;
while ( TF1 == 0 );
TR1=0;
TF1=0;
}

Friday, April 17, 2009

SOURCE CODE " LCD plus Keypad interfacing with Atmel 8051 in C"

Keypad and LCD Interfacing


# include
# include

int g;
sbit row1 = P3^0;
sbit row2 = P3^1;
sbit row3 = P3^2;
sbit row4 = P3^3;

char scan_key(void)
{
P3 = 15;
while(1)
{
if ( P3 != 15 ) break;
}
P3 = 239;
if( row1 == 0 ){g = 1; return '1';}
if( row2 == 0 ){g = 4; return '4';}
if( row3 == 0 ){g = 7; return '7';}
if( row4 == 0 ){ return '*';}
P3 = 223;
if( row1 == 0 ){g = 2; return '2';}
if( row2 == 0 ){g = 5; return '5';}
if( row3 == 0 ){g = 8; return '8';}
if( row4 == 0 ){g = 0; return '0';}
P3 = 191;
if ( row1 == 0 ){g = 3; return '3';}
if ( row2 == 0 ){g = 6; return '6';}
if ( row3 == 0 ){g = 9; return '9';}
if ( row4 == 0 ){ return '#';}

}

int main()
{
int i, c, f = 0,ali = 0;
char a;
P1 = 56, P2_1 = 0, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for (i = 0;I < 255; i++);
P1 = 15, P2_1 = 0, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for (i = 0; I < 255; i++);
P1 = 1, P2_1 = 0, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for(i = 0;i < 255; i++);
P1 = 28, P2_1 = 0, P2_2 = 0, P 2_3 = 1;
P2_3 = 0;
for(i = 0;i < 255; i++);
P1 = 129, P2_1 = 0, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for(i = 0;i < 255; i++);
while (1)
{
a = scan_key();
if( a == '*')
{
P1 = 1, P2_1 = 0, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
f = 0;
g = 0;
for( c = 0;c < 32000; c++);
}
if( a != '*' && a != '#')
{
P1 = a, P2_1 = 1, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for(c = 0;c < 32000; c++);
f = f + g;
f = f * 10;
}
if( a == '#')
{
f = f/10;
a = f;
P1 ='=', P2_1 = 1, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for( c = 0;c < 32000; c++);
f = 0;
g = 0;
goto label;
}
while (0)
{
label:
P1 = a, P2_1 = 1, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for( c = 0; c <32000 ; c++);
P1 =' ', P2_1 = 1, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for( c = 0; c < 32000; c++);
}
}
}

How to use a keypad ( keypad interfacing )


There are basically two methods commonly known for keypad interfacing in one
5 volts is supplied and the row and columns of the pressed key are made 0 in this way key is scanned.

But the method we used is that we made the all rows 1 (means supplied 5 (Volts) and then pressed the key and the pressed row and columns are scanned simultaneously but indirectly.


We used 4 * 3 keypad as 4 * 4 was not available in market. so we have 4 rows and 3 columns in our keypad which is actually a digital phone keypad we used a converter at the end to solder the wires with it and directly insert those in the bread board.

Row 1 to row 4 are attached to Pin 0 to pin3 of port 3 and similarly the pin 4 to pin 6 are used for columns last pin is not used of port 3.

Key scanning is quite simple the row and columns when made short through the keypad enables a single key and display it on the LCD.

LCD pin descriptions

Vcc, Vss, Vee:



While Vcc and Vss provide +5V and ground respectively, Vee is used for controlling LCD contrast.



RS, register select:

There are two very important registers inside LCD. The RS pin is used for their selection as follows. If RS =0, the instruction command code register is selected, allowing the user to send a command such as clear display, cursor at home, etc. If RS=1, 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 the data pins. This pulse must be a minimum of 450 ns wide.



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.

These are also instructions command codes that can be sent to the LCD to clear the display or force the cursor to the home position or blink the cursor.

A brief insight into the world of Liquid Crystal Display (LCD)







Introduction to ATMEL 89C51







DETAILS:
The ATMEL 89C51 is a low power, high performance CMOS 8-bit microcontroller with 4K bytes of In System Programmable Flash Memory. It is suitable for cost effective embedded systems.
It has following standard features:
4K bytes of flash memory, 128 bytes of RAM, 32 I/O pins, two 16 bit timers/counters, a full duplex serial port, on chip oscillator, and clock circuitry, six interrupt sources, standard 40 pin package, external memory interface.

RST:
This is the reset input. This input should normally be at logic 0. A reset is accomplished by holding the RST pin for at least two machine cycles. Power-on reset is normally performed by connecting an external capacitor and a resistor this pin.

P3.0:
This is bi-directional I/O pin with an interrupt pull-up resistor. This pin also acts as the data receive input (RXD) when using the device as serial data.

P3.1:
This is bi-directional I/O pin with an internal interrupt pull-up resistor. This pin also acts as the data transmit output (TXD) when sending serial data.

XTAL1 and XTAL2:
These pins are where external crystal oscillator should be connected for the operation of the internal oscillator. Normally two 33pF capacitors are connected with the crystal as shown. A machine cycle is obtained by dividing the crystal frequency by 12. Thus, with a 12MHz crystal, the machine cycle is 1us. Most machine instructions execute in one machine cycle.

P3.3:
This is a bi-directional I/O pin. This pin also is the external interrupt (INT1) pin.

P3.4:
This is bi-directional pin. This pin is also used for the counter 0 input (TO) pin.

P3.5:
This is bi-directional pin. This is also used for counter 1 input (T1) pin.

GND:
It is the ground pin.

P3.6:
This is bi-directional pin. It is also the external memory write (WR) pin.

P3.7:
This is bi-directional pin. This pin is also the external data memory read (RD) pin.

P1.0:
This is bi-directional pin. It has no internal pull-resistors. P1.1:
This is bi-directional pin. It has no internal pull-up resistors.

P1.2 to P1.7:
These are remaining bi-direction pins. These pins have internal pull-up resistors.

VCC:
It is the supply voltage. 5V is supplies here.

P0.0 to P0.7:
These are eight I/O pins. These have no internal pull-up resistors.

P2.0 to P2.7:
These are the eight I/O pins. These have internal pull-up resistors.

EA/VPP:
This is the external access enable pin on the 8051. EA should be connected to VCC for internal programme executions. This pin also receives the programming voltage during programming.

PSEN:
This is the programme store enable pin. This is used when using external memory.

ALE/PROG:

This is the address latch enable pin.


2. List of components used


· A 2X16 double line LCD, with backlight option and 16 pin package. It supports HD44780 standard.

· A 4X3 telephone keypad. Having 4 rows and 3 columns.

· A crystal oscillator of 12MHz frequency.

· Two 33pF Tantalum bead Capacitors.

· One 10uF capacitor and one 8.2K ohm 0.25 w resistor for reset.

· A 500 ohm resistor for adjusting the contrast.

· A regulated 5V power supply with LM7805 regulator for providing a constant voltage output.
· Assembled on bread-board.

CONTENTS of Atmel Project keypad and 2 line LCD

1. PROJECT DETAILS

Ø List of components used.
Ø Introduction about ATMEL 89C51 microcontroller.
Ø A brief insight into the world of Liquid Crystal Display (LCD).
Ø How to use a Keypad.
Ø Schematic of the project.


2. PROGRAMME DETAILS

Ø Source code (.c file).
Ø What is inside our code and how does our amazing code work!

3. DIFFICULTIES AND HURDLES
IN OUR WAY

LCD plus Keypad interfacing with 8051 Atmel

What is inside our code and how does this amazing code work??

Our code is quite simple we used simple commands to initialize the LCD all the data transported is in decimal. RS, RW and E pins of LCD are handled separately. We not used much function in our program as they usually make the program tricky. We tried to make the program as much simple as possible.
LCD:
We used blue LCD 16 * 2, JHD 1602 with 16 pins (actually 14 last two are for back light)
LCD interfacing is quite simple and easy to understand as each pin is handled and feeded with the data individually. This made the code quite easy.

PINs of LCD:

Data pins of LCD are connected to the port 1 of micro controller’s to the pin 1of port 2, RW pin 2 of port 2 and E to the pin 3 of port 2.
Pin 15 is directly given the 5 volts and pin 16 is grounded so that the back light can be utilized the basic function of the back light is to increase the visual ability of observer as we are using blue LCD and the text is written in grayish white which is not visible without the back light.

PIN 1, 2 & 3:
Pin 1 is grounded, pin 2 is connected to 5 volts & pin 3 of contrast is again grounded manually.

RS, RW & E PIN:
These are connected to port 2 and are feeded individually when ever and as needed. RS is 0 for command on LCD and 1 for data writing. RW is always 0 as we dont need it and E is changed from high to low pulse whenever the either command or data is sent to LCD.

EXPLAINATION:

FUNCTION SET:
1st of all function set command is feeded to the LCD data ports are feeded with 56 dec or 38 hex. That conveys that we are using 16 * 2 LCD. RS is zero. RW is zero. Enable pin is feeded with 1st high and then low signal.
P1 = 56, P2_1 = 0, P2_2 = 0,P2_3 = 1;
P2_3 = 0;

DISPLAY & Cursor ON OFF:
Secondly display on off and cursor on off (also blinking)command is sent to the LCD where data pins are feeded with 15 dec. RS is zero. RW is zero. Enable pin is feeded with 1st high and then low signal.
P1 = 15, P2_1 = 0, P2_2 = 0,P2_3 = 1;
P2_3 = 0;


CLEAR DISPLAY:
Data pins are feeded with 1. RS is zero. RW is zero. Enable pin is feeded with 1st high and then low signal to clear display.
P1 = 1, P2_1 = 0,P2_2 = 0,P2_3 = 1;
P2_3 = 0;


DISPLAY SHIFT:
To shift cursor right data pins are feeded with 28.RS is zero. RW is
zero. Enable pin is feeded with 1st high and then low signal.
P1 = 28, P2_1 = 0, P2_2 = 0, P2_3 = 1;
P2_3 = 0;


STARTING POSITION:
data pin is feeded with 81 hex or 129 decimal according to the Mazzidi`s book in assembly language. RS is zero. RW is zero. Enable pin is feeded with 1st high and then low signal.
P1 = 129, P2_1 = 0, P2_2 = 0, P2_3 = 1;
P2_3 = 0;

Now LCD`s initializing is complete....

KEYPAD INTERFACING:

Keypad interfacing involves a function call which also enables us to handle the debouncing problem delay is there but after the display of the key pressed. Proper use of delay by using for loop made it quite practical.

Whenever there is need to input data a function is called which calculate the key pressed from the keypad and display it or use the command as desired.

EXPLAINATION:

The data is saved in another variable 'g' at the same time transferred to variable 'f' and 'f' is multiplied with 10 and again if key is scanned the value of f changes by addition on new value of 'g' in 'f' i.e.- "f=f+g" again it is multiplied with 10 and procedure continues until enter or reset key is not pressed.

if(a!='*' && a!='#')
{
P1 = a, P2_1 = 1, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for(c=0;c<32000;c++);
f=f+g;
f=f*10;
}

ENTER:
Whenever enter key is pressed the value of 'f' is divided by 10 and the calculated no (which is actually the ASCII code) is sent to the LCD to display (this portion is in last of the code which can be operated by GOTO statement not else) its corresponding character. Again the value of 'f' and 'g' are made zero.
"f=0;
g=0;
"

if(a=='#')
{
f=f/10;
a=f;
P1 ='=', P2_1 = 1,P2_2 = 0,P2_3 = 1;
P2_3 = 0;
for(c=0;c<32000;c++);
f=0;
g=0;
goto label;
}
while(0)
{
label:
P1 = a, P2_1 = 1, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for(c=0;c<32000;c++);
P1 =' ', P2_1 = 1, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for(c=0;c<32000;c++);
}


RESET:
Whenever the reset key is pressed clear display command is executed and values of 'f' and 'g' are made zero.
"f=0;
g=0;
"
if(a=='*')
{
P1 = 1, P2_1 = 0,P2_2 = 0,P2_3 = 1;
P2_3 = 0;
f=0;
g=0;
for(c=0;c<32000;c++);
}


This all procedure is in wild loop. So in this way we have a numeric keyboard every character can be written on LCD with its corresponding ASCII code.