void TMR6_EMG_InterruptHandler(void) 
{  
    if (start_flag == 1) 
    { 
        //Uncomment the line below if you need to test Analog Channel with a Potentiometer 
        //ADCC_StartConversion(POT_RA0);  

        //ADC Channel selected to be the EMG Click 
        //Make sure to insert the EMG Click on Curiosity HPC MikroBus Slot #2  
        ADCC_StartConversion(EMG_RA2);  

        adc_result_t adval = ADCC_GetConversionResult(); 

        // Every new sample point is added to the "Signal Circular Buffer" 
        // Data is "buffered" (until the limit of 50 data points) so the  
        // main loop can get the first inserted element (FIFO) 
        // whenever it is free and process it.  
        sbuf_insert(adval / 100);  
    }  
}