Mô tả

As one of the most extensive courses available: we will look at everything and more under the hood of Arduino. At its core, the ATmega328P MCU integrates many features that are not exposed through the Arduino library. While learning how the periphery works, the student writes code, exhibiting high performance at low power consumption. Embedded systems deployed in the field and powered by small batteries can run and collect data for years.

The enormous advantage of the AVR platform is that many concepts introduced in this course also apply to other MCUs. Therefore, an entire portfolio of MCUs, ranging from the small ATtiny to the larger ATmega series, becomes accessible. The ATmega328P used in this course is just an example and the gained knowledge is applicable to many embedded systems not limited to the Arduino platform. This is motivated by practical sessions and exercises in which real-world problems are to be solved. In case questions during implementation arise, the student can peek at hints and tips and if nothing works, also at the solutions with plenty of comments in the source code.

This course provides handmade captions in English covering the following topics, which focus on the practical aspects and what a concept can be used for. In addition, the course does not follow a particular outline and the topics can be taken in any order based on the interest and needs. The covered topics include:

  1. GNU Compiler Collection and what happens in every Step and why

  2. A brief introduction to C and Pointers

  3. Moving from the Arduino library to AVR: Less Luxury, faster Execution, fewer Resources

  4. How to compile with Makefiles? Targets, Rules, and Shortcuts

  5. Easy Mistakes in C and how to avoid them

    1. Attack Vectors

  6. Peripheries:

    1. Timers, Counters, and Pulse Width Modulation

    2. Interrupts

  7. Communication Protocols

    1. UART/USART

    2. I2C/TWI

    3. SPI

    4. DHT and 1-Wire

    5. USI

    6. How to mimic other, formerly incompatible, and unsupported Protocols?

  8. Analog-Digital Converter

    1. How does it work?

    2. Measuring the Temperature without external Components

    3. Measuring Battery Level with the ADC

  9. Analog Comparator

  10. Non-volatile Memories

    1. Flash

      1. How to use the Flash (Program Memory) for Constants?

      2. How to use the Flash while executing a Program?

    2. EEPROM

    3. Fuses

      1. Clock Sources

      2. Lock Bits

      3. Debugging

  11. Running the AVR on a Breadboard

  12. Saving power

    1. Sleeping

    2. Dynamic Clock Frequency

    3. Turning off unnecessary Components

    4. Wake-up Sources

  13. Debugging (with practical examples)

    1. Simulators

    2. JTAG

    3. debugWIRE

  14. Bonus Chapter: Parallel Task Execution

After completing this course, the successful student will have the experience not only to evaluate existing software but also create implementations that are highly optimized to be deployed on small microcontrollers to squeeze out every quantum of performance and battery life.

Bạn sẽ học được gì

Yêu cầu

Nội dung khoá học

21 sections

Welcome

3 lectures
Welcome!
09:35
Updates on Social Media
00:08
Bonus Chapter
01:55

The GNU Compiler Collection

14 lectures
Introduction
02:17
Introduction
1 question
The Preprocessor
02:14
The Debugger
01:51
The Debugger
1 question
The Compiler
02:24
The Assembler
04:37
The Linker
02:14
The Linker
1 question
The Object Copy
01:58
The Object Copy
2 questions
The Uploader
02:20
Summary
01:25
Exercise
00:48

Introduction into C

9 lectures
Basic Types and Control Flow
07:16
Basic Types and Control Flow
7 questions
Arrays and Pointers
10:01
Exercise: String Concatenation
00:48
Enum, Union, and Struct
03:37
Exercises: Type Sizes
00:26
The Enum, Union, and Struct
2 questions
Call by Value/Reference
13:37
Exercise: Call by Value/Reference
00:31

Arduino -> AVR

10 lectures
Arduino -> AVR
08:54
Arduino -> AVR
1 question
How does a Pin work internally?
06:21
How does a Pin work internally?
5 questions
Memory Space, Registers, and Pointers
17:12
Memory Space, Registers, and Pointers
2 questions
Exercise: Memory Space, Registers, and Pointers
00:43
The AVR Library
10:18
The AVR Library
2 questions
Exercise: The AVR Library
00:40

Makefile

11 lectures
Why Makefile? Its Basics
07:27
Why Makefile? Its Basics
3 questions
Let's cook Biryani - A practical and tasty Example for Makefiles
13:43
Let's cook Biryani - A practical and tasty Example for Makefiles
1 question
The AVR-GCC
08:56
The AVR-GCC
4 questions
Where is the main() and #include directives?
03:26
Exercise: Makefile and Blink using only the AVR Library
01:49
Uploading using AVRDUDE
05:04
Exercise: Makefile and Upload
00:59
Summary
01:28

Easy Mistakes in C

