Possible to use timer1 interrupt with 3 PWMs?
i using pwm on pins 9, 10, , 11 control small gear motors single mosfet choppers. that part works ok. but depending on load 2 of motors slow down or stall (the 3rd 1 lightly loaded works fine) want add feedback. i adding led/phototransistor hole in gear signal. my question using timer while using pwm. i haven't modifed frequencies (even though little higher good). what 1 ms interrupt can count time between edges (using variables not using internal counter registers). the bike speedometer here:
http://www.instructables.com/id/arduino-timer-interrupts/?allsteps
looks way and speed/time range looks ok not sure if can use timer interrupt while using pwm. since haven't modified timers pwm can still use 1 khz interrupt? i need monitor 2 sensors additional variables , inputs @ each interrupt.
this on uno board.
http://www.instructables.com/id/arduino-timer-interrupts/?allsteps
looks way and speed/time range looks ok not sure if can use timer interrupt while using pwm. since haven't modified timers pwm can still use 1 khz interrupt? i need monitor 2 sensors additional variables , inputs @ each interrupt.
this on uno board.
Arduino Forum > Using Arduino > Project Guidance > Possible to use timer1 interrupt with 3 PWMs?
arduino
Comments
Post a Comment