Parallel Port Interfacing

Slides:



Advertisements
Similar presentations
Transducers PHYS3360/AEP3630 Lecture 33.
Advertisements

Week4. Program Branching  From what we have covered so far, our assembly programs execute one instruction after another in sequence  Programs that solve.
Autumn 2012C.-S. Shieh, EC, KUAS, Taiwan1 The 8051 Family Microcontroller Chin-Shiuh Shieh Department of Electronic Engineering.
Week10 Boolean Instructions on the Boolean Instructions  Boolean (or Bit) addressable capability is unique to the 8051  Enables efficient handling.
1 Chapter 3 Jump, Loop, and Call Instructions. 2 Sections 3.1 Loop and Jump Instructions 3.2 Call Instructions 3.3 Time Delay Generation and Calculation.
Controller Systems Tufts EMID - Spring Typical Controller System Sensors Acquisition System (Arduino) Mapping Software (Max) Output (Reason)
Unit 4 Sensors and Actuators
Interfacing ADC to 8051.
Interfacing of 8051 UNIT 4.
[HW] 2015 – sensors purpose of a sensor:
The Mechatronics Design Lab Course at the University of Calgary Presented June 2, 2003.
Rotational Sensors By Erik Flum. Types of Sensors Optical Encoder Resolver Rotary Variable Differential Transformer(RVDT) Synchro Rotary Potentiometer.
kashanu.ac.ir Microprocessors 10-1 IO Devices Stepper Motors DAC, ADC, PPI Lec note 10.
Lecture on Measurement of Non-Electrical Quantities
EKT314/4 Electronic Instrumentation
Topic 1 different attributes that characterize sensors ETEC 6405.
MICROCONTROLLER INSTRUCTION SET
Transducers/Sensors Transducer/sensor converts a non- electrical quantity, measurand, into a related electrical output signal Ideally there is a linear.
CoE3DJ4 Digital Systems Design Chapter 3: instruction set summary.
Prof. Cherrice TraverEE/CS-152: Microprocessors and Microcontrollers The 8051 Assembly Language.
1LAKSHMI.B.E.. Full step -clock 2LAKSHMI.B.E. Full step –anti clock 3LAKSHMI.B.E.
LSU 06/04/2007Electronics 61 Data Acquisition Electronics Unit – Lecture 6 Sensors and Transducers Signal conditioning Data sampling and recording.
DC MOTOR LAKSHMI.B.E.. DC MOTOR WORKING LAKSHMI.B.E.
Instrumentation & Control Engg. Section Electrical Engineering Department Ahmedabad , Gujarat.
The 8051 Assembly Language Branching & Subroutines
OBJECTIVE Without reference, identify at least four out of six principles pertaining to the application of transducers related to patient care.
Lecture 9: Modeling Electromechanical Systems 1.Finish purely electrical systems Modeling in the Laplace domain Loading of cascaded elements 2.Modeling.
Projects 8051.
UNIT-IV 8255 PPI Various Modes Of Operation Interfacing To 8086.
Stepper motor. Stepper Motor Interfacing Stepper motor is a widely used device that translates electrical pulses into mechanical movement. Stepper motor.
MICRO CONTROLLER PROGRAMMING & APPLICATIONS UNIT V Mr. S. VINOD LECTURER EEE DEPARTMENT.
EE/CS-352: Embedded Microcontroller Systems Part V The 8051 Assembly Language Interrupts.
EE 4BD4 Lecture 14 Position Sensors 1. Types of Sensors Potentiometers and linear resistors Capacitive sensors (mm distances, e.g. capacitive microphone)
I/O Devices Switches, LED, LCD
1. 2 Meghanathi Gaurang k ( ) Pandey Prashant D ( ) Mishra sandip R ( )
PROJECT TITLE METRO TRAIN PROTOTYPE USING 8051 MICROCONTROLLER By-RAVI MUNDRA.
Additional information on Passive Probes (10x) Take note that the scope’s input capacitance, C in must falls within the probe’s compensation range For.
Automatic Room Lightening By: Piyush Garg- UE94048 Prince Dhadwal- UE94053 Sahil Arora- UE94062 Sonam Rigzin-UE940.
One area where in which microprocessor and microcomputers have a major impact is industrial processor control systems. Process control involves first.
Mechatronics – a design process that includes
A PRESENTATION ON EMBEDDED SYSTEM
Parallel Input/Output
Interfacing of LCD with µP
Lecture Set 5 The 8051 Instruction Set.
Microcontroller Bharat Sankhlecha
Data Acquisition Systems
Robotics Sensors and Vision
The 8051 Family Microcontroller
Data Processing Instructions
Microprocessors and Applications ANITS MP ADC – IC 0808, DAC – IC 7523
EMT 348: Microcontroller Timer/counter
Output Relay, Optoisolator, and Stepper motor interfacing with AVR
8051 Single Board Computer (SBC) Version 1.0
Engineering 4862 Microprocessors Lecture 25
On Subject Instrumentation Electrical Engg 4th Sem
Timer.
Introduction to Micro Controllers & Embedded System Design Instruction set Department of Electrical & Computer Engineering Missouri University of Science.
Microprocessor Lab CSL1543 0:0:2
Subroutines and the Stack
Microcontroller 8051 Made By: Arun Branch. 4th Sem. I&C Engg.
Table Construction.
Introduction to Micro Controllers & Embedded System Design Instruction set Department of Electrical & Computer Engineering Missouri University of Science.
Presentation of Robotics (3)
DMT 245 Introduction to Microcontroller
First Design Key board R L S.
Sensors and actuators Sensors Resistive sensors
Compiled by Dr. N.Shanmugasundaram, HOD, ECE Dept, SECE.
Addressing Modes in 8051 MC S. Lourduraj Asst. Prof. of Physics
Data Acquisition Electronics Unit – Lecture 6
PROCESSORS & CONTROLLERS
Presentation transcript:

