-
Notifications
You must be signed in to change notification settings - Fork 159
Open
Description
It doesn't seem possible to use AnalogWrite for WOA and WOB (TDC0) in ATTiny1616.
I've selected PB0-2 (buffered), 1-series PA4/5
I've changed the milli second timer to TDB0.
The first bug is located in this file,
https://github.com/SpenceKonde/megaTinyCore/tree/master/megaavr/variants/txy6/pins_arduino.h
Line 65:
#elif !defined(_TCA_USE_WO3) && !defined(_TCA_USE_WO4) && defined(_TCA_USE_WO5)
#define digitalPinHasPWM(p) ((p) == _TCA0_WO0 || (p) == _TCA0_WO1 || (p) == _TCA0_WO2 || (p) == _TCD_WOAC || (p) == _TCD_WOBD)
The last defined(_TCA_USE_WO5) should be !defined(_TCA_USE_WO5) The '!' is missing.
Now it compiles.
However, if you call digitalPinToTimer(PIN_PA4) it still returns 0. (NO_TIMER)
This prevents analog_write() to run.
On a side note, it took me a long time to understand (and I still don't understand) what the PWM options mean, and I can't seem to find it in the documentation. Does it mean TCA, TCB and TCD pins?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels