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.

N2HET Simple Time measurement

Other Parts Discussed in Thread: HALCOGEN

Hello
I want to use N2HET to measure the time between two edge of a signal (leading and trailing edge).
I think it’s easy to do it.
I tried to use the HCG drivers but it does not work.
Where can I find more documentation about this topic?
Kind regards

  • Jerome,

    Yes, the N2HET includes an instruction that will do this.

    It is the PCNT instruction.   They type you want is probably RISETOFALL if the signal is an active high pulse or FALLTORISE if it's active low.

    You should only need 1 PCNT instruction.  The HalCoGen driver doesn't really have this setup ... it has a function to measure PWM duty and period and while you could use this you are probably better off writing a simple N2HET program of your own.