
In this lesson, we’ll learn about different pin functionalities of ATmega328 Microcontroller. We’ll explore how the port pins are organized on to the chip. There are 3-Ports and 28-physical pins we have on ATmega328.
In this lesson, we will learn different peripheral features and specification. In short we will learn capabilities of ATmega328 microcontroller chip. There are different types of memories like flash, sram, eeprom. And also internal peripherals such as timer, interrupts, ADC, PWM, USART, I2C, SPI etc.
There are plenty of microcontroller development boards out there. We will explore most popular Arduino Uno and ATmega328 xPlained Mini Board. We’ll learn how these low-cost development boards makes life easy while learning microcontroller programming.
We will learn in detail about how the ATmega328 Microcontroller Port Pins are placed on Arduino uno. As in the beginning, we’ll be using Arduino uno later on for advance topics we will be using ATmega328 xPlained Mini Development Board.
Let’s download and install Atmel Studio7 IDE from official website. After initial setup we’ll install programming utility xLoader, which can be used to upload HEX file into Microcontroller Chip.
In this lesson will walk you through, how we can connect microcontroller board to laptop for programming. Arduino is easy to setup and program as compared to other ATmega328 Microcontroller boards.
Let’s learn how to create microcontroller project from scratch using Atmel Studio7 IDE. The simple LED blink example will demonstrate step-by-step how to write program and upload code on to ATmega328 Microcontroller.
Let’s refresh the basics of number system, which is a foundation of computer programming. We will learn Decimal, Hexadecimal and Binary format to represent the numbers. The understanding will help us write professional microcontroller programs.
In this lesson, we’ll learn various bitwise operators such as AND (&), OR (|), XOR (^), Left Shift (<<), Right Shift (>>). To implement logic in microcontroller programs we must use these operators. The efficient use of bitwise operators will make you good embedded developer.
The bit masking will let us precisely operate upon the bits of our interest. We will use bit-masking to SET or CLEAR individual bit in microcontroller register. The use of bitwise operator makes program more redundant and easy to read.
In this lesson, we will learn how to configure ATmega328 port pins into output mode. This will let us control output devices connected microcontroller. As an example we will control LED by blinking with delay.
In this lesson, we will learn to configure GPIO Pins of Microcontroller into input mode. This will let us use switch and other input devices in microcontroller project. We will use tactile switch to control the LED.
Let’s learn about timers, with the help of timers we provide time variable to our microcontroller project. We will learn about concept of timer in general. And how timer works? Inside microcontroller chip.
In this lesson, we’ll learn how to use timer in microcontroller projects. We'll use simple counter to count clock cycle and blink LED when particular count matches to timer register. This simple example will demonstrate use of timer registers.
In this lesson, we’ll learn use of timer but more sophisticated way. This let's us to create own delay function using timer counter registers. In this example, we’ll set up flag in timer register to blink LED.
Let’s learn about Interrupts and ISR (Interrupt Service Routine). We will learn, what is interrupt? why we should use them and how interrupt works?. Interrupt makes microcontroller program modular. And to write good microcontroller firmware we must use interrupt.
Let’s learn about different types of interrupts. In general, interrupts are classified into Internal and External Interrupts. We’ll learn when to use what. Since, interrupt is very vast topic. We will learn about its registers and how they work when generating an interrupt.
In this lesson, we will write a program which implement timer interrupt. To keep it simple in the beginning we will blink led using timer interrupt. The demonstrate how to use ISR and generate interrupt using timer peripheral. So later on, we can generate interrupt with any other microcontroller peripherals.
PWM stands for Pulse Width Modulation and it is a technique used in controlling the brightness of LED, speed control of Motors or wherever we have to get analog output from digital input. It’s basically a method of generating an analog signal from digital input of a microcontroller.
There are Two PWM Modes in ATmega328 Microcontroller. Fast PWM Mode and Phase Correct PWM Mode. In this lesson, we’ll only focus on Fast PWM Mode, which provide high frequency PWM Waveform generation. It’s a single slope operation.
In this lesson, we'll learn how to Generate PWM Signal on PD6 pin of AVR ATmega328 Microcontroller. This example code uses fast pwm mode with timer0 to generate pwm signal. In the end, we'll change the duty cycle of a clock and Control the Brightness of an LED.
Let’s learn about UART (Universal Asynchronous Receiver Transmitter). It’s a Serial communication protocol. And can be used to communicate microcontroller with other devices which support UART Peripheral. We’ll learn, how UART allows us to establish communication between PC and Microcontroller.
PuTTY is serial terminal software for windows users. We’ll use it as a Serial Console to read data on Computer Screen sent by microcontroller. This data could be just a character, string or sensor data. The use of PuTTY makes developers life easy to debug the code.
In this lesson, we will learn how to use UART Protocol in ATmega328 Microcontroller. We’ll write a program to transmit character byte from microcontroller to terminal (serial console). We’ll get comfortable working with UART Registers in order to print character on computer screen.
In this lesson, we’ll write a program to receive character byte sent from serial console. The two ways communication between MCU and PC will let you understand, how powerful UART is in any microcontroller project. Basically using UART, we can interact with any device connected to microcontroller
In this lesson, we will extend previous program to transmit string from microcontroller to serial console. This example will demonstrate the use of UART to send group of characters. Later on, we’ll use the same concept to print sensor data on serial terminal of personal computer.
Let's learn how to distribute code from one single file to multiple library files. This makes life easy to maintain, share and resue the code across microcontroller projects.
Learn Analog to Digital Conversion with ATmega328 Microcontroller. There are total 6-ADC channels/pins with 10-bit resolution.
Let's learn how to Configure ADC & Interface Temperature Sensor (LM35) with AVR Microcontroller. Later on, we'll write a program and read temperature data in degree centigrade.
Let's learn, how to convert Analog voltage from Sensor to equivalent temperature value in Degree Celcius.
In this lesson, we'll explore how to configure Multiple ADC Channels. So that we can use multiple ADC Pins in Microcontroller Project.
If you’re reading books of microcontroller programming, following different blogs and still feel stuck. Then you came to the right place, this microcontroller programming course designed around most popular 8-bit ATmega328 AVR Microcontroller. In this course, we will learn how to write C Programs for ATmega328 MCU. I’ve made complex concept easy to understand using quality content. It doesn’t matter if you’re new to microcontrollers or already know basics. I am sure you’ll enjoy learning with this course.
Short Description:
We’ll begin our journey to explore microcontroller right from the basics like setting-up official Atmel Studio7 IDE, installing programming utilities and hooking up the circuits in easiest way. To keep the hardware part simple in the beginning, we will use ATmega328 chip on Arduino Uno. Believe me this will save our time at hardware side so that we can focus more on core microcontroller features through AVR C Programming. Later on, as the time rolls on we will use ATmega328 Xplained Mini evaluation kit to learn advance debugging techniques.
"The Biggest objective of this course is to help you build sound understanding of microcontroller architecture and peripheral registers in-order to use them while writing professional embedded systems software”
We will setup every circuit from scratch and write microcontroller firmware for it. We will spend enough time in the beginning to get basics right. This will save time in long run and make you feel confident working with Microcontroller Architecture and C Programming.
Later on, we will be building mini projects to use LED, Switches, Analog and Digital Sensors (temperature/humidity/light Intensity/distance), IR Sensor, Relays and many more. These projects can be small yet very powerful to lay down strong foundation to use GPIO, Timer/Counter, Interrupt, PWM, ADC, Serial UART and other peripherals while developing embedded software and hardware.