Hi,
Please could someone explain what HET action PULSEHI actually does and how it differs from SET? I can't seem to find any documentation for it.
Thanks,
Jack
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
Please could someone explain what HET action PULSEHI actually does and how it differs from SET? I can't seem to find any documentation for it.
Thanks,
Jack
Jack,
Let me try with an example. Assume that you are generating a PWM with a CNT and ECMP instruction. The max value for CNT is 100 and the compare value for ECMP is 50. If you use PULSEHI to control the pin. The pin will go high when CNT reaches 50 and will go low when CNT is overflowed to zero after reaching 100. If you use SET, the pin will stay hi after the first time CNT reaches 50.
Thanks and regards,
Zhaohong
OK, thanks, so SET and CLEAR ignore the Z flag?
My confusion was over "ECMP uses the zero flag to generate opposite pin action (synchronized to the loop resolution clock)." on page 853 of the TRM... it seems to imply on a Z flag the opposite of any action would be performed, including a SET (thus causing a CLEAR), but this is not the case?
Jack
Jack,
SET and CLEAR are not affected by Z flag.
Thanks and regards,
Zhaohong