29 lectures
Classic Example: Buffer Overflow
12:38
Classic Example: Buffer Overflow
4 questions
Buffer Overflow Demo and Introduction into GDB
17:54
Buffer Overflow Mitigation
03:09
Exercise: Unsafe printf?
00:34
Exercise: Buffer Overflow and GDB
01:28
SEI CERT C/C++ Coding Standard
02:31
SEI CERT C/C++ Coding Standard
1 question
DCL30-C (Declare Objects with Appropriate Storage Durations)
05:12
DCL30-C (Declare Objects with Appropriate Storage Durations)
1 question
Exercise: DCL30-C (Declare Objects with Appropriate Storage Durations)
01:02
EXP33-C (Do not read uninitialized Memory)
02:42
EXP33-C (Do not read uninitialized Memory)
1 question
EXP34-C (Do not dereference NULL Pointers)
03:44
EXP34-C (Do not dereference NULL Pointers)
1 question
EXP42-C (Do not compare padding Data)
10:57
EXP42-C (Do not compare padding Data)
2 questions
STR31-C (Storage for Strings has sufficient Space for Data and NULL)
01:40
STR31-C (Storage for Strings has sufficient Space for Data and NULL)
1 question
MEM30-C (Do not access freed Memory)
02:56
MEM30-C (Do not access freed Memory)
2 questions
FIO47-C (Use valid Format Strings)
01:05
ENV33-C (Do not call system())
02:26
ENV33-C (Do not call system())
1 question
MSC30-C/MSC32-C (Pseudorandom Number Generators)
03:49
MSC30-C/MSC32-C (Pseudorandom Number Generators)
1 question
FLP30-C (Do not use Floating-Point Variables as Loop Counters)
06:35
FLP30-C (Do not use Floating-Point Variables as Loop Counters)
1 question
Summary
02:06

Timers, Counters, and PWM (Pulse Width Modulation)

17 lectures
Introduction into Timers/Counters
09:27
Introduction into Timers/Counters
2 questions
Timer Clocks and Prescalers (CSn2:0), Tn and TOSC pins
09:24
Timer Clocks and Prescalers (CSn2:0), Tn and TOSC pins
1 question
Normal Mode
03:29
Normal Mode
1 question
Clear Timer on Compare Match (CTC) Mode
14:13
Clear Timer on Compare Match (CTC) Mode
1 question
Exercise: Clear Timer on Compare Match (CTC) Mode
01:11
Fast Pulse Width Modulation (PWM)
10:04
Exercise: Fast Pulse Width Modulation (PWM)
01:24
Phase Correct Pulse Width Modulation (PWM)
06:07
Phase and Frequency Correct Pulse Width Modulation (PWM)
04:36
Timer Modes
1 question
Differences of the Timers and the Input Capture Unit
08:49
Differences of the Timers and the Input Capture Unit
2 questions
Summary
01:29

IRQ (Interrupts)

17 lectures
Interrupts versus Polling
07:12
Practical Example: Interrupt versus Polling
07:54
Interrupt versus Polling
1 question
Interrupt Subroutine (ISR)
03:58
Activation of local and global Interrupts
03:13
Interrupt Vector Table (IVT)
02:06
Interrupt Vector Table (IVT)
1 question
Practical Demo: Interrupt Vector Table (IVT)
05:58
What is the attribute volatile?
04:45
Internal and External Interrupts, PCINTn and Groups, INTn
12:21
Internal and External Interrupts, PCINTn and Groups, INTn
1 question
Priority of Interrupts
02:01
Nested Interrupts
02:59
Nested Interrupts
2 questions
Code Coding Practice in Interrupt Subroutines
02:08
Summary
01:48
Exercise: ATmega Sound
05:09

Communication: The Universal Asynchronous Receiver Transmitter (UART, USART)

14 lectures
The UART Protocol
08:02
The UART/USART Protocol
2 questions
The USART Protocol
01:35
The USART Protocol
2 questions
The Parity Bit
03:46
The Parity Bit
2 questions
Duplex, Half-Duplex and Simplex in UART/USART
07:34
UART: The Blocks (Clock Generator, Transmitter, Receiver, Configuration)
03:55
UCSRnA, UCSRnB, and UCSRnC
06:51
Configuration of the Transfer Speed (UBRRn, U2Xn)
10:39
Example: Let's code a Simplex UART
19:58
Exercise: UART
00:42
Summary
01:18
Exercise: UART and integers
00:51

Communication: I2C

16 lectures
Introduction into I2C/TWI
04:19
The I2C/TWI Bus System
05:43
Transfer: Master to Slave and vice versa
08:49
I2C/TWI Addressing
08:19
I2C/TWI Addressing
3 questions
Conflict Resolution in I2C/TWI
03:24
Conflict resolution in I2C/TWI
4 questions
I2C/TWI in the ATmega328P (Registers, Control, Status)
13:04
I2C/TWI in the ATmega328P (Registers, Control, Status)
1 question
I2C: Practical Session, Part 1 (Coosing Pull-Up Resistor Sizes)
10:59
I2C: Practical Session, Part 2 (I2C Master)
44:22
I2C: Practical Session, Part 2 (I2C Master)
1 question
I2C: Practical Session, Part 3 (Building a static Library)
31:06
Exercise: I2C Address Scanner
01:20
Exercise: I2C Master Read
00:52
Summary
02:14

Communication: Serial Peripheral Interface (SPI)

