1TE663/723 HT2021 - Lab 5 part 1

  Рет қаралды 188

Uwe Zimmermann

Uwe Zimmermann

Күн бұрын

Using the analog-to-digital converter in an ATmega328 to read the voltage level at an analog input pin and to display the result on a 4-digit 7-segment display. This follows the previous lab exercise from • 1TE663/723 HT2021 - La...
00:00 choosing the analog input pin
01:30 connecting a potentiometer for a variable voltage
03:30 the hardware control register of the ADC
05:00 the basic code template
06:30 the init()-function
07:30 writing cleaner code to display a numeric value on the display
13:30 setting up the ADMUX and ADCSRA register
17:30 reference voltage selection
18:30 right- or left-alignment of the 10-bit result in the result register
20:50 analog multiplexer and selecting the input
22:20 the control bits ADEN och ADSC
24:20 setting up the clock prescaler
25:30 reading the ADC conversion result
26:30 starting a new conversion and waiting for the result
28:50 use of the &-operator to check a single bit
30:30 compiling and uploading the code
The code template can be found here: pastebin.com/6dWHQV5x

Пікірлер: 2
@emilalmberg1096
@emilalmberg1096 2 жыл бұрын
Oj, mycket info i snabb takt, bra jobbat!
@uwezimmermann5427
@uwezimmermann5427 2 жыл бұрын
tacka schemaläggarna på Uppsala universitet för ett tajt schema denna vecka.
ATmega328 and PlatformIO - no Arduino!
16:21
Uwe Zimmermann
Рет қаралды 11 М.
6 Horribly Common PCB Design Mistakes
10:40
Predictable Designs
Рет қаралды 182 М.
БАБУШКИН КОМПОТ В СОЛО
00:23
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 15 МЛН
A teacher captured the cutest moment at the nursery #shorts
00:33
Fabiosa Stories
Рет қаралды 32 МЛН
HAPPY BIRTHDAY @mozabrick 🎉 #cat #funny
00:36
SOFIADELMONSTRO
Рет қаралды 18 МЛН
New model rc bird unboxing and testing
00:10
Ruhul Shorts
Рет қаралды 25 МЛН
🇸🇪 1TM121 VT 2022 - Labb 2 del 2
15:55
Uwe Zimmermann
Рет қаралды 58
🇸🇪 1TM121 VT 2022 - Labb 2 del 3
13:18
Uwe Zimmermann
Рет қаралды 88
Why Isn't Functional Programming the Norm? - Richard Feldman
46:09
OpenAI's New SearchGPT Shakes Up the Industry, Google Stock CRASHES!
10:10
Java Is Better Than Rust
42:14
ThePrimeTime
Рет қаралды 167 М.
But, what is Virtual Memory?
20:11
Tech With Nikola
Рет қаралды 242 М.
The RS-232 protocol
26:10
Ben Eater
Рет қаралды 828 М.
Harder Drive: Hard drives we didn't want or need
36:47
suckerpinch
Рет қаралды 1,6 МЛН
iPhone socket cleaning #Fixit
0:30
Tamar DB (mt)
Рет қаралды 16 МЛН
#samsung #retrophone #nostalgia #x100
0:14
mobijunk
Рет қаралды 10 МЛН
Красиво, но телефон жаль
0:32
Бесполезные Новости
Рет қаралды 1,5 МЛН
Telefonu Parçaladım!😱
0:16
Safak Novruz
Рет қаралды 26 МЛН