ADC - data reduction mode example

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

cross mob
Not applicable
Hi All,

Can someone point out where I can find an example of working with the ADC in data reduction mode. I have now worked quite a bit with the ADC, but would like to see a working example of the data reduction mode.

Regards
Enigma
0 Likes
2 Replies
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi,

You can just play with the "Result Control Reg" bit field Data Reduction Control (DRCTR).

1781.attach
0 Likes
lock attach
Attachments are accessible only for community members.
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi,

Attached is the example for data reduction using Result register 1.

Please reference to the below code in RED


// Result register 1
{

.post_processing_mode = XMC_VADC_DMM_REDUCTION_MODE, //DMM = 0 (Data reduction mode)

//.data_reduction_control = 0, //DRCTR = 0 (Data reduction disabled)
.data_reduction_control = 1, //DRCTR = 1 (Accumulate 2 result value)
//.data_reduction_control = 2, //DRCTR = 1 (Accumulate 2 result value)


.part_of_fifo = false, /* No FIFO */
.wait_for_read_mode = true, /* WFS */
.event_gen_enable = false /* No result event */
},
0 Likes