Go Down

Topic: FreqCounter, any way to use PWM pins as normal pins? (Read 1 time) previous topic - next topic

GoForSmoke

PWM pins are -capable- of PWM. You have to set one up -as- PWM to use that, it's not required nor do you need to turn PWM off unless you turned it on (by using analogWrite) in the first place.

How to turn it off? Set the pin to INPUT or OUTPUT either LOW or HIGH should stop PWM. These MCU's are machines that run any particular way because of the states of control registers. You reset the controls and it does the new thing, often in a fraction of a usec.

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

minaya

#11
Feb 26, 2013, 10:12 pm Last Edit: Feb 26, 2013, 10:13 pm by minaya Reason: 1
Thank you very much for your clarification GoForSmoke.

At the end, the problem isn't but my ignorance, as usual. Every day we learn something new.

I will try to publish the complete code in the future, but it doesn't depend completely on me as I'm not the only who's developing the project.

GoForSmoke

Hey, we all hit the little things. Compared to what you're doing it is nothing but a momentary hangup.

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Go Up