Upload
arkhom-jodtang
View
119
Download
3
Embed Size (px)
Citation preview
1
MICROCONTROLLER MCS-51: APPLICATIONSArkhom JODTANGCivil Aviation Training Center
2
Microcontroller ApplicationsContents Operation voltage of MCS51 Input / Output Port Register Connecting to various Output Devices
LEDs Double LEDs RGB-LED 7-Segment Matrix LCD Display Transistors (Current Amplification) Relays Servo Motors Stepper Motor
3
Operation voltage of MCS51 Operation voltage of MCS51 is 5 volts and
microcontroller work in digital concept, so all input, output and communication devices to attaching to port 1, 2 and 3 must work on 5 volts too.
Except port 0 (Open collector), Load able to connect with any level of supply able to drain current to ground with port 0. Make sure that drain current not over specification.
4
Port 0 (Open collector property)
Make sure that drain current not over specification.
Microcontroller
Microcontroller Relay
5
Input / Output Port RegisterRelative register of Port 0 is P0Relative register of Port 1 is P1Relative register of Port 2 is P2Relative register of Port 3 is P3
Any input, Output and Communication devices connect to ports of MCS51
Input devices: current value of relative register are equal to signal given from input devices. Such as MOV Acc, P2Output Devices: Send data to connected output devices by assign value to relative register of ports.Such as MOV P1, Acc
6 Output Devices
7
LEDs
8
Double LEDsON: LED REDMOV P2, #00000001B
ON: LED GREENMOV P2, #10000000B
9
RGB LEDs
Ground
P1.0
P1.1
P1.2
With PWM the LED is turned on and off many times per second. By adjusting duty percentage, the brightness of each color the LED can be controlled.
Image from: en.wikipedia.orgImage from: www.protostack.com/blog/2011/06/atmega168a-pulse-width-modulation-pwm/
10
7-Segment Display
http://www.buildcircuit.com/digital-object-counter/
11
Matrix LCD Display
12
Transistors (as a Current Amplification)
Images form http://www.w9xt.com/page_microdesign_pt7_transistor_switching.html
Coil load
13
Relay
14
Servo Motor
Image from: www.arduitronics.com Image from: inexglobal.com
A servo is a device that will provide actuation for a mechanical system. They come in many different shapes, sizes and detail specifications such Torque, Speed and Capable rotation angle. The servo has three input wires. A pair for a 4-6 VDC supply and a wire for signal control of the arm (PWM : Pulse Width Modulation)
Supply (+)
Ground (0 V.)
Signal Control
15
Servo Motor
16
Servo Motor
https://robomark.wordpress.com/tag/robotics-servo-dspic/
17
Servo Motor (RC Aircraft)
http://www.rcgroups.com/forums/showthread.php?t=1812847
18
Servo Motor (RC Aircraft)
http://arxangelrc.blogspot.com/2014/04/volantexrc-firstar-impressive-mini-pusher-park-flyer.html
19
Servo Motor (RC Aircraft)
http://arxangelrc.blogspot.com/2014/04/volantexrc-firstar-impressive-mini-pusher-park-flyer.html
20
Stepper Motor
Image from: http://www.matrixtsl.com/courses/itm/index.php?n=AddingOutputs.StepperMotors Image from: https://www.super-tech.com/root/itm.asp?p1=ITM-MOTORS
Stepper motors work in a different way to the motors just discussed. Instead of rotating smoothly, they do so in 'steps'. A control pulse is needed to make the motor move to the next position. The advantage of this is that the rotation can be precisely controlled - ten pulses means a rotation through ten steps. With a conventional motor, it is pot-luck where it stops spinning.
21
Stepper Motor
Image from: http://www.matrixtsl.com/courses/itm/index.php?n=AddingOutputs.StepperMotors
a
b
cd
22
Such as• Dual Motor Driver
Circuit Module
23
Dual Motor Driver THIS L293D DRIVER MODULE IS A MEDIUM POWER MOTOR DRIVER PERFECT FOR DRIVING DC MOTORS AND STEPPER MOTORS. IT USES THE POPULAR L293D MOTOR DRIVER IC. IT CAN DRIVE 4 DC MOTORS IN ONE DIRECTION, OR DRIVE 2 DC MOTORS IN BOTH THE DIRECTIONS.