Interface a stepper motor to 8086 and operate it in clock wise and anticlockwise by choosing variable stepsize.
1. To rotate stepper motor in clock direction
Aim:
Write a program in ALP to interface stepper motor to 8086 and rotate it in clockwise direction.
Apparatus:
1. ADS-SDA-86-STA kit
2. Stepper motor interface card
3. 1 Amp Power Supply
4. Stepper Motor
5. Adapter, Keyboard, Cables, Connecting Wires Etc...
Procedure:
1. Connect 8086 kit PC using RS232 cable. 2. Connect Power supply to 8086 kit 3. Connect 1Amp Power Supply to the Stepper Motor 4. Connect 8255 to CN4 of 8086 using 26 pin bus. 5. Keep the DIP switch in 1 & 7 on (8086kit), open TALK, and go to options select target device as 8086 and Connect. 6. Change dip switch into 1 & 5on, once reset 8086 kit. 7. Go to file →Download hex file 8. Keep the DIP switch in 1 & 7 on (8086kit) 9. G-4000(on kit keyboard), now the stepper motor will be rotating in clockwise direction
Program:
.OUTPUT 2500AD ;EQUATES PORT_C .EQUAL FFC4H ;PORT C ADDRESS CTL_PORT .EQUAL FFC6H ;CONTROL PORT ADDRESS CTL_BYTE .EQUAL 80H ;CONTROL BYTE FOR C PORT = ON PHASE_A .EQUAL 0cH ;BYTE TO SWTICH ON A PHASE PHASE_B .EQUAL 06H ;BYTE TO SWTICH ON B PHASE PHASE_C .EQUAL 03H ;BYTE TO SWTICH ON C PHASE PHASE_D .EQUAL 0DH ;BYTE TO SWTICH ON D PHASE DSEG SEGMENT org 0000 : 3000H DELAY_COUNT DW 0 DSEG ENDS CSEG SEGMENT ASSUME CS : CSEG, DS : DSEG ORG 0000 : 4000H ;Start of Test Program MOV AL, CTL_BYTE ;8255 INITIALISATION MOV DX, CTL_PORT OUT DX, AL ; START: MOV AL, PHASE_A ;PHASE A OF BOTH MOTORS ON MOV DX, PORT_C OUT DX, AL CALL DELAY1 ;DELAY BET. SWITCHING OF PHASES MOV AL, PHASE_C MOV DX, PORT_C OUT DX, AL ;PHASE B OF BOTH MOTORS ON CALL DELAY1 ;DELAY BET. SWTICHING OF PHASES MOV AL, PHASE_B MOV DX, PORT_C OUT DX, AL ;PHASE C OF BOTH MOTORS ON CALL DELAY1 ;DELAY BET. SWTICHING OF PHASES MOV AL, PHASE_D MOV DX, PORT_C OUT DX, AL ;PHASE D OF BOTH MOTORS ON CALL DELAY1 ;DELAY BET. SWTCHING OF PHASES JMP START ;PROGRAMS LOOPS FROM HERE ;Delay subroutine DELAY1: MOV CX, OFFSET DELAY_COUNT DL1: LOOP DL1 RET CSEG ENDS .END
Result:
stepper motor is interfaced to 8086 and rotated in clockwise direction.
2. To rotate stepper motor in anticlockwise direction.
Aim:
Write a program in ALP to interface stepper motor to 8086 and rotate it in anti-clockwise direction.
Apparatus:
1. ADS-SDA-86-STA kit
2. Stepper motor interface card
3. 1 Amp Power Supply.
4. Stepper Motor
5. Adapter, Keyboard, Cables, Connecting Wires Etc...
Procedure :
1. Connect 8086 kit PC using RS232 cable. 2. Connect Power supply to 8086 kit 3. Connect 1Amp Power Supply to the Stepper Motor 4. Connect 8255 to CN4 of 8086 using 26 pin bus. 5. Keep the DIP switch in 1 & 7 on (8086kit), open TALK, and go to options select target device as 8086 and Connect. 6. Change dip switch into 1 & 5on, once reset 8086 kit. 7. Go to file →Download hex file 8. Keep the DIP switch in 1 & 7 on (8086kit) 9. G-4000(on kit keyboard), now the stepper motor will be rotating in clockwise direction
Program:
.OUTPUT 2500AD ; EQUATES PORT_C .EQUAL FFC4H; PORT C ADDRESS CTL_PORT .EQUAL FFC6H; CONTROL PORT ADDRESS CTL_BYTE .EQUAL 80H ; CONTROL BYTE FOR C PORT = ON PHASE_A .EQUAL 0CH ; BYTE TO SWTICH ON A PHASE PHASE_B .EQUAL 06H ; BYTE TO SWTICH ON B PHASE PHASE_C .EQUAL 03H ; BYTE TO SWTICH ON C PHASE PHASE_D .EQUAL 0DH ;BYTE TO SWTICH ON D PHASE DSEG SEGMENT org 0000 : 3000H DELAY_COUNT DW 0 DSEG ENDS ; In a one-phase on scheme (anti clockwise) half step CSEG SEGMENT ASSUME CS : CSEG, DS : DSEG ORG 0000 : 4000H ;Start of Test Program MOV AL, CTL_BYTE ;8255 INITIALISATION MOV DX, CTL_PORT OUT DX, AL START: MOV AL, 77H ;PHASE_D ;PHASE A OF BOTH MOTORS ON MOV DX, PORT_C OUT DX, AL CALL DELAY1 ; DELAY BET. SWITCHING OF PHASES MOV AL, BBH ;PHASE_B MOV DX, PORT_C OUT DX, AL ;PHASE B OF BOTH MOTORS ON CALL DELAY ;DELAY BET. SWTICHING OF PHASES MOV AL, DDH ;PHASE_C MOV DX, PORT_C OUT DX, AL ;PHASE C OF BOTH MOTORS ON CALL DELAY1 ;DELAY BET. SWTICHING OF PHASES MOV AL, EEH ;PHASE_A MOV DX, PORT_C OUT DX, AL ;PHASE D OF BOTH MOTORS ON CALL DELAY1 ;DELAY BET. SWTCHING OF PHASES JMP STAR ;PROGRAMS LOOPS FROM HERE ;Delay subroutine DELAY1: MOV CX, OFFSET DELAY_COUNT DL1: LOOP DL1 RET CSEG ENDS .END
Result:
stepper motor is interfaced to 8086 and rotated in anticlockwise direction.
Viva-voce questions:
1. What is the difference between serial communication and parallel communication? 2. What is stepper moteor& why it is named so? 3. How can be step angle is calculated? 4. What are the advantages and disadvantages of parallel communication? 5. What does instruction-pipelining mean? 6. What is the difference between opcode and operand? 7. What is the power supply required for 8086 microprocessor?
-
UpdatedOct 23, 2014
-
Views29,395
Write and execute an alp to 8086 Microprocessor to add, subtract and multiply two 16 bit unsigned numbers. Store the result in extra segment
Write and execute an alp to 8086 Microprocessor to a sort the give array of 32 bit number in ascending and descending order.
Program to generate following waveforms
- Ramp waveform
- Square waveform
- Step waveform
- Triangle waveform
Write and execute an alp to 8086 Microprocessor to find the length of a given string which terminates with a special character
Write and execute an alp to 8086 Microprocessor to divide a 32 bit unsigned numbers by a 16 bit unsigned number. Store the result in stack segment
Interface a stepper motor to 8086 and operate it in clock wise and anticlockwise by choosing variable stepsize.