Jump to content
L.R.A

[Energia Library] Time_Capture

Recommended Posts

So I made a API to help use the Tiva time capture mode with the timers. So I decided to port it to Energia.

For now it only works with the wide timers.

I will try in the future when I have more time to get more info on it.
But for now I will leave this notes:
The possible pins to use are PC4, PC5, PC6, PC7 and from PD0 to PD7, including making a total of 12 inputs. Unlike pulseIn() you can't simply use any pin. 
The functions need to know the pin as parameter. The parameter should be for example "PC4" and not "PC_4".

There are functions to get the direct reading, the reading in nanoseconds (precision of 12.5ns) and reading in microseconds (precision 1us). 

There are functions with timeouts also.
There are also non-blocking functions. An examples shows how to use them.
The time from when the functions are called to the time the end of the pulse should be less than 53 seconds. Like pulseIn() it waits for the pulse to rise (in positive pulse readings) or fall (in negative pulse readings) and then measures the time it takes to change back.

I hope it helps some peeps ;)
Time_Capture.rar <- V1.0
Time_Capture_V2.0.rar <- V2.0 fixed problem described here
 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...