??? 07/26/09 02:10 Read: times |
#167890 - my code is doing what I want Responding to: ???'s previous message |
Steve, my code does exactly what I want... it gives full time low output when set 0 and full time high output when set 255.
I think you are getting a bit hard with me. Of course cleaness is just stetic, but it is very clean to me. Gives 3 or 4 cycles per PWM service. PWM value of each output is never modified, only the PWM "position" or "cursor" (dont know the right name). I just thought my code was a bit slow, giving just 205 refreshes per sec, but appears this is not too bad. (4 * 8 * 256) + (256 * 4) = 9216 1000000 / 9216 = 108,50 I think this calculation is not 100% right, but is not completly wrong Switching to another uC is an idea, of course. I can put my code in a timer interrupt, I think there is no problem, but, as I understand, this will reduce the refresh rate per sec. |
Topic | Author | Date |
Simple PWM to drive led | 01/01/70 00:00 | |
Loop lasts too long! | 01/01/70 00:00 | |
I put the delay... | 01/01/70 00:00 | |
Did you see? | 01/01/70 00:00 | |
didnt noticed! | 01/01/70 00:00 | |
Ok, try the following... | 01/01/70 00:00 | |
the JMP | 01/01/70 00:00 | |
I thought this was your intention... | 01/01/70 00:00 | |
Another try | 01/01/70 00:00 | |
is possible to filter the pwm output... | 01/01/70 00:00 | |
PWM from a Timer interrupt? | 01/01/70 00:00 | |
questions | 01/01/70 00:00 | |
best code until now | 01/01/70 00:00 | |
read replies | 01/01/70 00:00 | |
will lower refresh rate | 01/01/70 00:00 | |
Time to switch... | 01/01/70 00:00 | |
Wrong. | 01/01/70 00:00 | |
my code is doing what I want | 01/01/70 00:00 | |
TIming | 01/01/70 00:00 | |
FOR NOW!!!! | 01/01/70 00:00 | |
The old story... | 01/01/70 00:00 | |
DJNZ | 01/01/70 00:00 | |
Dec | 01/01/70 00:00 | |
Do nothing? | 01/01/70 00:00 | |
Speed | 01/01/70 00:00 | |
slowdown | 01/01/70 00:00 | |
Chico | 01/01/70 00:00 | |
Not yet... | 01/01/70 00:00 | |
good catch | 01/01/70 00:00 |