Hello everybody,
I am using PIC18 and wondering if it will do two things simultaneously..
Originally, the circuit and IC was designed and programmed to detecting two events; the forward and backward steps of the motor, and then do the calculation and output the position that the moving head located. Events are input to controller as two external interrupts and default as high priority. They will not interrupt at the same time because forward and backward rotation of motor won't happen coinicidently.
Now, I want to add duty cycle (PWM) to the circuit and use the timer interrupt in the same controller.
What will happen at certain time that timer enable and make duty cycle on and off changes and at the same time that there is external interrupt occurs that mentioned in the first parallgraph, will it work?
Thanks,
Charles
I am using PIC18 and wondering if it will do two things simultaneously..
Originally, the circuit and IC was designed and programmed to detecting two events; the forward and backward steps of the motor, and then do the calculation and output the position that the moving head located. Events are input to controller as two external interrupts and default as high priority. They will not interrupt at the same time because forward and backward rotation of motor won't happen coinicidently.
Now, I want to add duty cycle (PWM) to the circuit and use the timer interrupt in the same controller.
What will happen at certain time that timer enable and make duty cycle on and off changes and at the same time that there is external interrupt occurs that mentioned in the first parallgraph, will it work?
Thanks,
Charles