Ploting ADC readings whit ATMEL ICE

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello Everyone!
Not sure in what topic to post this, I apologize if I make a mistake
Also sorry for my English if I make a mistake there as well!
I am a bit of a rookie when it comes to Microchip Studio debugging Tools
So for context: I have an ADC and I wish to Plot the readings I make, I am using an ATSAML10E16A on a custom board and an ATMEL ICE to program and Debug the board.
I am aware that a Data Visualizer already exists in Microchip Studio, but I am not quite sure on How to do it with the ATMEL ICE I am currently using. 
Any help would be very appreciated, thank you!

Example code:

 

#include <atmel_start.h>

int main(void)
{
	/* Initializes MCU, drivers and middleware */
	atmel_start_init();
	
	
	volatile int buffer[2]=[0x0];
	volatile int sum;
	adc_sync_enable_channel(&ADC, 2); // Sg1+

	/* Replace with your application code */
	while (1) {
		adc_sync_set_inputs(&ADC_0,2,0x18,2);
		
		adc_sync_read_channel(&ADC, 2, buffer, 2);
		
		sum=sum+buffer[0];
		
	}
}