I'm using PWM to dim some LEDs, but I'm having a problem with flicker caused by the ADC input controlling the duty cycle. Here's how I came to this conclusion..
I'm using PWM output 2, and an 8% duty cycle, if I use this command:
pwmout 2,99,32 I get good results, but when I debug b2, the variable for the 10k input pot controlling the PWM duty cyle.. and set it to 32, and then use this command:
pwmout 2,99,b2 I get horrible flickering, it gets worse as the period gets shorter with the same duty cyle..
I'm not really sure what this is? some kind of EMI on the input? Should I try a 0.01uF on the input? That's just a guess.. I don't really have any idea what to do about this.
I'm using PWM output 2, and an 8% duty cycle, if I use this command:
pwmout 2,99,32 I get good results, but when I debug b2, the variable for the 10k input pot controlling the PWM duty cyle.. and set it to 32, and then use this command:
pwmout 2,99,b2 I get horrible flickering, it gets worse as the period gets shorter with the same duty cyle..
I'm not really sure what this is? some kind of EMI on the input? Should I try a 0.01uF on the input? That's just a guess.. I don't really have any idea what to do about this.