the program invokes two interrupt service routines Tmr0Overflowisr and Compareisr interrupt handler of
PIC 18F452 microcontroller, as shown in Figs. 12 and 13. The first interrupt
service routine is operating under Timer0 Overflow Interrupt module of
PIC18F452 microcontroller while the second interrupt handler invokes Timer 1
Output Compare module. The purpose of Timer0 Overflow Interrupt is to trigger
and update the stepping rate of the carriage motor every 1 second to control the
acceleration as well as the deceleration of the motor before the desired speed has
been achieved. Timer1 Output Compare interrupt service routine is used to drive
the stepper motor at the appropriate speed in regular intervals. For the first
interrupt service routine (Tmr0Overflowisr), the number of steps going through
by the stepper motor will be checked every 1 second. From Eq. (6) if the number
of accumulated steps is within the range of