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:multiasm:exercisesbook:arduinouno [2026/03/26 23:20] – [Table] pczekalskien:multiasm:exercisesbook:arduinouno [2026/03/26 23:42] (current) – [Reading analogue values] pczekalski
Line 48: Line 48:
 | ''OUT''      | Write the general-purpose register to the hardware register.     | | ''OUT''      | Write the general-purpose register to the hardware register.     |
 | ''ANDI''     | Masks a bit                                                      | | ''ANDI''     | Masks a bit                                                      |
-| 'ORI''       | Sets a bit                                                       |+''ORI''       | Sets a bit                                                       |
 </table> </table>
  
Line 58: Line 58:
  
 ==== Reading analogue values ==== ==== Reading analogue values ====
-Reading of the analogue values is not so straightforward as in the case of binary ones. Analogue reading uses a complex setup of ADC-related registers as presented in table {{ref>tabadcregisters}}:+Reading of the analogue values is not so straightforward as in the case of binary ones.  
 +Built-in ADC converter uses 10-bit resolution, has 6 channels (A0-A5, respectively). It also uses a reference voltage (configurable), typically 5V.\\ 
 +The low-level ADC register-based operations use the following formula to obtain an ADC value (figure {{ref>avreq1}}, based on the input value ''Vgpio'' and the reference value ''Vref''). 
 + 
 +<figure avreq1> 
 +{{:en:multiasm:exercisesbook:screenshot_from_2026-03-26_22-41-59.png?200|}} 
 +<caption>ADC value calculation based on the input voltage and reference voltage</caption> 
 +</figure> 
 + 
 +Analogue reading uses a complex setup of ADC-related registers as presented in table {{ref>tabadcregisters}}:
  
 <table tabadcregisters> <table tabadcregisters>
-<caption>ADC-related registersm used for reading of the analogue values of GPIOs</caption>+<caption>ADC-related registers used for reading the analogue values of GPIOs</caption>
 ^ Register   ^ Description                    ^ ^ Register   ^ Description                    ^
 | ''ADMUX''  | Selects voltage reference and  | | ''ADMUX''  | Selects voltage reference and  |
en/multiasm/exercisesbook/arduinouno.1774560021.txt.gz · Last modified: by pczekalski
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