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

cross mob
Anonymous
Not applicable

hello in my code there is an array and my question is how can i see the information of the array ?(meaning to see the data of each cell )

with out using debugger .

this is my code :

int main()

{

    int32 output={0};

     volatile  int32 output_array[1000]={0}; // voltatile is used to avoid optimized out eror

    int32 mVolts;

   int i=0;

   

    

    char displayStr[15] = {0};   /* Character array to hold the micro volts*/

    /* Start the components */

    LCD_Start();

    ADC_DelSig_1_Start();

    /* Start the ADC conversion */

    ADC_DelSig_1_StartConvert();

    /* Display the value of ADC output on LCD */

    LCD_Position(0u, 0u);

    LCD_PrintString("ADC_Output (Hex):");

    ADC_DelSig_1_SetOffset(130);// -25

   

   LCD_Position(2u, 0u);

    LCD_PrintString("ADC-voltage:");

   

   

   for(;;) // this for meanes that it will run forever

    {

       

        

       

       

       

       

       

      

       

       

       

       

      

       

        if(ADC_DelSig_1_IsEndConversion(ADC_DelSig_1_WAIT_FOR_RESULT))

        {

       output = ADC_DelSig_1_GetResult32();

       mVolts = ADC_DelSig_1_CountsTo_uVolts(output);

   

 

            for(i=0;i<=1000;i++)

    {  

    output_array = ADC_DelSig_1_GetResult32();

   

   

    }

   

   

   

   

   

           

       LCD_Position(1u, 0u);

       LCD_PrintInt32(output);

       sprintf(displayStr,"%5ld",mVolts);

       LCD_Position(3,0);   

       LCD_PrintString(displayStr);

       

       CyDelay(500u);

   

  

  

        }

    }

}

0 Likes
1 Solution

In your uploaded project you are not using the second option which would be correct for you to fill the array, so I didn't know whether you already changed something.

What kind of interface between the PSoC board and your PC you want to use? For UART there is nothing at all you need to download, everything is ready waiting for you:

on PC side there are emulated com-ports and commands to set serial speed etc (mode command). You even may copy the data from serial into a file.

On PSoC side there is the UART component. In your Kitprog documentation (installed on your PC when you installed the kit files) is explained in detail how the USB-UART bridge can be used.

Bob

View solution in original post

5 Replies