Timeline for PWM generation using Registers
Current License: CC BY-SA 3.0
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 10, 2014 at 14:04 | comment | added | mike | Thanks. What you suggest is in Atmels Documentation called fast PWM, where the counters just count until overflow. I however use phase-corrected PWM, where it counts up and down. This gives a more symmetrical output (and according to them) is prefered over fast PWM. | |
| Oct 10, 2014 at 14:02 | vote | accept | mike | ||
| Oct 10, 2014 at 14:02 | answer | added | mike | timeline score: 0 | |
| Oct 10, 2014 at 12:19 | comment | added | Ian M | I'm not 100% familiar with Arduino timers, but here is how I did PWM on an MSP430 with timers: imgur.com/2aOnW2g Essentially, you count up, and reset. When the timer hits the set value, it does the rising edge pulse, and when it hits the max count, it resets both the pulse and the timer. The alternative of this is to do the opposite: set the pulse high until the timer hits the threshold value, etc. | |
| Oct 10, 2014 at 11:42 | history | edited | mike | CC BY-SA 3.0 |
added 787 characters in body
|
| Oct 10, 2014 at 7:35 | history | edited | mike | CC BY-SA 3.0 |
New info, Changed the desired update frequencies.
|
| Oct 8, 2014 at 2:07 | history | tweeted | twitter.com/#!/StackArduino/status/519670406051950592 | ||
| Oct 7, 2014 at 15:31 | history | edited | mike | CC BY-SA 3.0 |
added 219 characters in body
|
| Oct 7, 2014 at 14:36 | comment | added | Gerben | That doesn't really make it any clearer. Seems I can't help you then. | |
| Oct 7, 2014 at 12:39 | comment | added | mike | 2048 to be exact for this case. Why is that contradictory, if I want to have pulses between 1 and 2 ms (something around 48% and 97% duty cycle)? | |
| Oct 7, 2014 at 12:26 | comment | added | Gerben |
I don't understand what you want to achieve. Pulse width of 1000ms at a sample rate of 488.28Hz that seems contradictory, as the maximum pulse width can only be 2ms at 488Hz.
|
|
| Oct 7, 2014 at 10:15 | history | edited | mike | CC BY-SA 3.0 |
edited title
|
| Oct 7, 2014 at 8:30 | history | asked | mike | CC BY-SA 3.0 |