Need simple "square wave bit" HAL component
09 Jun 2018 22:06 #112089
by Sparky961
Need simple "square wave bit" HAL component was created by Sparky961
I wasn't able to find a HAL component that outputs a square wave as a bit type. The closest I found was the siggen component, but it is complete overkill for my application and the output would need to be converted to bit type, which I don't know how to do. I just want to flash an indicator LED at constant low frequency, say 0.25 Hz or so. I'd be gating this with another signal, so building the gating into a component would be useful.
I think for someone experienced, this should be a simple component and timing isn't critical as long as it appears somewhat constant/consistent, though something that had low overhead and could work to higher frequencies may also be useful to me in the future.
I've looked into the basics of making a component but can someone help me get started with this one?
That, or point out the existing component I missed that does exactly what I'm looking for.
Thanks..
I think for someone experienced, this should be a simple component and timing isn't critical as long as it appears somewhat constant/consistent, though something that had low overhead and could work to higher frequencies may also be useful to me in the future.
I've looked into the basics of making a component but can someone help me get started with this one?
That, or point out the existing component I missed that does exactly what I'm looking for.
Thanks..
Please Log in or Create an account to join the conversation.
09 Jun 2018 22:21 #112090
by PCW
Replied by PCW on topic Need simple "square wave bit" HAL component
siggen has a clock output of type bit you can use
Please Log in or Create an account to join the conversation.
09 Jun 2018 22:25 #112091
by Sparky961
Replied by Sparky961 on topic Need simple "square wave bit" HAL component
Thank you, I missed that while reading through.
Since this runs in the base thread, does it consume appreciable system resources? It seems like there would be a lot of extra processing going on that I wouldn't be using.
Since this runs in the base thread, does it consume appreciable system resources? It seems like there would be a lot of extra processing going on that I wouldn't be using.
Please Log in or Create an account to join the conversation.
09 Jun 2018 23:56 - 09 Jun 2018 23:57 #112105
by PCW
Replied by PCW on topic Need simple "square wave bit" HAL component
Unless you need a high frequency output you can just run it in a servo thread
Last edit: 09 Jun 2018 23:57 by PCW.
Please Log in or Create an account to join the conversation.
Time to create page: 0.064 seconds