- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Sirs and Madams,
We are considering using the MBR3 series due to the difficulty of obtaining PSoC4.
I understand that sensor information is used by reading the "BUTTON_STAT" register, but when should the "LATCHED_BUTTON_STAT" register be used?
Perhaps I thought the "LATCHED_BUTTON_STAT" register was only used for GPIO toggle purposes.
Is there any difference in using it?
Regards,
Solved! Go to Solution.
- Labels:
-
CapSense
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @MiNe_85951,
If you require the current status of the button and wish to take some actions based on that, you would read BUTTON_STAT.
In case you require the history of touch on a button (i.e., if a button was ever pressed or not since the last time LATCHED_BUTTON_STAT was cleared), then LATCHED_BUTTON_STAT needs to be read.
In short, if the current status of the buttons is required, then use BUTTON_STAT.
Regards,
Nikhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @MiNe_85951,
BUTTON_STAT gives the current status of the buttons. And LATCHED_BUTTON_STAT register copies of set bits in BUTTON_STAT since the last time LATCHED_BUTTON_STAT was cleared. The usage of this register would be application specific. For example, if it is required to be known if a button was pressed or not, LATCHED_BUTTON_STAT would hold that data (provided it wasn't cleared).
Regards,
Nikhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nikhil-san,
Thank you for your support.
When we check the state of the sensor in general usage, we only need to refer to the "BUTTON_STAT" register, right?
Or is it better to check and clear the "LATCHED_BUTTON_STAT" register?
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @MiNe_85951,
If you require the current status of the button and wish to take some actions based on that, you would read BUTTON_STAT.
In case you require the history of touch on a button (i.e., if a button was ever pressed or not since the last time LATCHED_BUTTON_STAT was cleared), then LATCHED_BUTTON_STAT needs to be read.
In short, if the current status of the buttons is required, then use BUTTON_STAT.
Regards,
Nikhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nikhil-san,
I understood how to use them.
Thank you,