;* EQUATES SECTION
IO1 = 0x980B ;I/O buffer bits 0-7
IO2 = 0x980A ;I/O buffer bits 8-15
CMD = 0x980F ;command buffer
Write_PR1 = 0xC1 ;write to R1 preregister command
Write_PR3 = 0xC3 ;write to R3 preregister command
Write_PR4 = 0xC4 ;write to R4 preregister command
.AREA Jogging (ABS)
.MODULE Jogging
.ORG 0x1040
;load R1 to set the low stepping rate
ldx #IO2 ;point X at the I/O buffer
ldd #100 ;load D with desired FL stepping rate
stab 1,x ;write the LSB
staa 0,x ;write the MSB
ldx #CMD ;point to the command buffer
ldaa #Write_PR1 ;write the 'write into pre-reg 1'
staa 0,x ;command to PCL3013
;load R4 to set the multiplier
ldx #IO2 ;point X at the I/O buffer
ldd #0x012B ;load D to get the desired multiplier
stab 1,x ;write the LSB
staa 0,x ;write the MSB
ldx #CMD ;point to the command buffer
ldaa #Write_PR4 ;write the 'write into pre-reg 4'
staa 0,x ;command to PCL3013
;load R1 to set the high stepping rate
ldx #IO2 ;point X at the I/O buffer
ldd #400 ;load D to get desired FH stepping rate
stab 1,x ;write the LSB
staa 0,x ;write the MSB
ldx #CMD ;point to the command buffer
ldaa #Write_PR2 ;write the 'write into pre-reg 2'
jmp 0xC000 ;go back to the monitor program
Listing 1This code
tests the ability to operate the PCL3013 in continuous mode 1.
After executing the code, start commands 10h and 11h and the immediate-stop
command 9h may be issued from the monitor program.