Professional Documents
Culture Documents
CP RAM
U ROM A single chip
Seri
I/O Time
al
Port r
COM
Port Microcontroller
Companies Producing
8051/8952
• Some Companies Producing a Member of
the 8051/8952 Family
Company Web Site
Intel www.intel.com/design/mcs51
Atmel www.atmel.com
Philips/Signetics www.semiconductors.philips.com
Siemens www.sci.siemens.com
• Vcc ( pin 40 ):
– Vcc provides supply voltage to the chip.
– The voltage source is +5V.
• GND ( pin 20 ): ground
• XTAL1 and XTAL2 ( pins 19,18 ):
– These 2 pins provide external clock.
– Way 1 : using a quartz crystal oscillator
– Way 2 : using a TTL oscillator
– Example 4-1 shows the relationship between XTAL and the
machine cycle.
Pins of 8051 ( 2/4 )
• RST ( pin 9 ): reset
– It is an input pin and is active high ( normally low ) .
• The high pulse must be high at least 2 machine cycles.
– It is a power-on reset.
• Upon applying a high pulse to RST, the microcontroller will
reset and all values in registers will be lost.
• Reset values of some 8051 registers
– Way 1 : Power-on reset circuit
– Way 2 : Power-on reset with debounce
Pins of I/O Port
Vcc
10
K
P0.0
DS500 P0.1
Port 0
0 P0.2
P0.3
8751 P0.4
P0.5
8951 P0.6
P0.7
Registers
A
R0
R1
R2 PC PC
R3
R5
R6
R7
0 0 0 00H-07H
0 1 1 08H-0FH
1 0 2 10H-17H
1 1 3 18H-1FH
Stack in the 8051
• The register used to access
7FH
the stack is called SP (stack
pointer) register. Scratch pad RAM
30H
● But how do we
get the
programs onto
the devices?
WITH THE USE OF KEIL
SOFTWARE
• Write a program in embedded C
language.
• Execute it.
• View the output of program on
peripheral devices as provided in Keil
software.
• Now burn the program on AT89C52
using burner.
• Now apply the chip with hardware.
Interfacing
• hardware or software used to
interface two computers or programs
or devices
Interfacing used
• LED
• Seven Segment Display
• LCD Display
• Stepper Motor
• Switch
• Buzzer
AUTOMATIC CAR PARKING
• Block Diagram
• Layout
• Circuit Diagram
BLOCK DIAGRAM
STEPPER MOTOR
STEPPER MOTOR
• This animation demonstrates the principle for a stepper motor using full
step commutation. The rotor of a permanent magnet stepper motor
consists of permanent magnets and the stator has two pairs of windings.
Just as the rotor aligns with one of the stator poles, the second phase is
energized. The two phases alternate on and off and also reverse
polarity. There are four steps. One phase lags the other phase by one
step. This is equivalent to one forth of an electrical cycle or 90°.
STEPPER MOTOR