EMG Click Board
EMG Click Board
The EMG Click Board™ measures the electrical activity produced by the skeletal muscles. It is based on the MCP609 operational amplifier and MAX6106 micropower voltage reference.
The EMG Click Board™ is designed to run on a 5V power supply. The Click Board™has an analogue output (AN pin).
Software Support
Code examples for the EMG Click Board™, written for MikroElektronika hardware and compilers are available on Libstock.
CODE SNIPPET
The following code snippet shows the state of waiting for a button press event by the user, in order to start the measuring of data. Data is sampled from ADC module every 3.3 ms and sent to mikroPlot, all in an endless loop.
01 while(1) 02 { 03 // If button PD10 is pressed, the measuring begins 04 if (Button( &GPIOD_IDR, 10, 10, 1 )) 05 { 06 UART1_Write_Text( "STARTrn" ); 07 InitTimer2(); 08 EnableInterrupts(); 09 delay_ms( 500 ); 10 } 11 12 // Every 3.3 ms measure data and send them to mikroPlot 13 if ( read_flag == true ) 14 { 15 read_flag = false; 16 DisableInterrupts(); 17 18 temp_adc_read = ADC1_Get_Sample( 4 ); 19 if (temp_adc_read > LIMIT_TOP ) 20 { 21 temp_adc_read = LIMIT_TOP; 22 } 23 if (temp_adc_read < LIMIT_BOTTOM ) 24 { 25 temp_adc_read = LIMIT_BOTTOM; 26 } 27 temp_timer_read = interrupt_ctr * 2; 28 IntToStr(temp_adc_read, final_string); 29 sprintf(timer_read_string,"%.2f", temp_timer_read); 30 strcat(final_string, ","); 31 strcat(final_string, timer_read_string); 32 Ltrim(final_string); 33 UART1_Write_Text(final_string); 34 UART1_Write_Text("rn"); 35 36 EnableInterrupts(); 37 } 38 }
EMG Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.