Skip to main content
Added some modifications I made according to an answer given
Source Link

EDIT#1: I have done the modifications that @Edgar Bonet suggested me. It partially worked. What i'm left with now is a PWM that can go from 1Hz to 5Hz almost smoothly with the duty cycle at 20% for 1Hz and going up to 22% at 5Hz. After that I only get very discrete frequencies: 7.99Hz, 9.55Hz, 10.66Hz, 11.99Hz, 13.70Hz, 19.18Hz, 21.32Hz, 26.65Hz, 35.54Hz and then it takes almost half a turn before it changes to 53.3Hz until the end. The duty cycle at 35Hz is 33.3% and it reaches 50% at 53.3Hz... What logic is that....

EDIT#1: I have done the modifications that @Edgar Bonet suggested me. It partially worked. What i'm left with now is a PWM that can go from 1Hz to 5Hz almost smoothly with the duty cycle at 20% for 1Hz and going up to 22% at 5Hz. After that I only get very discrete frequencies: 7.99Hz, 9.55Hz, 10.66Hz, 11.99Hz, 13.70Hz, 19.18Hz, 21.32Hz, 26.65Hz, 35.54Hz and then it takes almost half a turn before it changes to 53.3Hz until the end. The duty cycle at 35Hz is 33.3% and it reaches 50% at 53.3Hz... What logic is that....

Added tag. Improved title.
Link
sa_leinad
  • 3.2k
  • 2
  • 24
  • 53

Cannot create a 20% dutycycle PWM with 20% duty cycle using micro() timer

Added tag. Improved title.
Source Link
sa_leinad
  • 3.2k
  • 2
  • 24
  • 53

Cannot create a 20%dutycycle20% dutycycle PWM with micro() timer. ARDUINO NANO

I have been working with arduinoArduino for almost a year, because I found it easy for beginners in electronics. But now, I have a major problem, I'm trying to get rid of my delay() function because I want my ARDUINO NANOArduino Nano to handle to tasks at once:

Cannot create a 20%dutycycle PWM with micro() timer. ARDUINO NANO

I have been working with arduino for almost a year, because I found it easy for beginners in electronics. But now, I have a major problem, I'm trying to get rid of my delay() function because I want my ARDUINO NANO to handle to tasks at once:

Cannot create a 20% dutycycle PWM with micro() timer

I have been working with Arduino for almost a year, because I found it easy for beginners in electronics. But now, I have a major problem, I'm trying to get rid of my delay() function because I want my Arduino Nano to handle to tasks at once:

Source Link
Loading