How can I use Timer0 to create a pulse for controlling a dc motor? I try to use it with PIC 16F628A . One motor uses PWM, another uses Timer0.
But I don't know when we init Timer0, it will increase every intructions cycles, right ? so, what we would do in main , meanwhile Timer0 is increasing ?
The Duty cycle of the pulse is create by set the pin high (1) , then init timer0, ( after it overflows), PC comes to Interrupt routine. Do the Int , then go back to main program, and in program what would we write? ( It must be enough intructions for Timer0 to timing , right ? )
thank you very much for answer my question.
But I don't know when we init Timer0, it will increase every intructions cycles, right ? so, what we would do in main , meanwhile Timer0 is increasing ?
The Duty cycle of the pulse is create by set the pin high (1) , then init timer0, ( after it overflows), PC comes to Interrupt routine. Do the Int , then go back to main program, and in program what would we write? ( It must be enough intructions for Timer0 to timing , right ? )
thank you very much for answer my question.