You are on page 1of 11

DAC INTERFACING TO 8085 MICROPROCESSOR

AIM: To interface 0800 DAC to 8085 Microprocessor and generate various waveforms. APPARATUS REQUIRED: 8085 Microprocessor kit. DAC interface board. VXT parallel bus. Power supply. CRO.

THEORY: DAC 0800 is a monolithic, high speed, current output Digital to Analog converter. The DAC interface board consists of two 8- bit DAC 0800. Its output voltage variation is between 5V and +5V. The output voltage varies in steps of 10/256 = 0.04 (approx). The digital data input and the corresponding output voltages are presented in the following table. Input data in Hex Output Voltage

0 1 2 . . 7F . . FD FE FF

-5.00 4.96 4.92 0.00 4.92 4.96 5.00

Address for DAC1 is C0, and for DAC2 is C8. PROGRAM 1:

To generate square-wave at the DAC2 ouput. ALGORITHM: 1. Load the initial value 00H into accumulator and move it to DAC2. 2. Call the delay program 3. Load the final value FFH into accumulator and move it to DAC2. 4. Call the delay program 5. Repeat steps 1to 5. FLOWCHART: START

[A] 00H

OUT C8H

Call delay

[A] FFH

OUT C8H

Call delay

Stop

Delay:
DELAY

[B] 05H

[C] FFH

Decrement C Reg

NO

IS C=0

YES

Decrement B Reg 3

NO

IS B=0 YES RET

ADDRESS 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 410A 410B 410C 410D 410E 410F 4110 4111 4112 4113 4114 4115

OPCODE 3E 00 D3 C8 CD 11 41 3E FF D3 C8 CD 11 41 C3 00 41 06 05 0E FF 0D

LABEL START

MNEMONICS MVI OUT

OPERAND A,00 C8H

CALL MVI OUT

DELAY A,FFH C8H

COMMENTS Initialize A register as 00H Move the content in A into output port C8H Call delay program Move the content FFH into A reg Move the content in A into output port C8H Call delay program Jump into Starting program Move the content 05H into B reg Move the content FFH into C reg Decrement C 4

CALL JMP DELAY LOOP1 LOOP2 MVI MVI DCR

DELAY START B,05H C,FFH C

4116 4117 4118 4119 411A 4100 4101 4102 .

C2 15 41 05 C2 13 41 C9

JNZ DCR JNZ RET

LOOP2 B LOOP1

reg content If C reg 0,then go to LOOP2 Decrement C reg content If B reg0,then go to LOOP1 Return into program

PROGRAM2: To generate a saw-tooth wave at the output of DAC1. ALGORITHM : 1. Load the initial value 00H into accumulator and move it to DAC1. 2. Increment the accumulator content by 1. 3. Repeat steps 2 and 3. FLOWCHART: START

[A] 00H

OUT C0H

Increment A Reg 5

IS count=0

RET

ADDRESS 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 410A

OPCODE 3E 00 D3 C0 3C C2 02 41 C3 00 41

LABEL START LOOP1

MNEMONICS MVI OUT

OPERAND A,00 C0H

INR JNZ JMP

A LOOP1 START

COMMENTS Initialize A register as 00H Move the content in A into output port C0H Increment A reg content If A reg 0,then go to LOOP1 Jump into Starting program

PROCEDURE: Execute the above program s and using CRO, verify that the waveforms at the DAC2 and DAC1 output are square wave and Sawtooth wave. Modify the frequency of these waveform , by varying the time delay.

RESULT: Thus the DAC 0800 interface board has been interfaced to 8085p and various waveforms have been generated.

INTERFACING 16-CHANNEL 0809 8 BIT ADC INTERFACE BOARD TO 8085 P


