Hello,
We plan to use the HET timers to measure several PWM duty cycles and periods. Let say we have 16 PWMs, what would be an optimal way of implementing this using HET?
I guess I can use PCNT instructions right away? Something like this..
A0 PCNT { hr_lr=LOW,type=RISE2RISE,pin=18}; Freq
A1 PCNT { hr_lr=LOW,type=RISE2FALL,pin=18}; Duty Cycle
A2 PCNT { hr_lr=LOW,type=RISE2RISE,pin=19}; Freq
A3 PCNT { hr_lr=LOW,type=RISE2FALL,pin=19}; Duty Cycle
... etc.
From an application point of view, is it a bad idea to read the values directly from HET RAM? I wonder if HTU would be possible to use here? There are quite many signals...
I´m also thinking about how to measure 0% and 100% duty cycles. I guess I need to implement some sort of time out interrupt in the application in order to catch these situations? Or is it possible to do this in some other way?
Im not very experienced of using these HET timers so all advices and hints are welcome.
Jeru