- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using internal DAC in my program. I have set my DAC to 12 bit value. However, when I send DAC value over decimal 1038. My code goes to CyHalt reason 0. I am not sure why. Can someone help me how to resolve this issue.
Here is my DAC. I needed output to double, so I place a gain of 2 amplifier. Below is the set up for my DAC.
Solved! Go to Solution.
- Labels:
-
PSoC3 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
mlalwala,
The issue with the CyHalt is that you were pushing 1038 into DVDAC_2 which is configured as 10-bit with a maximum of 1020 for 10 bits.
A CYASSERT at line 213 in the DVDAC_2_SetValue() occurs because 1038 > 1020. This throws the CyHalt().
CYASSERT(value <= DVDAC_2_DVDAC_MAX_VALUE);
DVDAC_1 is 12-bit. But it can be seen in the "Call Stack" that DVDAC_2_SetValue is called just before the CyHalt.
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
mlalwala,
The issue with the CyHalt is that you were pushing 1038 into DVDAC_2 which is configured as 10-bit with a maximum of 1020 for 10 bits.
A CYASSERT at line 213 in the DVDAC_2_SetValue() occurs because 1038 > 1020. This throws the CyHalt().
CYASSERT(value <= DVDAC_2_DVDAC_MAX_VALUE);
DVDAC_1 is 12-bit. But it can be seen in the "Call Stack" that DVDAC_2_SetValue is called just before the CyHalt.
"Engineering is an Art. The Art of Compromise."