Parallel Port Interfacing Unit 3 Parallel Port Interfacing

Interfacing of 8051 with DAC 0808

Interfacing

Program To Generate Triangular Wave ORG 0000H MOV A, #00H RISE: MOV P1, A INC A CJNE A, #0FFH, RISE FALL: MOV P1, A DEC A CJNE A, #00H, FALL SJMP RISE END

Sine Wave Generation Angle in Degrees (Ɵ) Sin(Ɵ) Count= 2.5+(2.5×sinƟ) 2.5 128 30 0.500 3.75 192 60 0.866 4.66 239 90 0.999 4.99 256 120 0.865 150 0.499 3.74 180 0.001 2.49 210 0.501 1.24 64 240 0.33 17 270 0.002 300 -0.864 0.337 330 0.497 1.255 360 0.0025 2.506

Program To Generate Sine wave ORG 0000H MOV R0, #30H ;Starting Address ; Store the Calculated Values on address from 30H MOV @R0, #128 INC R0 MOV @R0, #192 MOV @R0, #239 MOV @R0, #256

MOV @R0, #239 INC R0 MOV @R0, #192 MOV @R0, #128 MOV @R0, #64

MOV R0, #30H HERE: MOV P1,@R0 INC RO CJNE R0, #3CH, HERE MOV R0,#30H SJMP HERE END

Interfacing of Stepper Motor with 8051

Stepper Motor Structure

Full-Step Stepper Motor Coil1 Coil2 Coil3 Coil4 1 I 0CH 2 06H 3 03H 4 09H

Half-Step Stepper Motor

Half-Step Stepper Motor Coil1 Coil2 Coil3 Coil4 Hex 1 I 08H 2 0CH 3 04H 4 06H 5 02H 6 03H 7 01H 8 09H

Interfacing

ULN 2003 Driver IC

Write a Program to rotate a motor 117o in clockwise direction Write a Program to rotate a motor 117o in clockwise direction. The motor has step angle of 1.80 1 step = 1.80 Steps= 1170 X= 𝟏𝟏𝟕 𝟏.𝟖 =65 65 steps are to be given to stepper motor.

