Closed Gerriko closed 5 years ago
hiya this is a very light wrapper around the chip peripheral timer. check the datasheet for the d21 or d51 to see which pins are valid for the timers. we don't have any plans to do more examples or documentation - if you end up writing some please submit a PR and we'll take a look - thanks :)
Hi,
Thanks for the reply. Much appreciated. It would go a long way if that was alluded to in a readme.
Yes, once I get to grips with the documentation I will see if I can come up with a few examples or I may draft up a tutorial of sorts as I later found some discussions on the forum where others have struggled with similar issues in the past. The reason a tut may be better as one can delve more into the fundamentals etc.
Rgds
Colin
On Thu 20 Dec 2018 21:10 ladyada <notifications@github.com wrote:
hiya this is a very light wrapper around the chip peripheral timer. check the datasheet for the d21 or d51 to see which pins are valid for the timers. we don't have any plans to do more examples or documentation - if you end up writing some please submit a PR and we'll take a look - thanks :)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/adafruit/Adafruit_ZeroTimer/issues/9#issuecomment-449136373, or mute the thread https://github.com/notifications/unsubscribe-auth/ALW8AjtrqHn4jYRtXAu1N6kz14igOxRJks5u6_zFgaJpZM4Zc1QG .
On 20 Dec 2018 9:10 PM, "ladyada" notifications@github.com wrote:
hiya this is a very light wrapper around the chip peripheral timer. check the datasheet for the d21 or d51 to see which pins are valid for the timers. we don't have any plans to do more examples or documentation - if you end up writing some please submit a PR and we'll take a look - thanks :)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/adafruit/Adafruit_ZeroTimer/issues/9#issuecomment-449136373, or mute the thread https://github.com/notifications/unsubscribe-auth/ALW8AjtrqHn4jYRtXAu1N6kz14igOxRJks5u6_zFgaJpZM4Zc1QG .
thanks, would you be interested in updating the README to help others? we published this for internal usage only - we dont use it really at all in any projects because its not documented and not easy to use.
example added, no response
To start this is declared but I cannot see where it is used pinMode(13, OUTPUT);
Then why for callback example are you configuring using PWM option and the not Frequency option (confusing IMO and not enough explanation given here. /***** Timer #3, 16 bit, two PWM outs, period = 65535 */ zt3.configure(TC_CLOCK_PRESCALER_DIV2, // prescaler TC_COUNTER_SIZE_16BIT, // bit width of timer/counter TC_WAVE_GENERATION_NORMAL_PWM // frequency or PWM mode );
I understand for PWM but what is "wave_generation" for in a basic timer callback example.
Then any particular reason using "0xFFFF" instead of a more readable 65535 in zt3.setCompare(0, 0xFFFF/4);.
Then no explanation or information is given as to restrictions on which pin is valid for which timer and channel. It would help for callback example if this information is provided as a comment.
It would probably help if a readme was provided for these sort of things too.