How To Program A 8086 Microprocessor

Posted on

How to Control stepper motor using Microprocessor 8086 by assembly language program? As we all know that stepper motor driver plays an important role in automatic control system.We can create a stepper motor controller using 8086 microprocessor and 8255 Programmable Peripheral Interface IC. Here is the assembly language program for 8086 microprocessor. This stepper motor assembly language program is quite simple and easy. Here we had described the functions of each code for better understanding.

  1. Previous Post 8086 Assembly Program to Count Number of 0’s and 1’s from a String Next Post 8086 Assembly Program to Sort Numbers in Descending Order.
  2. First of all you need to clearly understand Intel 8086 Microprocessor architecture, different segments registers(CS,DS,SS and ES), different pointer and index.

Basically this assembly program is a beginner guide to those who like to study 8086 programming. Notations used For representing different types of numbers We are using some notations here. B: – used to indicate Binary Number H: – used to represent Hexa Decimal Number CW used to represent Control Word register You must know!. Stepper motor is interfaced to 8086 with the help of 8255 IC (Programmable Peripheral Interface). 8255 has two modes of operation BSR (Bit Set Reset) mode & IO (Input Output) mode. The mode is determined by the Control Word (CW) register; (here the CW address is 26). Initialize the CW with (0000 0000)B=(00)H for BSR mode & (1000 0000)B=(80)H for IO mode.

Assembly language programming 8086 is hardware oriented programming language which provides architecture and registers functionality for 8086 processors.

Assembly 8086 Programs

How

Stepper motor is IO device so CW should be (80)H There are 4 poles in a typical stepper motor A1, A2, B1, B2. Energize the poles for anticlockwise rotation we have to apply the following to the poles.