DOC-20230501-WA0000
DOC-20230501-WA0000
ON
SUBMITTED BY
MR. D. S. LAMB
TO
DEPARTMENT
CHHATRAPATI SAMBHAJINAGAR
1
CERTIFICATE
We would like to express our thanks to the people who have helped us most
throughout our project. We would like to express our sincere thanks to the
Principal of CSMSS College of Polytechnic Dr. Ganesh B. Dongre for being
always with us as a motivator. We are thankful to the H.O.D. of Electronics &
Tele-communication Engineering Department Mr. M. D. Narangale for his kind
support. We are grateful to our Project Guide Mr. D. S. Lamb for nonstop
support and continuous motivation for the project. His help made us possible to
complete our project with all accurate information. A special thanks of our goes
to our friends who helped us in completing the project, where they all exchanged
their own interesting ideas. We wish to thanks our parents for their personal
support or attention who inspired us to go our own way. Finally, we would like
to thank God who made all things possible for us till the end.
1. Chapter 1 1-5
Introduction
1.1 Overview 1
1.2 History 2
1.3 Benefits 2
1.4 Need 3
2. Chapter 2 6-7
Literature Survey
2.1 The Article referred for project 6
3. Chapter 3 8-30
System Development
3.1 Block Diagram of 8051 Microcontroller 8
Development Board
3.2 Microcontroller 9
3.17 Buzzer 26
4. Chapter 4 28-58
System Analysis
4.1 LED interface 31
4.11 Software's 54
5. Chapter 5 59-61
Conclusion
5.1 Conclusion 59
5.2 Advantages 59
5.3 Disadvantages 60
5.4 Application 60
References 62
Appendix 62
List of figure
1. Development Board 1
4. Power Supply 10
6. Tactile switch 11
7. Oscillator Circuit 12
8. Serial Interface 13
9. RS232 Pinouts 14
List of Table
2. Name of Components 29
3. Name of Equipment 30
CHAPTER 1
INTRODUCTION
1.1 OVERVIEW
1
1.2 HISTORY
Development boards are a common tool used by engineers and electronics enthusiasts
to prototype and experiment with microcontrollers and other electronic components. The
history of development boards can be traced back to the early days of the microprocessor,
when hobbyists and researchers were experimenting with the newly available technology.
The first development boards were simple breadboards or prototype boards, which
provided a way to connect the microprocessor to other components, such as memory,
input/output devices, and sensors. These early development boards were often handmade, and
required a great deal of technical knowledge and skill to build and operate.
As microprocessors became more powerful and more widely used, the demand for
more sophisticated development boards grew. In the 1980s, companies such as Intel and
Motorola began to develop standardized development boards for their microprocessors,
which made it easier for engineers and hobbyists to experiment with the technology.
Over time, development boards have become increasingly sophisticated and versatile,
offering a wide range of features and capabilities. Today, development boards are available
for a wide range of microcontrollers, including the popular Arduino and Raspberry Pi
platforms, as well as more specialized microcontrollers such as the 8051, PIC, and AVR.
The development of the “8051 Microcontroller Development Board” was a response
to the need for a versatile and user-friendly platform for experimenting with the 8051
microcontroller. The development board was designed to provide a wide range of features
and capabilities, such as programming interfaces, communication interfaces, on-board
sensors, and an integrated debugger.
Today, development boards are widely used by hobbyists, students, and professionals
alike to prototype and test electronic systems and to develop new applications for
microcontrollers and other electronic components. They have become an essential tool in the
world of electronics, enabling engineers and enthusiasts to explore the full potential of the
technology and to create innovative new products and applications.
The history of the “8051 Microcontroller Development Board” project can be traced
back to the development of the 8051 microcontroller itself. The 8051 microcontroller was
first introduced in 1980 by Intel Corporation, and it quickly became one of the most widely
used microcontrollers in the world. The 8051 microcontroller was designed to provide a
versatile and cost-effective solution for embedded systems and electronics applications.
2
As the popularity of the 8051 microcontroller grew, there was a need for a
development platform that would enable users to experiment with its capabilities and explore
its potential applications. This led to the development of various development boards for the
8051 microcontroller, each with its own set of features and capabilities.
The “8051 Microcontroller Development Board” project was initiated as a response to
the need for a versatile and user-friendly platform for experimenting with the 8051
microcontroller. The project aimed to create a development board that would provide users
with a range of features and capabilities, such as programming interfaces, communication
interfaces, on-board sensors, and an integrated debugger.
The project was designed and developed by a team of engineers and electronics
enthusiasts who were passionate about the potential of the 8051 microcontroller. The team
worked tirelessly to design and develop a PCB layout that would accommodate all the
necessary components and peripherals, while still being compact and easy to use.
The project also involved the development of firmware and software components that
would enable users to program and test the 8051 microcontroller. The team worked on
developing a user-friendly interface that would make it easy for users to write and debug their
programs.
Over time, the “8051 Microcontroller Development Board” project has evolved to
include new features and capabilities. Today, the development board is a highly versatile
platform that enables users to experiment with a range of different applications and explore
the full potential of the 8051 microcontroller.
1.3 BENIFITS
The “8051 Microcontroller Development Board” offers a wide range of benefits for
electronics enthusiasts, students, and professionals alike. Some of the key benefits of the
development board include:
i. Versatility: The development board is designed to be highly versatile, with a wide
range of features and capabilities that enable users to experiment with a range of
applications and explore the full potential of the 8051 microcontroller.
ii. User-Friendly Interface: The development board features a user-friendly interface
that makes it easy for users to program and test the 8051 microcontroller. The
3
interface includes features such as integrated programming and debugging tools, on-
board sensors, and communication interfaces.
iii. Easy to Use: The development board is designed to be easy to use, with a compact
and well-organized layout that makes it simple to connect peripherals and other
electronic components.
iv. Cost-Effective: The development board provides a cost-effective solution for
experimenting with the 8051 microcontroller, with a range of features and capabilities
that would be difficult or expensive to replicate using individual components.
v. Programming Flexibility: The development board supports a range of programming
languages, including C, Assembly, and BASIC, enabling users to choose the
programming language that best suits their needs.
vi. Educational Value: The development board is an excellent tool for teaching and
learning about microcontrollers and embedded systems, providing a hands-on
approach to learning that is both engaging and effective.
vii. Expandability: The development board is designed to be expandable, with a range of
expansion ports and connectors that enable users to add additional peripherals and
components as needed.
Overall, the “8051 Microcontroller Development Board” provides a versatile and user-
friendly platform for experimenting with the 8051 microcontroller and exploring its potential
applications in embedded systems and electronics. Whether you are a student, hobbyist, or
professional, the development board offers a range of benefits that can help you to learn,
experiment, and innovate with microcontrollers and other electronic components.
1.4 NEED
4
iii. Ease of Use: The development board is designed to be easy to use, with a well-
organized layout and on-board programming and debugging tools that make it simple
to develop and test code.
iv. Versatility: The development board is highly versatile, with a range of features and
capabilities that enable users to experiment with a wide range of applications and use
cases.
v. Cost-Effective: The development board provides a cost-effective solution for working
with the 8051 microcontroller, with a range of features and capabilities that would be
difficult or expensive to replicate using individual components.
vi. Time-Saving: The development board can save a lot of time and effort for
developers, providing a ready-made platform for developing and testing applications.
vii. Expandability: The development board is designed to be expandable, with a range of
expansion ports and connectors that enable users to add additional peripherals and
components as needed.
Overall, the “8051 Microcontroller Development Board” is an essential tool for anyone
working with the 8051 microcontroller and developing applications for embedded systems. It
provides a versatile, cost-effective, and user-friendly platform for experimentation, learning,
and development, while also saving time and effort and offering expandability for future
projects.
5
CHAPTER 2
LITERATURE SURVEY
6
offers a lot more general purpose LEDs and switches are connected to IO pins on the
microcontroller the jumpers and their connected to pins can be disabled if you wish to use the
IO pins on the microcontroller for other purpose. The board is compatible with the
AT89S51/52 microcontrollers. The board is perfect if you are just starting out with 8051
programming and also if you want a reliable tried and tested board far building advanced
project based on it.
A "Thermal- Electrical Simulation and Analysis of Lm7805 IC for Electronics Power
Supply Adapter" as per [3]. LM7805 IC is a fixed linear voltage regulator. The difference in
the value of input voltage and output voltage comes as a heat. Now a days, the failure rate of
an LM7805 IC increases exponentially with respect to their temperature variations. In the
existing system, Aluminium is used as a heat sink to transfer the heat and aluminium heat
sink reaches its limitations to transfer heat in a LM7805 IC chip. In this work, Aluminium
heat sink is replaced by Aluminium Nitride. The electrical properties, heat dissipation,
reliability and power consumption of Aluminium Nitride heat sink are analysed by using
simulation software's (ANSYS and Multisim) .It is found that the Aluminium Nitride heat
sink has lower current density, higher heat dissipation, highly reliable and less power
consumption than that of Aluminium heat sink.
A "Voltage Regulators" as per [4]. Voltage Regulators, Line Regulation, Load
Regulation, Series and Shunt Regulator, Positive and Negative Voltage Regulators (78XX,
7805 to 7824 & 79XX, 7905 to 7924), Adjustable and Fixed Voltage Regulator, LM Series
Voltage Regulator, IC Voltage Regulators, Switching Voltage Regulators etc.
A "The new form of electro thermal model of MA7805 positive voltage regulator" as
per [5]. This paper presents the problem of modelling the linear 3-terminal positive-voltage
regulator MA7805 (IC) with self-heating taken into account. In the construction of the
Electro thermal Macro model (ETM) the modified electrical SPICE-library model of the
considered device has been used. This micro model has been implemented to SPICE with the
use of the ABM option. The proposed micro model was verified experimentally and a good
agreement between the calculation and measurement results was obtained.
7
CHAPTER 3
SYSTEM DEVELOPMENT
3.2 MICROCONTROLLER
A microcontroller (MCU for microcontroller unit, also MC, UC, or μC) is a small
computer on a single VLSI integrated circuit (IC) chip. A microcontroller contains one or
more CPUs (processor cores) along with memory and programmable input/output
peripherals. Program memory in the form of ferroelectric RAM, NOR flash or OTP ROM is
also often included on chip, as well as a small amount of RAM. Microcontrollers are
8
designed for embedded applications, in contrast to the microprocessors used in personal
computers or other general purpose applications consisting of various discrete chips.
In modern terminology, a microcontroller is similar to, but less sophisticated than, a
system on a chip (SoC). A SoC may connect the external microcontroller chips as the
motherboard components, but a SoC usually integrates the advanced peripherals like graphics
processing unit (GPU) and Wi-Fi interface controller as its internal microcontroller unit
circuits.
A clean 5V supply is required to run the microcontroller before we can even begin to
experiment, so we need this as a basic requirement. Most microcontrollers will work from 5V
but there are some extended range variants that will work at anything from 2V upwards. It
can very useful if we are interfacing to circuits that don't operate at 5V, to be able to run the
W78E052DDG microcontroller at this lower voltage and dispense with any unnecessary level
shifters but for motors we required +12V
9
3.3.1 CIRCUIT DIAGRAM
10
All voltage sources cannot able to give fixed output due to fluctuations in the circuit.
For getting constant and steady output, the voltage regulators are implemented. The
integrated circuits which are used for the regulation of voltage are termed as voltage regulator
ICs. Here, we use the IC 7805 as voltage regulator.
The voltage regulator IC 7805 is actually a member of the 78xx series of voltage
regulator ICs. It is a fixed linear voltage regulator. The xx present in 78xx represents the
value of the fixed output voltage that the particular IC provides. For 7805 IC, it is +5V DC
regulated power supply. This regulator IC also adds a provision for a heat sink. The input
voltage to this voltage regulator can be up to 35V, and this IC can give a constant 5V for any
value of input less than or equal to 35V which is the threshold limit.
11
3.5 OSCILLATOR CIRCUIT
12
3.6 SERIAL INTERFACE
A serial interface is a communication interface that transmits data one bit at a time
over a single communication channel. It is used to transfer data between electronic devices or
systems, such as a computer and a printer, or between microcontrollers and sensors.
A serial interface typically uses a transmitter to convert parallel data into a serial bit
stream, and a receiver to convert the serial data back into parallel data. The serial data is
transmitted using a protocol that specifies the format of the data, the speed of transmission,
and the error checking mechanisms.
Serial interfaces can be either synchronous or asynchronous. In a synchronous
interface, the transmitter and receiver are synchronized with a clock signal that is transmitted
along with the data. In an asynchronous interface, the transmitter and receiver are not
synchronized with a clock signal, and instead use start and stop bits to indicate the beginning
and end of each data packet.
Some common examples of serial interfaces include RS-232, SPI (Serial Peripheral
Interface), I2C (Inter-integrated circuit), UART (universal synchronous receiver/Transmitter),
and USB (Universal Serial Bus).
13
3.6.1 RS232 INTERFACE
3.6.2 MAX232 IC
MAX232 is a popular integrated circuit (IC) that is commonly used in serial
communication circuits. It is specifically designed to convert the signals between the RS-232
serial interface and the TTL (transistor-transistor logic) interface used by microcontrollers
and other digital devices. The MAX232 is a dual driver/receiver, which means it has two
channels that can send and receive serial data. The device operates using a single 5-volt
power supply and requires only a few external capacitors to function.
14
Figure 3.6.2: MAX232 Structure
The MAX232 has a wide range of applications and is commonly used to connect
microcontrollers to PCs, modems, and other serial devices. It is often used in industrial
control systems, robotics, and other applications that require reliable serial communication.
The MAX232 IC is designed to withstand voltage spikes and electrostatic discharges (ESD)
and is available in various package types, including the DIP (Dual Inline Package) and SOIC
(Small Outline Integrated Circuit) packages. The device has become a popular choice due to
its ease of use and low cost.
15
Figure 3.7.1: LED Interface
An LED interface circuit typically consists of a power supply, a resistor, and an LED.
The resistor is used to limit the amount of current that flows through the LED and prevent it
from burning out. The power supply provides the voltage needed to operate the LED, and the
LED emits light when current flows through it.
LEDs can be controlled using a microcontroller or other digital circuitry by using a transistor
or other switching device to turn the LED on and off. PWM (pulse-width modulation) can
also be used to adjust the brightness of an LED by rapidly turning it on and off at a specific
frequency. LED interfaces can also include additional components, such as drivers and
amplifiers, to increase the current and voltage available to the LED and improve its
performance. LED drivers can be used to provide constant current to the LED, while
amplifiers can be used to increase the voltage and current available to the LED.
Overall, LED interfaces can be simple or complex depending on the specific application, and
can be designed to meet a wide range of requirements for controlling and manipulating the
behaviour of an LED.
16
3.8 16 x 2 LCD INTERFACE
17
3.9 SEVEN SEGMENT DISPLAY INTERFACE
18
3.10 DC MOTOR INTERFACE
19
3.11 STEPPER MOTOR INTERFACE
20
3.12 RELAY INTERFACE
21
3.13 SWITCH INTERFACE
22
3.15 MATRIX KEY-BOARD INTERFACE
23
3.16 ANALOG TO DIGITAL CONVERTER INTERFACE
24
3.17 DIGITAL TO ANALOG CONVERTER INTERFACE
25
3.18 BUZZER
26
3.19 PROCEDURE OF SYSTEM DEVELOPMENT
To make an 8051 microcontroller development board, we followed the below procedure:
1. First, we designed the circuit schematic using a PCB design software like Eagle,
Proteus, or Altium Designer. We included all the required components like 8051
microcontroller, crystal oscillator, capacitors, resistors, LEDs, push-buttons, and other
necessary components in the circuit schematic.
2. After designing the circuit schematic, we created the PCB layout using the same
software. We placed the components on the PCB board and made sure that all the
connections were properly routed.
3. Once the PCB layout was ready, we printed it on a transparent film using a laser
printer. Then, we used a UV light box to transfer the printed image onto a blank
copper-clad board. The copper-clad board was coated with a photoresist layer, which
got hardened upon exposure to UV light, and unexposed areas remained soft and
easily removable.
4. After exposing the PCB board to UV light, we removed the unexposed photoresist
layer using a developer solution. The developer solution removed the soft and
unexposed photoresist layer, leaving the hard photoresist layer on the copper surface.
5. We then etched the PCB board using an etching solution, which removed the copper
from the unmasked areas. This exposed the copper tracks and pads of the PCB board.
6. After etching, we washed the PCB board with water to remove any residual etchant
and photoresist. Then, we drilled holes on the PCB board using a drill machine, which
allowed us to mount the components.
7. We soldered the components onto the PCB board, making sure that all the
connections were properly soldered and no short circuits were formed.
8. After soldering, we tested the PCB board for functionality and verified that all the
components were working correctly. If any issues were found, we fixed them by
reworking the board.
27
9. Finally, we mounted the PCB board into a suitable enclosure and connected it to a
power supply, allowing us to program and test the 8051 microcontroller development
board.
Overall, the process of making a 8051 microcontroller development board involved designing
the circuit schematic, creating the PCB layout, transferring the layout onto the copper-clad
board, etching the board, drilling holes, soldering components, testing for functionality, and
finally mounting the board into an enclosure.
i. Sign Up: The first step is to sign up for an account on EasyEDA. Once you sign up,
you will be taken to the EasyEDA homepage.
ii. Open EasyEDA Editor: On the homepage, click on the "Launch EasyEDA" button to
open the EasyEDA editor.
iii. Create New Project: Once the EasyEDA editor opens, create a new project by clicking
on the "Create a New Project" button on the top left corner of the page.
iv. Schematic Design: The next step is to create a schematic design for the PCB. Click on
the "Schematic" button on the left-hand side of the screen and use the tools to add
components and draw the circuit diagram.
v. PCB Layout Design: After completing the schematic design, click on the "Convert
Project to PCB" button. This will open the PCB Layout design window. Here, you can
place the components in the desired position and connect them with copper tracks.
vi. Adding Components: In the PCB Layout window, click on the "Add Component"
button and search for the required component from the EasyEDA library or upload
your own component.
vii. Placing Components: Drag and drop the components onto the PCB layout area and
position them as required.
viii. Routing: Connect the components with copper tracks. You can use the auto-router
tool or manually route the tracks.
ix. Generating Gerber Files: After completing the PCB layout design, click on the
"Gerber Output" button to generate the Gerber files for manufacturing the PCB.
28
x. Order PCB: After generating the Gerber files, you can order the PCB from the
EasyEDA website or download the Gerber files and send them to a PCB manufacturer
of your choice.
xi. Finalize and Export: Once you are satisfied with your PCB design, finalize and export
the project in EasyEDA format to save it for future use.
That's it! These are the steps involved in creating a PCB on EasyEDA.
Name of Component
Sr. No. Name of Component Rate Quantity Total Price
29
14. LM7805 IC 7/- 1 7/-
Name of Equipment
30
CHAPTER 4
SYSTEM ANALYSIS (PROGRAMMING)
#include<reg51.h>
Void main ()
{
While (1)
{
P1=0x00; // Set all output pins to 0
Delay (1000); // Delay for 1 second
P1=0xFF; // Set all output pins to 1
Delay (1000); // Delay for 1 second
}
}
31
ACALL DELAY; Call the delay subroutine
CPL P1; Complement the output of Port 1
SJMP LOOP; Jump back to LOOP
#include <reg51.h>
#define LCD_Data_Port P2
Sbit RS = P3^0;
Sbit RW = P3^1;
Sbit EN = P3^2;
Void main ()
{
LCD_Init (); // Initialize the LCD Display
LCD_Cmd (0x80); // Set cursor to the first line
LCD_Data (‘H’); // Send ‘H’ character to display
LCD_Data (‘E’); // Send ‘E’ character to display
LCD_Data (‘L’); // Send ‘L’ character to display
LCD_Data (‘L’); // Send ‘L’ character to display
32
LCD_Data (‘O’); // Send ‘O’ character to display
LCD_Cmd (0xC0); // Set cursor to the second line
LCD_Data (‘W’); // Send ‘W’ character to display
LCD_Data (‘O’); // Send ‘O’ character to display
LCD_Data (‘R’); // Send ‘R’ character to display
LCD_Data (‘L’); // Send ‘L’ character to display
LCD_Data (‘D’); // Send ‘D’ character to display
While (1);
}
Void LCD_Init ()
{
LCD_Cmd (0x38); // 2 Line, 5x7 matrix
LCD_Cmd (0x0C); // Display On, Cursor Off, Blink Off
LCD_Cmd (0x01); // Clear the LCD
LCD_Cmd (0x06); // Increment Cursor (Right Shift)
}
33
EN = 1; // Enable LCD
Delay (10); // Wait for some time
EN = 0; // Disable LCD
}
34
MOV A, #’L’; Send ‘L’ to Display
ACALL SEND_DATA; Send Data to LCD
MOV A, #’L’; Send ‘L’ to Display
ACALL SEND_DATA; Send Data to LCD
MOV A, #’O’; Send ‘O’ to Display
ACALL SEND_DATA; Send Data to LCD
MOV A, #’ ‘; Send Space to Display
ACALL SEND_DATA; Send Data to LCD
MOV A, #’W’; Send ‘W’ to Display
ACALL SEND_DATA; Send Data to LCD
MOV A, #’O’; Send ‘O’ to Display
ACALL SEND_DATA; Send Data to LCD
MOV A, #’R’; Send ‘R’ to Display
ACALL SEND_DATA; Send Data to LCD
MOV A, #’L’; Send ‘L’ to Display
ACALL SEND_DATA; Send Data to LCD
MOV A, #’D’; Send ‘D’ to Display
ACALL SEND_DATA; Send Data to LCD
END; End of Program
SEND_CMD:; Function to Send Command to LCD
MOV P1, A; Move Command to P1 Port
CLR P0.0; Clear RS Pin to Select Instruction Register
CLR P0.1; Set RW Pin to Write Mode
SETB P0.2; Enable LCD
ACALL DELAY; Delay for some time
CLR P0.2; Disable LCD
RET; Return from Function
SEND_DATA: ; Function to Send Data to LCD
MOV P1, A; Move Data to P1 Port
SETB P0.0; Set RS Pin to Select Data Register
CLR P0.1; Set RW Pin to Write Mode
SETB P0.2; Enable LCD
ACALL DELAY; Delay for some time
35
CLR P0.2; Disable LCD
RET; Return from Function
DELAY:; Function to Generate Delay
MOV R7, #250; Load R7 with 250
L1: MOV R6, #184; Load R6 with 184
L2: DJNZ R6, L2; Decrement R6 and Jump to L2 if not zero
DJNZ R7, L1; Decrement R7 and Jump to L1 if not zero
RET; Return from Function
36
Assembly Language Program for seven segment display Interface with 8051.
ORG 0H
MOV P1, #0FFH
MOV DPTR, #LUT
MOV R0, #00H
MOV A, R0
MOVX A, @DPTR
MOV P2, A
CALL DELAY
INC R0
CJNE R0, #10H, LOOP
MOV R0, #00H
SJMP LOOP
DELAY:
MOV R1, #0FFH
AGAIN:
DJNZ R1, AGAIN1
DJNZ R2, AGAIN
RET
AGAIN1:
RET
LUT: DB 0C0H,0F9H,0A4H,0B0H,099H,092H,082H,0F8H,080H,090H
END
37
While (1)
{
A=P1; //Read input from Port 1
If (a==0x01) //If input is 0x01, rotate motor clockwise
{
P0=0x05; //Output signals to L293D IC
}
Else if (a==0x02) //If input is 0x02, rotate motor counter clockwise
{
P0=0x0A; //Output signals to L293D IC
}
Else //If input is neither 0x01 nor 0x02, stop motor
{
P0=0x00; //Output signals to L293D IC
}
}
}
ORG 00H
MOV P1, #00H; Initialize Port 1
AGAIN: MOV A, P1; Read input from Port 1
CJNE A, #01H, ELSE1;If input is not 0x01, check for 0x02
MOV P0, #05H; If input is 0x01, rotate motor clockwise
SJ
ELSE1: CJNE A,#02H,ELSE2 ;If input is not 0x02, stop motor
MOV P0,#0AH ;If input is 0x02, rotate motor counter clockwise
SJMP AGAIN
ELSE2: MOV P0,#00H ;If input is neither 0x01 nor 0x02, stop motor
SJMP AGAIN
END
38
.4.5 STEPPER MOTOR INTERFACE
#include<reg51.h>
Void delay(unsigned int time)
{
Unsigned inti,j;
For(i=0;i<time;i++)
For(j=0;j<1275;j++);
}
Void main()
{
While(1)
{
P1=0x01;
Delay(100);
P1=0x02;
Delay(100);
P1=0x04;
Delay(100);
P1=0x08;
Delay(100);
}
}
ORG 00H
MOV P1, #00000001B
DELAY: DJNZ R0, DELAY
MOV P1, #00000010B
DELAY1: DJNZ R0, DELAY2
39
MOV P1, #00000100B
DELAY2: DJNZ R0, DELAY3
MOV P1, #00001000B
DELAY3: DJNZ R0, DELAY4
SJMP $
#include <reg51.h>
void main()
{
while(1)
{
relay = 1; // turn on the relay
delay(1000); // wait for 1 second
relay = 0; // turn off the relay
delay(1000); // wait for 1 second
}
}
40
}
LOOP:
MOV A, P3 ; Move the value of P3 to accumulator
ANL A, #01H ; Bitwise AND with 00000001 to check input status
JZ OFF ; If input is low, turn off relay
SJMP ON ; If input is high, turn on relay
ON:
SETB P1.0 ; Set P1.0 to high to turn on relay
SJMP LOOP ; Jump back to loop
OFF:
CLR P1.0 ; Clear P1.0 to low to turn off relay
SJMP LOOP ; Jump back to loop
#include<reg51.h>
void main()
{
unsigned char switch_state;
41
// Configure P1.0 as an input pin
P1 = 0xFF;
P1_0 = 1;
while(1)
{
// Read the state of the switch
switch_state = P1_0;
ORG 0H
MOV P1, #0FFH ; Configure P1 as input
SETB P1.0 ; Enable pull-up resistor
LOOP:
MOV A, P1.0 ; Read state of switch
CJNE A, #0, PRESSED ; If switch is pressed, jump to PRESSED
SJMP LOOP ; If switch is not pressed, continue looping
PRESSED:
; Do something
SJMP LOOP ; Continue looping
END
42
4.8 MATRIX KEYBOARD INTERFACE
#include<reg51.h>
#define keypad P1
sbit rs=P2^0;
sbit rw=P2^1;
sbit en=P2^2;
void main()
{
unsigned char key;
lcd_init();
while(1)
{
key = read_key();
if(key != ' ')
{
lcd_data(key);
delay(1000);
lcd_cmd(0x01);
}
}
}
43
void lcd_cmd(unsigned char command)
{
keypad = command;
rs = 0;
rw = 0;
en = 1;
delay(50);
en = 0;
}
void lcd_init()
{
lcd_cmd(0x38);
lcd_cmd(0x0E);
lcd_cmd(0x06);
lcd_cmd(0x01);
}
44
{
keypad &= 0x0F;
col = keypad;
keypad |= 0xF0;
keypad &= 0xF0;
row = keypad;
}while(col != keypad);
return (col | row);
}
45
case 0x7D: return '0';
case 0x7B: return '#';
case 0x77: return 'D';
default: return;
}
}
ORG 0000H
MOV P1,#0FFH
MOV P2,#000H
START:
CALL DELAY_MS ; Wait for debounce time
CALL SCAN_KEYBOARD ; Scan for key press
CJNE A,#00H,DISPLAY ; If key press detected, display key on LCD
JMP START ; Else, repeat the loop
DISPLAY:
MOV P2,#001H ; Select LCD command register
MOV A,R1 ; Load key value to accumulator
ACALL SEND_DATA ; Send key value to LCD
46
MOV P2,#000H ; Select LCD data register
ACALL DELAY_MS ; Delay to clear the display
MOV A,#01H ; Send clear display command to LCD
ACALL SEND_CMD
RET
SEND_CMD:
CLR P2.0 ; Enable RS and RW
CLR P2.1
SETB P2.2
ACALL DELAY_US ; Wait for enable pulse
CLR P2.2
RET
SEND_DATA:
SETB P2.0 ; Enable RS and RW
CLR P2.1
SETB P2.2
ACALL DELAY_US ; Wait for enable pulse
CLR P2.2
RET
SCAN_KEYBOARD:
MOV R0,#10H ; Load debounce time
MOV R1,#00H ; Initialize key value
MOV A,#0F0H ; Load initial column mask
MOV P1,A ; Output column mask to keyboard
CLR A ; Clear accumulator
CLR C ; Clear carry flag
MOV R2,#4 ; Initialize loop counter
LOOP1: ; Outer loop for scanning columns
ACALL DELAY_US ; Wait for keyboard response
MOV A,P1 ; Read row values
47
ANL A,#0F0H ; Mask off unused bits
CJNE A,#0F0H,FOUND_KEY ; If key press detected, jump to FOUND_KEY
RLC P1 ; Rotate column mask
DJNZ R2,LOOP1 ; Decrement loop counter, jump to LOOP1 if not zero
MOV A,#00H ; If no key press detected, clear key value
RET
FOUND_KEY: ; Inner loop for identifying key value
ANL A,#0FH ; Mask off column bits
MOV R3,#0FH ; Initialize loop counter
LOOP2: ; Loop for checking row values
RLC A ; Rotate row value
JNC SKIP ; If carry flag is not set, skip to next iteration
ADD A,R3 ; Add row value to key value
MOV R1,A ; Store key value in R1
RET ; Return from subroutine
SKIP:
DJNZ R3,LOOP2 ; Decrement loop counter, jump to LOOP2 if not zero
DELAY_US:
MOV R7,#2
L2: DJNZ R7,$
DJNZ R0,L2
RET
DELAY_MS:
MOV R6,#3
L1: MOV R7,#250
L3: DJNZ R7,$
DJNZ R6,L1
RET
END
48
4.9 ANALOG TO DIGITAL CONVERTER INTERFACE
Embedded c Program for analog to digital converter Interface With 8051.
#include <8051.h>
#define ADC0804_OUT P1
void delay() {
int i;
for (i = 0; i < 100; i++);
}
void main() {
unsigned char result;
while (1) {
// Select channel 0
P2 = 0x00;
// Enable ADC
P3 &= ~(1 << 0);
// Start conversion
P3 &= ~(1 << 1);
// Read result
result = ADC0804_OUT;
// Disable ADC
P3 |= (1 << 0);
49
// Do something with result
// ...
}
}
Assembly Language Program for Analog to Digital Converter Interface with 8051.
ORG 0H
DELAY:
MOV R5, #255
L1: DJNZ R5, L1
RET
MAIN:
MOV P3, #0H ; Disable ADC
LOOP:
MOV P2, #0H; Select channel 0
MOV P3.0, #1; Enable ADC
CALL DELAY
MOV P3.1, #1; Start conversion
WAIT:
JB P3.1, WAIT; Wait for conversion to finish
MOV A, P1; Read result
MOV P3.0, #0; Disable ADC
; Do something with result
; ...
SJMP LOOP ; Repeat
END
50
4.10 DIGITAL TO ANALOG CONVERTER INTERFACE:
Embedded c Program for Digital to Analog converter Interface With 8051.
#include<reg51.h>
void main()
{
unsigned int data;
while(1)
{
data = // get data from some source
DAC_CS = 0;
DAC_CLK = 0;
DAC_DATA = ((data & 0x800) >> 11);
DAC_CLK = 1;
DAC_DATA = ((data & 0x400) >> 10);
DAC_CLK = 0;
DAC_DATA = ((data & 0x200) >> 9);
DAC_CLK = 1;
DAC_DATA = ((data & 0x100) >> 8);
DAC_CLK = 0;
DAC_DATA = ((data & 0x80) >> 7);
DAC_CLK = 1;
DAC_DATA = ((data & 0x40) >> 6);
DAC_CLK = 0;
DAC_DATA = ((data & 0x20) >> 5);
DAC_CLK = 1;
DAC_DATA = ((data & 0x10) >> 4);
51
DAC_CLK = 0;
DAC_DATA = ((data & 0x8) >> 3);
DAC_CLK = 1;
DAC_DATA = ((data & 0x4) >> 2);
DAC_CLK = 0;
DAC_DATA = ((data & 0x2) >> 1);
DAC_CLK = 1;
DAC_DATA = ((data & 0x1));
DAC_CLK = 0;
DAC_CS = 1;
}
}
Assembly Language Program for Digital to Analog Converter Interface with 8051.
ORG 0H
52
SHIFT_BIT:
MOV C, A.7 ; Move MSB to carry
RLC A ; Rotate left
MOV DAC_DATA, C ; Set DAC_DATA according to the value of the carry
SETB DAC_CLK ; Set CLK high
CLR DAC_CLK ; Set CLK low
DJNZ R0, SHIFT_BIT ; Decrement counter and loop until all 12 bits have been shifted
RET
MAIN:
CALL INIT_DAC ; Initialize DAC
LOOP:
CALL CONVERT_TO_VOLTAGE ; Convert digital data to voltage
SJMP LOOP ; Repeat forever
END
#include<reg51.h>
void main()
{
P1=0x01; // set P1.0 as output
while(1)
{
P1_0=1; // Turn on the buzzer
53
delay_ms(500); // wait for 500 milliseconds
P1_0=0; // Turn off the buzzer
delay_ms(500); // wait for 500 milliseconds
}
}
Assembly Language Program for Buzzer Interface with 8051.
4.12 SOFTWARES
54
Features:
Project management: Keil uVision allows users to manage their projects within the IDE.
Users can create new projects, add files to existing projects, and manage project settings.
Code editing: The IDE includes a code editor with features such as syntax highlighting, code
folding, and auto-completion. It supports multiple programming languages, including C,
C++, and Assembly.
Compiler: Keil uVision includes a powerful compiler that can generate code for ARM-based
microcontrollers. It supports a variety of optimization options to help users generate efficient
code.
Debugger: The IDE includes a debugger that allows users to test and debug their code. The
debugger includes features such as breakpoints, watch windows, and memory views.
Simulation: Keil uVision includes a simulator that allows users to test their code without the
need for hardware. This is useful for testing and debugging code before deploying it to a
microcontroller.
Flash programming: The IDE includes a flash programming utility that allows users to
program microcontrollers directly from within the IDE.
Code analysis: Keil uVision includes a code analysis tool that can detect potential errors and
issues in code. This can help users identify and fix problems early in the development
process.
Keil uVision is widely used in the industry for developing software for ARM-based
microcontrollers. Its user-friendly interface and powerful features make it a popular choice
among developers. It supports a wide range of microcontrollers from different manufacturers,
including STMicroelectronics, NXP, and Texas Instruments. The IDE also supports a variety
of third-party tools and plugins, making it highly customizable.
55
Overall, Keil uVision is a powerful and flexible IDE for developing software for ARM-based
microcontrollers. Its features and capabilities make it an excellent choice for both beginners
and professionals alike.
Features:
- Schematic capture: Easy-EDA allows users to design electronic circuits using a drag and
drop interface. The platform provides a library of pre-built components that can be used in
designing circuits. Users can also create their own components to add to the library.
- PCB layout design: Easy-EDA has a built-in PCB layout editor that allows users to design
and customize the layout of their circuits. Users can also generate a 3D model of their PCB
design.
- Simulation: Easy-EDA has a built-in SPICE simulation engine that enables users to test and
verify the functionality of their circuit designs. It can simulate analog, digital, and mixed-
signal circuits.
- Collaboration: Easy-EDA allows users to share their circuit designs with others and
collaborate on projects in real-time. Users can also access shared designs from the EasyEDA
community library.
- Gerber export: Easy-EDA allows users to export their PCB designs in Gerber file format,
which is a standard format for manufacturing printed circuit boards.
- BOM generation: Easy-EDA can generate a Bill of Materials (BOM) based on the
components used in the circuit design. This makes it easy for users to order the required
components.
56
- Integration with online PCB fabrication services: Easy-EDA has integration with PCB-Way,
a popular PCB fabrication service that allows users to order their PCBs directly from within
the Easy-EDA platform.
Easy-EDA is an easy-to-use platform that does not require any prior experience in EDA tools.
The platform is cloud-based, which means users can access their designs from any device
with an internet connection. It also has a large community of users who contribute to the
platform by sharing their designs and components.
Overall, Easy-EDA is a powerful and flexible tool for designing and prototyping electronic
circuits. Its ease of use and integration with online fabrication services make it an excellent
choice for beginners and professionals alike.
The ISP-ICP Utility supports two programming modes: In-System Programming (ISP) and
In-Circuit Programming (ICP). The ISP mode allows the user to program the 8051
microcontroller while it is still connected to the target system. The ICP mode, on the other
hand, requires the microcontroller to be removed from the target system and programmed
externally.
The ISP-ICP Utility provides a user-friendly interface that allows the user to select the
programming mode, configure the programming parameters, and initiate the programming
process. It supports a wide range of file formats, including Intel HEX, Motorola S-record, and
Binary files.
The utility also includes a verification feature that checks whether the programmed code
matches the original file. This ensures that the programming process is successful and the
microcontroller is operating correctly.
57
In addition, the ISP-ICP Utility provides several advanced features, such as the ability to
program the microcontroller's fuse bits, configure the oscillator frequency, and erase the
entire program memory.
Overall, the Nuvoton ISP-ICP Utility is a powerful and versatile tool for programming
Nuvoton's 8051 microcontrollers. Its user-friendly interface and advanced features make it an
ideal choice for both novice and experienced users.
58
CHAPTER 5
CONCLUSION
6.1 CONCLUSION
The 8051 microcontroller development board is a versatile and cost-effective tool for
designing and testing microcontroller-based projects.
It has a user-friendly interface with a range of input/output options, making it suitable
for a variety of applications.
The board supports programming in both C and assembly languages.
It comes with a range of pre-loaded programs for testing and debugging.
The board has built-in USB ports, on-board voltage regulators, and a crystal oscillator
for stable clock generation.
It is an excellent choice for hobbyists, students, and professionals who need a reliable
and user-friendly platform for developing microcontroller-based projects.
6.2 ADVANTAGES
Versatility: The 8051 microcontroller development board is a versatile tool that can be
used for a variety of applications, from simple LED blinking projects to more
complex robotics and automation projects.
User-Friendly Interface: The board has a user-friendly interface with a range of
input/output options, making it easy to use and suitable for beginners and experts
alike.
Programming Flexibility: The board supports programming in both C and assembly
languages, giving users the flexibility to choose the programming language that best
suits their needs.
Pre-Loaded Programs: The board comes with a range of pre-loaded programs for
testing and debugging, making it easy for users to get started with their projects.
Built-In Features: The board has built-in USB ports, on-board voltage regulators, and
a crystal oscillator for stable clock generation, eliminating the need for external
components and simplifying the design process.
Cost-Effective: The 8051 microcontroller development board is a cost-effective
solution for designing and testing microcontroller-based projects, making it an ideal
choice for hobbyists, students, and professionals on a budget.
59
6.3 DISADVANTAGES
Limited Processing Power: The 8051 microcontroller has limited processing power
compared to newer microcontrollers, which may limit the complexity of the projects
that can be designed and tested using the development board.
Limited Memory: The 8051 microcontroller also has limited memory compared to
newer microcontrollers, which may limit the amount of data that can be stored and
processed.
Limited I/O Pins: The development board may have a limited number of input/output
(I/O) pins, which may limit the number and complexity of the devices that can be
connected and controlled.
Outdated Technology: The 8051 microcontroller is an older technology and may not
be compatible with newer components or systems, which may limit its usefulness for
some projects.
Limited Connectivity Options: The development board may have limited connectivity
options, which may make it difficult to interface with other devices or systems.
6.4 APPLICATION
Robotics: The 8051 microcontroller development board is commonly used in robotics
projects for controlling the movement and behaviour of robots.
Industrial Automation: The development board can be used in industrial automation
projects for controlling and monitoring various processes and machines.
Home Automation: The development board can be used in home automation projects
for controlling various devices and appliances, such as lights, fans, and air
conditioners.
Automotive Applications: The development board can be used in automotive
applications for controlling various systems, such as engine management, power
windows, and central locking systems.
Medical Devices: The development board can be used in medical devices for
monitoring and controlling various vital signs and other medical parameters.
Security Systems: The development board can be used in security systems for
controlling and monitoring various devices, such as alarms, CCTV cameras, and
access control systems.
60
Educational Projects: The development board is commonly used in educational
projects for teaching microcontroller programming and applications to students.
61
REFFERENCES
[1] Kumbhar Deepak S, Bhujbal Ramakant V. (2010) "Development and Use of Multi-
module 8051 Micro-controller Board for Teaching and Learning Micro-controller
Programming".
[2] Gregorious Jose C, Sreraj Chidambaran, Vishnuraj K M "8051 Modular Development
Board" International Journal of Scientific & Engineering Research, Volume 7, Issue 4,
(April-2016) 382 ISSN 2229-5518
[3] P.C. Mukesh Kumar, C.M. Arun Kumar, "Thermal- Electrical Simulation And Analysis
Of Lm7805 le For Electronics Power Supply Adapter" Indian J.Sci.Res. 20(2): 101-107.
2018, ISSN: 0976-2876 (Print) ISSN: 2250-0138(Online) [4] Vivek Arya, September
2020, "Voltage Regulators".
[4] Krzysztof Górecki, J. Zarebski "The new form of electrothermal model of MA7805
positive voltage regulator", January 2004 DOI:10.1109/ICECS.2003,1301704
[5] http://www.old-computers.com/MUSEUM/computer.asp?st=1&c=1147 Archived 2010-
11-21 at the Wayback Machine description of the National Semiconductor introkit
[6] Book: The 8051 Microcontroller and Embedded Systems: Using Assembly and C
[7] https://www.geeksforgeeks.org/microcontroller
[8] https://www.pantechsolutions.net/8051-advanced-development-board/
[9] https://www.electronicscomp.com/8051-development-board
[10] https://exploreembedded.com/wiki/8051_Development Board Setup
[11] https://blog.prayogindia.in/how-to-make-8051-microcontroller-development-board/
[12] https://exploreembedded.com/wiki/8051_Development Board Setup
[13] http://oldcomputers.net/kiml.html KIM was very popular with hobbyists
[14] why Kilobaud published KIM software"The MEK6800D2 system with MIKBUG".
Archived from the original on 1 October 2011.
[15] IEEE Nuclear Science Symposium Conference Record 2004. Rome: Institute of Electrical
and Electronics Engineers. 2004. p. 4161. ISBN 978-0780387003. Retrieved 23 April
2012.
[16] Jump up to:a b Rulph Chassaing (13 December 2004). Digital Signal Processing and
Applications with the C6713 and C6416 DSK. Wiley-Interscience. p. 497. ISBN 978 -
0471690078. Retrieved 23 April 2012.
[17] Paper by research design lab on Atmel Development board by "R. K Meheta" on 27
January 2005
62
APPENDIX
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81