Announcement

Collapse
No announcement yet.

Generating X/Y from ADC Samples

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Generating X/Y from ADC Samples

    Hi


    I want to ask if anyone can advise me any good method on how to get the X/Y axis from ADC samples. In my project I collect 4 samples which I think is enough to generate X/Y I think about mathematical functions sin cos but I'm not sure how to use them exactly.

  • #2
    You'll need to provide more information. What circuit? What are you sampling?

    Comment


    • #3
      The project is based on STM32G4 I am adding a few lines of code which runs in timer 3 and makes 4 samples from the ADC input it all works I would just like to know how to create two X/Y signals shifted by 90 degrees

      #define SAMPLES 4
      int8_t cnt = -1;
      int32_t ADC_Samples[SAMPLES];


      void TIM3_IRQHandler(void){


      HAL_TIM_IRQHandler(&htim3);
      cnt++;

      ADC_Samples[cnt] = aADCxConvertedData[cnt];

      if(cnt == SAMPLES -1){
      cnt = -1;
      }
      }

      Comment

      Working...
      X