# Period HLA

**URL:** <https://discuss.saleae.com/t/period-hla/2075>\
**Category:** Extensions\
**Created:** [January 31, 2023, 7:37pm UTC](https://discuss.saleae.com/t/period-hla/2075 "2023-01-31T19:37:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mertkiremitcici](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mertkiremitcici](https://discuss.saleae.com/u/mertkiremitcici)\
**Post date:** [January 31, 2023, 7:37pm UTC](https://discuss.saleae.com/t/period-hla/2075/1 "2023-01-31T19:37:51Z")

</div>

Hi all,

I want to get period of each falling edges of a PWM signal. In order to do that, I tried to write a HLA, however I couldn’t understand how I can get the falling or rising information of the edges.

Can you give me a hand?

Best Regards,  
Mert.

---

<div class="post-metadata">

**Author:** ![P.Jaquiery](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/p.jaquiery/32/289_2.png) [@P.Jaquiery](https://discuss.saleae.com/u/P.Jaquiery)\
**Post date:** [January 31, 2023, 8:14pm UTC](https://discuss.saleae.com/t/period-hla/2075/2 "2023-01-31T20:14:46Z")

</div>

Install one of the various Pulse extensions and have a look at their code. Things like “Pulse Count”, “Pulse Stats”, “Duty Cycle”, “Clock Stats” and quite a few others do stuff that deals with rising and falling edges.

---

<div class="post-metadata">

**Author:** ![mertkiremitcici](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mertkiremitcici](https://discuss.saleae.com/u/mertkiremitcici)\
**Post date:** [February 1, 2023, 6:48pm UTC](https://discuss.saleae.com/t/period-hla/2075/3 "2023-02-01T18:48:44Z")

</div>

Hİ @P.Jaquiery,

Thanks for your answer. I may be wrong, but pulse extensions that I can found in Logic 2 software are digital measurements, not HLA. I don’t want to use the measurement, I want to write the period time on the between of two falling edges like below. Can I read the channel by using HLA or should I work on LLA?

![image](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/2X/3/3d491596fc23175c6654b4e4a1145a24d1bab9ff.png)

Best regards,  
Mert.

---

<div class="post-metadata">

**Author:** ![P.Jaquiery](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/p.jaquiery/32/289_2.png) [@P.Jaquiery](https://discuss.saleae.com/u/P.Jaquiery)\
**Post date:** [February 1, 2023, 9:03pm UTC](https://discuss.saleae.com/t/period-hla/2075/4 "2023-02-01T21:03:19Z")

</div>

Yes, an HLA is what you need for that. A simple hack that might get you where you need to be is use the Simple Parallel analyzer with two inputs connected to each pin of interest, then set up a the analyzer using the two pins as data and clock lines respectively. Set the clock for dual edge. Then you can write your HLA using the data from the LLA.