ORG 0000H MOV R0, #30H ;Starting Address ; Store the Calculated Values on address from 30H MOV @R0, #0CH INC R0 MOV @R0, #06H MOV @R0, #03H MOV @R0, #09H

MOV R0, #30H MOV R1,#65 HERE: MOV P1,@R0 INC RO DJNZ R1, NXT SJMP LAST NXT: CJNE R0, #33H, HERE MOV R0,#30H SJMP HERE LAST: END

Interfacing of Motion Detectors with 8051 Motion Detector Sensors: Passive Infrared (PIR) MircoWave (MW) Area Reflective Type(IR) Ultrasonic Vibration

Passive InfraRed Sensor(PIR)

Working Principle

InfraRed Sensor

Ultrasonic Sensor

Working Principle

Interfacing of PIR sensor with 8051

PIR EQU P2.4 LED EQU P2.3 ORG 0000H L1: JNB PIR, L1 SETB LED L2: JB PIR, L2 CLR LED SJMP L1 END

Interfacing of LM35 with 8051

Interfacing of LCD and LM35 with 8051 via ADC 0808

SEL_A EQU P3. 1 _ SEL_B EQU P3. 2 \ SEL_C EQU P3. 3 | ALE EQU P3 SEL_A EQU P3.1 _ SEL_B EQU P3.2 \ SEL_C EQU P3.3 | ALE EQU P3.4 > ADC START EQU P3.5 | EOC EQU P3.6 | OE EQU P3.7 / ADC_DATA EQU P1 _ RS EQU P2.0 | RW EQU P2.1 > LCD EN EQU P2.2 _|

ORG 0000H MOV A, #02H ACALL CMD MOV A, #38H MOV A,#0EH

MOV ADC_DATA, #0FFH ;DATA PORT TO INPUT SETB EOC ;EOC AS INPUT CLR ALE CLR OE CLR START ;REST OF OUTPUT SIGNALS MAIN: MOV A,#80H ACALL CMD SETB SEL_A CLR SEL_B CLR SEL_C ;SELECT ANALOG CHANNEL 1 SETB ALE ;LATCH CHANNEL SELECT SETB START ;START CONVERSION

CLR ALE CLR START HERE: JB EOC, HERE ;WAIT FOR END OF CONVERSION HERE1:JNB EOC, HERE1 SETB OE ;ASSERT READ SIGNAL MOV A, ADC_DATA ; READ DATA ;ADC DATA IS NOW IN ACCUMULATOR CLR OE ;START OVER FOR NEXT CONVERSION

MOV B,#256 DIV A,B MOV B,#50 MUL AB MOV B,#10

MOV R1,A ANL A,#11110000 SWAP A MOV B,#30H ADD A,B ACALL DISP MOV A,R1 ANL A,#00001111

MOV A,#83H ACALL CMD MOV A,#"C" ACALL DISP SJMP MAIN

CMD: ACALL INIT MOV P0,A CLR RS CLR RW SETB EN CALL DELAY CLR EN RET DISP: ACALL INIT MOV P0,A SETB RS CLR RW SETB EN ACALL DELAY CLR EN RET

;POLLING FUNCTION INIT: CLR EN CLR RS MOV P1, #0FFH SETB RW L1: SETB EN JB P1.7, L1 DELAY: MOV R3, #10 L1: MOV R4, #250 L2: DJNZ R4, L2 DJNZ R3, L1 RET END

Frequency Counter using 8051

Frequency Counter using 8051

Data Acquisition System

Sensors Sensor Phenomenon Thermocouple, RTD, Thermistor Temperature Photo Sensor Light Microphone Sound Strain Gage, Piezoelectric Transducer Force and Pressure Potentiometer, LVDT, Optical Encoder Position and Displacement Accelerometer Acceleration pH Electrode pH

Signal Conditioning Amplification Excitation Linearization Cold-Junction Compensation Filtering Isolation High Impedance RMS Signal Conditioning

Example of DAS

Optocoupler