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.

Im using HET1 in PWM output mode - the output is working fine. The HET1 microcode was created by halcogen - is there a way to control the output to on/off and a way of changing the duty cycle? I dont see if there are registers to control a HET

Other Parts Discussed in Thread: HALCOGEN

Im using HET1 in PWM output mode - the output is working fine. The HET1 microcode was created by halcogen - is there a way to control the output to on/off and a way of changing the duty cycle? I dont see if there are registers to control a HET

  • Steven

    Yes look at the file  'het.h'  of 'HL_het.h' to see the available API calls for the PWMs.

    There is also an appnote you can read covering the HalCoGen HET Program:  PWM Generation and Input Capture Using HALCoGen N2HET Module

    My only warning (and it may already be documented in the appnote) is that the simplistic 'PWCNT' instruction that is used in the default HalCoGen PWM program has an issue when you change the duty cycle from 100% to 0% in one step.   So just avoid doing this.  [You can do 100%, 1%, 0% for example.. ]    Otherwise if you want better control of the PWM then you can look at some of the other HET appnotes.    HET is very capable it's the HalCoGen program that's pretty simple.