Armcortex Adc

Understand the processor core and the ADC peripheral with hands-on projects using the Atmel SAM4s microcontrollers

Last updated 2022-01-10 | 4.4

- Understand the processor and exception model for ARM Cortex processors
- Use ASF (Atmel Studio Framework) to write embedded code for ARM Cortex microcontrollers
- Handle ADC triggers and interrupts

What you'll learn

Understand the processor and exception model for ARM Cortex processors
Use ASF (Atmel Studio Framework) to write embedded code for ARM Cortex microcontrollers
Handle ADC triggers and interrupts
How to read digital codes and find their corresponding analog value
How to read chip temperature using ADCs
Understand the core concepts of analog to digital converters
Directly write to registers to program ARM Cortex peripherals
Understanding embedded systems
Program ADCs on ARM Cortex
Understand and configure various timing requirements of an ADC

* Requirements

* Basic understanding of embedded systems
* C programming
* We will be using SAM4s Xplained Pro development board
* it is helpful but not necessary for students to purchase it

Description

This course received a major update in Feb 2018 based on the feedback provided.

Welcome to this course on Hands-on Embedded Systems with Atmel SAM4s ARM Processor. At the end of this course you will be comfortable with the ARM processor core, processor model, exception model, reset sequence, general and special registers, and also a master in the ADC peripheral. This course has been made from the ground-up to help you transition from the world of Arduino into the world of 32 bit Atmel SAM4s ARM microcontrollers.


Who am I?

I’m Akshay, and I’ll be your instructor for this course. I have been fascinated with micro controllers since I was a child, and now I consider it lucky to have it as my profession. I currently write firmware for safety critical systems that go inside electric cars. With my knowledge of embedded systems over the past 10+ years, and working in Silicon Valley, I have gained a unique insight into what the industry needs and what the students are lacking.    


Course Structure

This course has 8 sections.

Section 1 will help you understand the differences between Arduino and 32 bit ARM Cortex. You will also understand the Cortex-M instruction set.

Section 2 is dedicated to the setup of the development environment and hardware. This section also contains reference documents that you will be using for the rest of the course.

Section 3 is about the processor fundamentals. At the end of this section you will be comfortable with the inner workings of the processor, the general and special registers that do all the magic inside the processor. You will learn how to interpret the assembly instructions and how they work inside the processor.

Section 4 is about the peripherals. You will learn the theory behind the ADC (Analog to Digital Converter) peripheral. 

Section 5 is the first project of this course where you will sample an analog voltage using ASF libraries in Atmel studio and understand how the peripheral and processor work together to convert this into a digital code.

Section 6 is the second project in this course where you will understand how an analog voltage is sampled and implement it by directly writing to the registers. (No library use here)

Section 7 is the third project in this course where you will understand how to sample real time temperature and how the processor interprets the value in degrees C of F. You will implement it using ASF code.

Section 8 is a homework project in which you will implement temperature sensing using direct register access. Solutions are provided for reference.


This course content was generated from scratch in a way to get the point across to you, in the most efficient, exciting and engaging way!

Is this course for me?

If you are an embedded systems enthusiast, professional or student who is struggling to start programming on the ARM Cortex-M platform, this course if for you. If you have worked with Arduino before, and have basic working knowledge of embedded systems, this course is for you. If you have already been working with ARM Cortex microcontrollers and want to gain a deeper understanding of the processor’s fundamentals as well as the ADC peripheral, then this course is for you!


Can I use another development board?

I use the Atmel SAM4s Xplained Pro development board in this course which houses a ARM Cortex-M4 processor. You may choose any other microcontroller of your choice that works with Atmel Studio. If you need help selecting a board, let me know and I can help you out.


My personal guarantee

I am proud to say that I stand behind this course 100%, and guarantee you that you will get valuable information from this course. There is also a 30 day money back guarantee from Udemy.

With this, you can feel confident about your purchase and know that it is a valuable find.

Who this course is for:

  • Beginners to embedded programming, with basic understanding of code
  • Intermediate embedded programmers
  • Students wanting to explore embedded programming
  • ARM Cortex enthusiasts
  • Atmel enthusiasts

Course content

10 sections • 46 lectures

Limitations of Arduino and how to surpass the learning barrier Preview 01:20

Arduino to Atmel SAM4s Preview 03:39

SAM4s Hardware Preview 05:35

Cortex-M Instruction Set Preview 03:05

Atmel Studio Installation Preview 01:44

Setting up the SAM4s board in Atmel Studio Preview 03:15

In this lecture, you will power up the board, connect the debug USB cable to the board and load up a hello world project which turns the on board LED on when switch 0 on the board is pressed.

Reference documents Preview 01:02

Programmers Model Preview 06:10

Programmers Model - General Registers Preview 04:35

Programmers Model - Special Registers Preview 05:36

Exception Model Preview 18:04

High level system overview and transitioning into peripherals Preview 03:50

Section Introduction Preview 00:23

ADC Theory Preview 05:04

In this video you will learn the theory for analog to digital converters using the block diagram of the SAM4s ADC peripheral.

ADC Theory Quiz

A few questions on things we covered in Lecture 4 about ADC Theory

Sample and Hold Circuit Simulation Preview 01:12

This is a simulation to show the importance of sample and hold circuits used in many ADCs on the market.

ADC Theory Quiz 2

Quick recap of the ADC theory we learned in this section

Introduction to the first project Preview 03:40

Introduces you to the first of 3 projects that we will be working on.

ADCs - Common points of error quiz

Atmel Studio Framework (ASF) Setup Preview 02:49

ASF Quiz

Writing the ADC setup function Preview 08:39

Attached document is a quick start guide provided by Atmel to use its ASF framework to get started with ADCs. There are certain inconsistencies and errors in this document, like the naming of the ADC handler function. But the following video will take you through the correct way of configuring and programming the ADC.

ADC setup Quiz

Quick recap of what we learned in the ADC init function

Writing the ADC setup function - part 2 Preview 03:40

ADC setup Quiz

ADC timing quick recap

Writing the ADC setup function - part 3 Preview 04:09

ADC Timing Configuration Quiz

Writing the Interrupt Handler and Running the Code Preview 05:00

Triggers and Interrupt Handler Quiz

Programming the ADC Control Register Preview 03:59

In project 2 we will be reading an analog signal of 1 volts on ADC 5, but we will configure the ADC by writing directly to the registers. In this video you will learn to program the ADC control register.

Programming the ADC Mode Register Preview 09:26

In this video you will learn how to program the ADC Mode Register. This is where most of the ADC timing specifications will be programmed.

ADC Mode Register Quiz

Programming the ADC Channel Enable and Interrupt Enable Registers Preview 05:25

In this lesson you will learn how to program the ADC Channel Enable register and ADC Interrupt Enable register.

Compiling and running the code! Preview 02:33

ADC Registers Quiz

Project Introduction Preview 00:42

Introduces you to the third project in this course in which you will learn how to program the on board temperature sensor of the SAM4s ARM Cortex M4 microcontroller.

Configuring the ADC to read the on-board temperature sensor Preview 05:45

Temperature sensing quiz

Measuring room temperature Preview 04:23

In this lesson you will learn how to measure and interpret the temperature sensor reading at room temperature

Heat up the board and test the temperature sensor! Preview 01:23

In this lesson, we heat up the board using a heat gun and test the temperature sensor that you have programmed in the previous lessons!

NVIC Quiz

Your objective Preview 00:07

This is a homework project for you will learn how to get the configure, enable and read the on board temperature sensor by directly writing to registers.

Solution and source code Preview 00:15

Congratulations and thank you! Preview 00:31