CONFUSED
I am trying to write a program that with Step a stepper motor clock wise or counter clock wise and in full or half step mode. I have a 1sec time delay for the clock. I am STUMPED :?
Here is what I have so far:
BCLR $26 $40 ;ENABLE I/O
BSET $26 $60 ;PA5,PA6, SET TO OUTPUT
BSET $00 $20 ;PA5 SET TO CLOCK WISE
BSET $00 $40 ;PA6 SET TO FULL STEP
LDAA #11 ;NUMBER OF STEPS
STAA $1000 ;LOCATION OF STEPS
STEP BSET $00 $80 ;PA7 SET FOR CLOCK
BSR DLY
BCLR $00 $10 ;CLEAR CLOCK
DEC $1000
BNE STEP
HERE BRA HERE
DLY bset $26 $03 ;SETS INTERVAL FOR 32.77msec
ldaa #30 ;MULTIPLIER 30*32.77msec = 1SEC
bclr $24 $40 ;DISABLES INTERRUPT
rep bset $25 $40 ;CLEARS FLAG
mon brclr $25 $40 mon ;IF SET END OF INTERRUPT
deca
bne rep
rts
THANKS