Reading ADC value debugging

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

cross mob
Anonymous
Not applicable

Hi,

Trying to read ADC values, utilizing the debug function.  But it seems , that I cannot use the add watch button, to read the value from the variable.

I am using PSoC 5LP CY8C5888LT*LP097.

The Code:

include "project.h"

int main(void)

{

    // CyGlobalIntEnable; /* Enable global interrupts. */

    IDAC8_1_Start();

    IDAC8_1_SetPolarity(IDAC8_1_SINK);

    ADC_DelSig_1_Start();

    ADC_DelSig_1_StartConvert();

int8 output;

    /* Place your initialization/startup code here (e.g. MyInst_Start()) */

    for(;;)

    {

      if(ADC_DelSig_1_IsEndConversion(ADC_DelSig_1_RETURN_STATUS))

    {

        output = ADC_DelSig_1_GetResult8();

    }

  //IDAC8_1_SetValue(75);

        /* Place your application code here. */

    }

}

0 Likes
1 Solution

You need to just declare the variable above the main()

Eg:

int8 output;

main()

{

Your application

}

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
7 Replies