7 lectures
Introduction into SPI (Serial Peripheral Interface)
03:51
SPI Topologies
12:16
The SPI Control Register (SPCR)
06:23
The SPI Status Register (SPSR) and the SPI Data Register (SPDR)
02:54
Practical Session: Master SPI and Slave SPI
41:43
Exercise: Parallel SPI Data Transfer
02:39
Summary
03:04

Communication: 1-Wire

8 lectures
The DHT11/22 is not a 1-Wire device
07:33
Parasitic Power in 1-Wire
05:03
The 1-Wire Bus
03:55
The 1-Wire Protocol
06:27
The Search ROM Command
08:52
Library Support and Oscilloscope
05:52
Exercise Part I: How to use the Atmega Oscilloscope?
25:44
Exercise Part II: Implement a DHT Master
02:38

Communication: the Universal Serial Interface (USI in the ATtiny)

3 lectures
1-Wire and UART
16:22
UART, I2C, and SPI to USI
07:00
USI in ATtiny
15:33

Analog-to-Digital Converter (ADC)

13 lectures
The Analog World (Analog-to-Digital Converter [ADC] Introduction)
11:09
ADC: Reference Voltages
08:22
ADC: The Temperature Sensor and its Calibration
20:33
ADC: The Bandgap Reference (Measuring the State of the Battery)
07:20
ADC in the AVR: ADMUX (Part 1, Reference Voltage)
15:04
ADC in the AVR: ADMUX (Part 2, Input Channels)
03:43
ADC in the AVR: ADSC in ADCSRA (Configuration and Status Register A)
05:32
ADC in the AVR: Sample Rate
09:20
ADC in the AVR: Autotriggering Sources (ADATE)
09:28
ADC in the AVR: Autotriggering Sources (ADATE)
1 question
ADC in the AVR: Reducing Noise/Power (DIDR) and Randomness
07:17
Exercise: The ATmega Digital Oscilloscope
02:48
Exercise: The ATmega Analogue Oscilloscope
02:23

Analog Comparator (AC)

3 lectures
The Analog Comparator in the ATmega
15:12
Exercise: Proximity Senors with the Analog Comparator
01:49
Alternative Exercise: Find the Bandgap Reference Voltage
01:01

Flash and EEPROM in the ATmega

14 lectures
Non-Volatile Memory: Storing Data as Constants in the Flash (Program Space)
08:32
Storing String Constants in an Array in the Program Space
07:28
The __flash keyword instead of PROGMEM
01:58
Flash: No-Read-While-Write (NRWW), Read-While-Write (RWW) and BOOTSZ
07:00
Determining BOOTSZ Settings
02:59
Storing Data in the Flash (Practical Example)
05:55
Locating free Pages in the Flash
30:38
Locating free Pages in the Flash
1 question
Exercise: Program the Flash and store constants in the Flash (Program Memory)
02:56
EEPROM of the ATmega (Register Description)
06:11
EEPROM Writing Timings and Initialization
06:36
Initialization of the EEPROM (Practical Session)
10:46
Summary: Flash and EEPROM (Quick Comparison)
02:29
Exercise: Internal Temperature Sensor Calibration Data stored in the EEPROM
01:23

Standalone AVR

6 lectures
The Functionalities provided by an Arduino Board
05:57
Our own Power Supply and Reset for the ATmega
07:27
Our own System Clock and the LFuse
06:53
The In-System Programmer (ISP)/In-Circuit Serial Programmer (ICSP)
20:55
Bit-Banging ISP through FTDI232 and other Arduino ISP Settings (X3 Connector)
06:25
Exercise: Standalone ATmega
01:35

SLEEP

12 lectures
Clock Frequency vs VCC vs Current
14:30
Clock Frequency vs VCC vc Current
1 question
The Power Reduction Register (PRR)
04:04
Sleep Modes and Energy: Fast Clock and long Sleep or slow Clock and short Sleep?
25:24
A Use Case for the General Purpose I/O Register
09:55
Floating and Sleeping Pins
03:03
The Watchdog (System Reset or Wake-Up or Both)
09:55
The Brown-Out Detector
05:12
The Brown-Out Detector
2 questions
Show Down in the Practical Session
13:18
Exercise: Reduce the Power Consumption
03:32
Summary
03:01

Debugging with debugWIRE

7 lectures
Simulating the ATmega MCU
42:45
JTAG, debugWIRE, Reset and the High Fuse
08:18
Hardware Debuggers: ATMEL-ICE, JTAG ICE MKII, AVR Dragon
02:33
Open Source DebugWireDebuggerProgrammer (all in one solution)
18:25
Hardware Breakpoints and Summary
02:37
Exercise: Examining a Program
01:22
Quest: DebugWireDebuggerProgrammer
00:47

Protecting your Program - Lock Bits

4 lectures
Protecting your Program from the Inside - Boot Lock Bits (BLB)
09:09
Protecting your Program from the Outside - Lock Bits (LB)
03:51
The Chip Erase
03:57
Exercise: Lock Bits
01:24

The End

1 lectures
The End
04:58

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.