Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:software:homelab:library:adc [2010/03/08 14:42] mikk.leinien:software:homelab:library:adc [2020/07/20 12:00] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Analog to digital converter ======+====== Analog to Digital Converter ======
  
-This library provides functions to use AVR analog to digital converter. All the conversion functions in library are blocking, which means that the processor waits as long as it takes to get the results. The conversion time depends on the ADC clock.+This library provides functions to use AVR analog to digital converter. All the conversion functions in library are blocking, which means the processor waits as long as it takes to get the results. The conversion time depends on the ADC clock.
  
-===== Data types =====+===== Data Types =====
  
   * **//adc_reference//** \\ ADC reference voltage enumeration data type. Options:   * **//adc_reference//** \\ ADC reference voltage enumeration data type. Options:
Line 32: Line 32:
  
   * **//unsigned short adc_get_average_value(unsigned char channel, unsigned char num_samples)//** \\   * **//unsigned short adc_get_average_value(unsigned char channel, unsigned char num_samples)//** \\
-    Converts specified ADC channel analog value to digital desired number of times and calculates the average. Function is blockin. Parameters:+    Converts specified ADC channel analog value to digital desired number of times and calculates the average. Function is blocking. Parameters:
     * //channel// - ADC channel number (0 to 7).     * //channel// - ADC channel number (0 to 7).
     * //num_samples// - Number of samples for calculation (1 to 64).     * //num_samples// - Number of samples for calculation (1 to 64).
Line 39: Line 39:
 ===== Example ===== ===== Example =====
  
-For exampl,ADC is initialized and two analog channel values are converted to digital. Value of channel 0 is assigned to variable //x// and averaged value of channel 1 to variable //y//.+For example ADC is initialized and two analog channel values are converted to digital. Value of channel 0 is assigned to variable //x// and averaged value of channel 1 to variable //y//.
  
 <code c> <code c>
en/software/homelab/library/adc.1268052135.txt.gz · Last modified: (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0