Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 4 Forum Discussions

MaMi_1205306
Level 6
500 replies posted 50 solutions authored 25 likes received
Level 6

Dear Sirs and Madams,

 

I know that PSoC4S has SAR ADC( 12bit, 1Msps). 

Does overflow or underflow occur when the input to the ADC is VDD or GND?

I confirmed for the component data sheet of SAR ADC, but it was not mentioned, so I am checking it in this community.

Although the ADC is 12 bits, it is estimated that it may occur because the data handled by the conversion output is 16 bits.
In that case, it is necessary to correct the data by software, so please confirm it.

 

Regards,

0 Likes
1 Solution
Vasanth
Moderator
Moderator 250 sign-ins 500 solutions authored First question asked
Moderator

Hi Masashi san,

The PSoC4 ADC can have overflow or underflow depending on the input reference and the  input voltage. We do have a saturate interrupt option to detect this. The saturation detection is always applied to every conversion. This feature detects if a sample value is equal to the minimum or maximum value for the specific resolution and sets a maskable interrupt flag for the corresponding channel. This action allows the firmware to take action, such as discarding the result, when the SAR ADC saturates. The sample value is tested right after conversion, before averaging. This means that the interrupt is set while the averaged result in the data register is not equal to the minimum or maximum.

"Although the ADC is 12 bits, it is estimated that it may occur because the data handled by the conversion output is 16 bits." - This could happen if the averaging feature is ON and result is kept "accumulation mode"(instead of fixed resolution). But here again saturate interrupts are not triggered even though the end results go overboard, because the sample values are tested before averaging. So ideally no software correction is required.

Best Regards,
Vasanth 

View solution in original post

1 Reply
Vasanth
Moderator
Moderator 250 sign-ins 500 solutions authored First question asked
Moderator

Hi Masashi san,

The PSoC4 ADC can have overflow or underflow depending on the input reference and the  input voltage. We do have a saturate interrupt option to detect this. The saturation detection is always applied to every conversion. This feature detects if a sample value is equal to the minimum or maximum value for the specific resolution and sets a maskable interrupt flag for the corresponding channel. This action allows the firmware to take action, such as discarding the result, when the SAR ADC saturates. The sample value is tested right after conversion, before averaging. This means that the interrupt is set while the averaged result in the data register is not equal to the minimum or maximum.

"Although the ADC is 12 bits, it is estimated that it may occur because the data handled by the conversion output is 16 bits." - This could happen if the averaging feature is ON and result is kept "accumulation mode"(instead of fixed resolution). But here again saturate interrupts are not triggered even though the end results go overboard, because the sample values are tested before averaging. So ideally no software correction is required.

Best Regards,
Vasanth