dfp2

10
USE OF MICROPROCESSORS FOR SEQUENCING

Upload: nsankarme

Post on 30-Jul-2015

12 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: Dfp2

USE OF MICROPROCESSORS FOR SEQUENCING

Page 2: Dfp2

MICROPROCESSORS CONSTRUCTION

• Power supply • Microprocessors• Memory• Input-output• Bus

Page 3: Dfp2

PROGRAMMING THE MICROPROCESSOR

• Low –level language programming (OR)• High –level language programming

Page 4: Dfp2

Low –level language programming• Hexadecimal number system used for this.• Hexadecimal number is to a base of 16.• The digits from 1to9 and A,B,C,D,E,F. assembly

language is a symbolic from of machine code.

Machine code Assembly language Explanation

3E LDA n Load accumulator A with data n

18 JR, DIS Jump relative

CD CALL nn Call subroutine at address nn

Page 5: Dfp2

EXAMPLE

Page 6: Dfp2

PROGRAMMING

• STEP1 :Define the sequence of operation• Provide a signal of +5v from bit 1 of port A

piston rod is out.• Piston rod is extended by reading the signal

from the limit switch at bit 0 of port b.• Clear the signal from port a to de- energies

the solenoid and retract the cylinder.

Page 7: Dfp2

PROGRAMMING

Page 8: Dfp2

PROGRAMMING

• Step3 : write a assembly program

Assembly language COMMENTS

LDA, 0F Load accumulator with 0F

LDA, FF Load accumulator A with CF

OUT(80),A Provide a signal of +5v and energies the solenoid

IN A (82) Part B is loaded into the accumulator A

OUT(80),A Load port A with content of A this switches the solenoid off retracts the

piston rod.

Page 9: Dfp2

PROGRAMMING

• STEP 4: Convert Into Machine Code

Address of memory Machine Code Assembly Language

3000 3E LDA, 0F

3004 3E LDA, FF

300A D3 OUT(80),A

3010 DB IN A (82)

Page 10: Dfp2

THANK YOU