Documente Academic
Documente Profesional
Documente Cultură
Name
Name
Student ID
13B09109
Student
ID
Title of
Experiment
Lecturer
MR. TARMIZI
Marks Distribution
Marks
Title (2 marks)
Abstract (10 marks)
Objective and introduction (15 marks)
Experimental methods (20 marks)
Results and discussion (30 marks)
Conclusions (10 marks)
References (3 marks)
Related Appendices (5 marks)
Report format (5 marks)
Late Submission (1 marks deduction per minutes)
Total Mark (100%)
Comments:
I declare that this assessment item is my own work, except where acknowledged, and has not been submitted for academic credit elsewhere,
and acknowledge that the assessor of this item may, for the purpose of assessing this item:
Date:___________________
Objective
To familiar with 8051 compiler
To familiar with 8051 simulator program.
To test the 8051 system and its output using circuit simulator.
B. Introduction
A micro-controller can be compared to a small stand alone computer, it is a very powerful device, which is
capable of executing a series of pre-programmed tasks and interacting with other hardware devices. Being packed in
a tiny integrated circuit (IC) whose size and weight is usually negligible, it is becoming the perfect controller for
robots or any machines requiring some kind of intelligent automation. A single microcontroller can be sufficient to
control a small mobile robot, an automatic washer machine or a security system. Any microcontroller contains a
memory to store the program to be executed, and a number of input/output lines that can be used to interact with
other devices, like reading the state of a sensor or controlling a motor.
Nowadays, microcontrollers are so cheap and easily available that it is common to use them instead of simple
logic circuits like counters for the sole purpose of gaining some design flexibility and saving some space. Some
machines and robots will even rely on a multitude of microcontrollers, each one dedicated to a certain task. Most
recent microcontrollers are In System Programmable, meaning that you can modify the program being executed,
without removing the microcontroller from its place.
Today, microcontrollers are an indispensable tool for the robotics hobbyist as well as for the engineer. Starting in
this field can be a little difficult, because you usually cant understand how everything works inside that integrated
circuit, so you have to study the system gradually, a small part at a time, until you can figure out the whole image and
understand how the system works.
datawrt(key);
}
}
}
unsigned char keyread() //keypad read subprogram
{ code unsigned char pattern[]={"789/456*123-O0=+"};
unsigned char key; //declare variable
while(DA==0); // wait DA high,,, key pressed
key=keypad&0x0f;
while(DA==1); //wait key depressed
return pattern[key];
}
void lcdwrite(unsigned char out)
{ rw=0;
e=1;
delay(200);
lcddata=out;
delay(200);
e=0;
}
void delay(unsigned int dly)
{ unsigned int i;
for (i=0;i<dly;i++);
}
void cmdwrt(unsigned char cmd)
{ rs=0;
lcdwrite(cmd);
}
void datawrt(unsigned char dat)
{ rs=1;
lcdwrite(dat);
}
void lcdstart(void)
{ cmdwrt(0x38);
cmdwrt(0x0c);
cmdwrt(0x01);
cmdwrt(0x06);
}
void strwrt(unsigned char *str,unsigned char size)
{ unsigned char i;
for (i=0;i<(size-1);i++)
{ datawrt(str[i]);
}
}
8. Run a program compile to determine whether any error or warning on this program.
9. Build a hex. File for this program by select Flash from toolbar window and chose Configure Flash Tools..
10. On option click on Output and tick on Create HEX File column.
11. After that, open a program simulator PROTEUS , Build a circuit as given in attachment 2.
12. When a circuit done, double-clicking on IC AT89C51 and extract a project hex. File by filling on Program
File column.
13. Simulate a circuit and observe a output on LCD display.
III. RESULTS AND DISCUSSION
In conclusion, this activity shows a student how easily build a project by using 8051 compiler and
PROTEUS circuit simulator. Students are able to familiar with 8051 compiler and circuit simulator
program by complete 3 activities.