AIM: To interface 16-channel 0809 8 bit ADC interface board to 8085 p APPARATUS REQUIRED: 8085 p kit , 16-channel 0809 8 bit ADC interface board , VXT parallel bus , Power supply. ALGORITHM: 1. Load the initial value 10H into accumulator and move it to ADC.The data 10H is used for Channel 0 selection and ALE Low. 2. Load the initial value 18H into accumulator and move it to ADC. The data 18H is used for Channel 0 selection and ALE HIGH. 3. Give the analog data input into channel 0 by using trimpot and see the output at LED Display. FLOWCHART:

START

[A] 10H

OUT C8H

[A] 18H

OUT C8H

START

PROGRAM: ADDRESS 4100 4101 4102 4103 4104 4105 4106 4107 4108 OPCODE 3E 10 D3 C8 3E 18 D3 C8 76 LABEL MNEMONICS MVI OUT OPERAND A,10 C8H REMARKS Channel 0 selection and ALE Low Move the content in A into output port C8H Channel 0 selection and ALE High Move the content in A into output port C8H Halt the program

MVI OUT

A,18H C8H

HLT

PROCEDURE: The above program initiates the analog to digital conversion process by means of software. Execute the program, which converts the anolog input at Channel 0 and displays the output with the LEDs. RESULT: Thus the ADC interfacing board has been interfaced to 8085 p.

STEPPER MOTOR CONTROL


AIM: Write an Assembly language Program to drive and control a stepper motor using 8085 microprocessor kit. THEORY: Stepper motor control is one of the popular applications of microprocessor in control area. Stepper motor are capable of accepting a sequence of pulse from the microprocessor and step accordingly. They are used to control numerical controlled machines, computer peripheral equipment, business machines, process control etc.

PROGRAM:
ADDRESS 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 410A 410B 410C 410D 410E 410F 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 OPCODE 0E 20 21 3F 41 CD 21 41 0D C2 02 41 CD 35 41 0E 20 21 43 41 CD 21 41 0D C2 11 REVES LABEL START FORWD MNEMONICS MVI LXI CALL DCR JNZ OPERAND C,20H H,FOR LOOK ROTATE C FORWD REMARKS Initialize B register as 20H Initialize HL reg. to 413FH Call rotate program Decrement c register. If acc and given number are not equal, then go to FORWD Call stop program Initialize Cregister as 20H Initialize HL reg. to 4143H Call rotate program Decrement c register. If acc and given number

CALL MVI LXI CALL DCR JNZ

STOP C,20H H,REV LOOK ROTATE C REVES

411A 411B 411C 411D 411E 411F 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 412A

41 CD 35 41 C3 00 41 06 04 7E D3 C0 11 03 03 1B 7B CALL JMP ROTATE MVI MOV OUT LXI LOOP1 DCX MOV STOP START B,04H A,M C0H D,303H D A,E

are not equal, then go to REVES Call stop program Jump into START Initialize B register as 04H Transfer M into acc. Out into COH Initialize DE reg. to 303H Decrement DE register pair Move the content of E register to accumulator Content of D register is logically OR with Accumulator If acc and given number are not equal, then go to LOOP1 Increment HL register pair Decrement B register. If acc and given number are not equal, then go to 10

412B

B2

ORA

412C 412D 412E 412F 4130 4131 4132 4133

C2 29 41 23 05 C2 23 41

JNZ

LOOP1

INX DCR JNZ

H B REPT

4134 4135 4136 4137 4138 4139

C9 11 FF FF 1B 7B

STOP LOOP2

RET LXI DCX MOV

D,FFFFH D A,E

413A

B2

ORA

413B 413C 413D 413E 413F 4140 4141 4142 4143 4144 4145 4146 4147

C2 38 41 C9 09 05 06 0A 0A 06 05 09 76

JNZ

LOOP2

FOR LOOK

RET DB

REPT Return Initialize DE reg. to FFFFH Decrement DE register pair Move the content of E register to accumulator Content of D register is logically OR with Accumulator If acc and given number are not equal, then go to LOOP2 Return

09H,05H,06H,0AH

REV LOOK

DB

0AH,06H,05H,09H

HLT

Halt the program.

RESULT: Thus an Assembly language Program to drive and control a stepper motor was written and executed.

11

You might also like