MC68HC11A8-Stepper Motor Controller 
This project is based on Motorola HC11 controller. This circuit is built to drive a stepper motor. A high or a low signal is given as input to rotate the stepper motor clockwise or anticlockwise respectively. To simulate this circuit, initially activate Mixed Mode simulator from the Schematic Editor window. Simulation can be performed by selecting Transient analysis from Simulation menu.
This project includes microcontroller M68HC11A8, stepper motor unit (interface and motor).
A high or a low signal is given as input to the 0th pin of PORT A of the microcontroller to rotate the stepper motor clockwise or anticlockwise. A high signal at the Port A drives the stepper motor clockwise and a low signal drives the stepper motor anticlockwise. The signal is given before invoking the simulation.
As the microcontroller cannot drive stepper motor directly, a motor driver IC (ULN 2003) is used. This is a Darlington octal buffer IC.
 
The source code written either in C or Assembly language can be viewed from the 
    code editor window. 
The program is as shown:
LDX     #0x1000
BRCLR   0,X 0x01 ANTI ; Branch if the bit is clear
CLKWISE: 
LDAA    #0x01                 ; Output the sequence to rotate clockwise to Port B   
STAA    0x1004
LDAA    #0x02
STAA    0x1004
LDAA    #0x04
STAA    0x1004
LDAA    #0x08
STAA    0x1004
BRA     CLKWISE             ; Repeat the sequence
ANTI:   
LDAA    #0x08                   ; the sequence to rotate anticlockwise
STAA    0x1004
LDAA    #0x04
STAA    0x1004
LDAA    #0x02
STAA    0x1004
LDAA    #0x01
STAA    0x1004
BRA     ANTI                       ; Repeat the sequence
The source code in the 
  code editor window 
    has to be  
 compiled
  after making any modifications 
  (editing). 
    Also the code can be 
  debugged 
      during
   
    simulation.