Not applicable
Sep 03, 2015
03:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 03, 2015
03:07 AM
Hi I was wondering if it is possible to read the comparator output when using the XMC4400. I've found no mention of any register in the user manual and the only way I can think of is by making use of the clamping system, unfortunately the explanation for implementing the comparator clamp is not very clear and I cannot seem to get it to change states. I was hoping someone could provide me with any assistance on this matter.
Thanks for your help
Thanks for your help
2 Replies
Sep 03, 2015
07:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 03, 2015
07:24 PM
Hi,
You could read the comparator output (rising or falling ) through CSG service request.
Here is the procedure
1. Set the comparator interrupt service enable in the SFR CSGySRE register. You could set the comparator rise and/or comparator fall interrupt enable.
2. Set the interrupt line selection, SFR CSGySRS
3. Read the status, SFR CSGyISTAT and clear the status after read, SFR CSGySWC
4. Or you could setup Interrupt service events.
Best regards,
Siew Lee
You could read the comparator output (rising or falling ) through CSG service request.
Here is the procedure
1. Set the comparator interrupt service enable in the SFR CSGySRE register. You could set the comparator rise and/or comparator fall interrupt enable.
2. Set the interrupt line selection, SFR CSGySRS
3. Read the status, SFR CSGyISTAT and clear the status after read, SFR CSGySWC
4. Or you could setup Interrupt service events.
Best regards,
Siew Lee
Not applicable
Sep 07, 2015
01:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 07, 2015
01:07 AM
Thank you for your reply.
I had been hoping to not make use of the interrupt service but i'll implement it how you said so as to keep track of the output state.
Kind Regards
Joe
I had been hoping to not make use of the interrupt service but i'll implement it how you said so as to keep track of the output state.
Kind Regards
Joe