Differences

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

Link to this comparison view

pm:lab:lab0xc0-4 [2020/04/06 09:42]
iuliana.brinzoi [Setup]
pm:lab:lab0xc0-4 [2020/04/07 21:54] (current)
iuliana.brinzoi [Tasks]
Line 12: Line 12:
  
 === Sampling Rate === === Sampling Rate ===
-The sampling rate represents the time at which the values of the analog input signal are read. The time is divided into discrete intervals, each sampling a value from the input signal. The Nyquist ​rate tells us that it is mandatory for the sampling rate to be as twice the frequency of the analog input signal so that the signal can be reconstructed afterwards. +The sampling rate represents the time at which the values of the analog input signal are read. The time is divided into discrete intervals, each sampling a value from the input signal. The Nyquist ​frequency ​tells us that it is mandatory for the sampling rate to be at least twice the frequency of the analog input signal so that the signal can be reconstructed afterwards. 
-There appears a problem where frequencies above half the Nyquist ​rate are sampled because they are incorrectly detected as lower frequencies. This process is called aliasing.+There appears a problem where frequencies above half the Nyquist ​frequency ​are sampled because they are incorrectly detected as lower frequencies. This process is called aliasing.
 {{ :​pm:​lab:​adc_2.png?​600 |}} {{ :​pm:​lab:​adc_2.png?​600 |}}
  
 === ADC Types === === ADC Types ===
-== Direct Conversion ==+== Direct Conversion ​(Flash ADC) ==
 Has a bank of comparators sampling the input signal in parallel, each firing for their decoded voltage range. The comparator bank feeds a logic circuit that generates a code for each voltage range. Has a bank of comparators sampling the input signal in parallel, each firing for their decoded voltage range. The comparator bank feeds a logic circuit that generates a code for each voltage range.
 {{ :​pm:​lab:​adc_3.png?​300 |}} {{ :​pm:​lab:​adc_3.png?​300 |}}
Line 125: Line 125:
 ===== Tasks  ====== ===== Tasks  ======
 Sketch is available here: {{:​pm:​lab:​lab3.zip|}} Sketch is available here: {{:​pm:​lab:​lab3.zip|}}
 +<​hidden>​
 +Solution is available here:​{{:​pm:​lab:​lab0xc3_sol_asistenti.zip|}}
 +</​hidden>​
   - To the PA1 pin there is connected a voltage divider. Push buttons control the output voltage. Read the value from the pin using polling and print the corresponding voltage to the serial console.   - To the PA1 pin there is connected a voltage divider. Push buttons control the output voltage. Read the value from the pin using polling and print the corresponding voltage to the serial console.
   - There is a temperature sensor (LM35) connected to PA0 pin. Configure the ADC to read the value from the sensor using interrupts. Display on the UART console the voltage and the temperature in Celsius degrees associated with it.   - There is a temperature sensor (LM35) connected to PA0 pin. Configure the ADC to read the value from the sensor using interrupts. Display on the UART console the voltage and the temperature in Celsius degrees associated with it.
-  - Configure the ADC to start a conversion every 10 ms using Timer 0 compare match as trigger event and read the value using interrupts.+  - Configure the ADC to start a conversion every 10 ms using Timer 0 compare match as trigger event and read the value from the potentiometer connected to PA6 using interrupts.
 <note tip> <note tip>
 Hint: Check out ADTS2:0 bits in ADCSRB register Hint: Check out ADTS2:0 bits in ADCSRB register
pm/lab/lab0xc0-4.1586155360.txt.gz · Last modified: 2020/04/06 09:42 by iuliana.brinzoi
CC Attribution-Share Alike 3.0 Unported
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