- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm working on project where I need to be able to change the count value in a Counter component on the fly.
I was thinking about using the Counter_WriteCounter() function but the datasheet states that using this without disabling the Counter could mess things up.
How does one disable and then re-enable the component with the new count value?
Solved! Go to Solution.
- Labels:
-
PSoC 5 Device Programming
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quite easy:
Counter_Stop();
Counter_WriteCounter();
Counter_Start();
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks!
I assumed that when you start the component it uses the component configuration settings and not the new value passed in from my program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I assumed that when you start the component it uses the component configuration settings
This is done when you use Counter_Init() which is called by Counter_Start() only when the component has not been initialized yet.
Check datasheet for "initvar"
Bob