
Explore embedded systems with avr c, contrasting microprocessors and microcontrollers, and comparing Harvard and human computer architectures. Learn avr basics, registers, masking, timers, pwm, lcd, and adc through hands-on projects.
Contrast microprocessors and microcontrollers: microprocessors require external RAM, ROM, and I/O, while microcontrollers integrate CPU, RAM, ROM, timers, and I/O on chip for embedded systems; Harvard vs Von Neumann architectures.
Compare von Neumann and Harvard architectures, highlighting von Neumann's single memory for data and code versus Harvard's separate program and data memories with simultaneous access in embedded systems.
Explore three criteria to select a microcontroller for an amber alert system, including computing power, power consumption, packaging, ram and rom, variants, availability, cost, and ease of development.
Explores the AVR microcontroller family, its Mega 16 variant, architecture, history, and on-chip features such as flash, RAM, EEPROM, ADC, SPI, and UART.
Discover mega 16 ports and how ddr, port, and pinx define pin direction, input, and output. Note that pins multiplex with adc channels and other functions.
Learn to write your first embedded c program for an avr microcontroller with microchip studio, blink an led using delay, generate a hex file, and burn it with Kazama.
Master bitwise operations and masking to set or clear a specific bit in an AVR register without disturbing other bits, using and, or, xor, and not for portable code.
blink an led on an avr device using masking to change a single bit in a port register while leaving other bits unchanged, with ddr setup and 1 second delays.
Learn masking with shifting to create bit masks in AVR embedded C. Set and reset specific bit positions using left and right shifts and bitwise operations.
Blink an LED on an ATmega16 using masking with shifting, configuring ddr and port bits, and applying 100 millisecond delays.
Implement circular shifting to rotate an eight-LED pattern on AVR using embedded C, turning one LED off while others stay on, with a 1-second delay to visualize the bit rotation.
Interface a switch with an AVR microcontroller using a pull-up resistor to prevent floating inputs; open yields high, closed yields low.
Enable the AVR's inbuilt pull-up resistors by configuring the DDR to input and setting the corresponding PORT bit to one, then read the input via the PIN register.
Learn to blink an LED with a switch using Embedded C on AVR, enabling internal pull-up and port directions, with a 200 ms blink when closed and off when open.
Control an led blink with multiple delay using embedded C on an AVR; release the switch to cycle blink rates (800 ms, 500 ms, 1000 ms) with pull-up input.
Explore how AVR timers work on ATmega16, including timer0, timer1, and timer2, their overflow behavior, and how to generate delays and PWM signals using timer registers.
Explore timer 0 on the avr microcontroller, including the timer counter, overflow and output compare flags, plus clock sources from crystal, external pin p0, and prescalers.
Compute the timer0 delay by selecting a clock source, calculating timer frequency, and deriving the 8-bit tcnt0 value (256−N) to reach the desired delay.
Program avr timer zero in normal mode by loading initial value, configuring prescaler, monitoring overflow flag, and stopping and resetting the timer to generate 250 microseconds delay at 1 mhz.
Discover pulse width modulation by varying duty cycle and on-time to control average output voltage, enabling a rough digital-to-analog conversion for motors, buzzers, and audio signals.
Generate pwm waveforms by comparing an 8-bit counter (0–255) with a configured output compare register value; this duty cycle controls the on time and the average voltage.
Learn how AVR timer zero generates pwm using OCR0 and TCNT0, selecting fast and phase-correct pwm modes with inverted and non-inverted outputs and clock prescalers.
Discover how to compute pwm frequency on avr by counting 256 timer cycles. With a 1 megahertz oscillator and prescaler of 1, the pwm frequency is 3.906 kilohertz.
Calculate pwm duty cycle on an 8-bit avr timer using on-time over a 256-count period, with non-inverted and inverted modes, using OCR0 values and a 75 percent example.
Configure timer0 for non inverted fast pwm with no prescaler to control led brightness via OCR0. Increment OCR0 from 0 to 255 with 20 ms delays for a brightness ramp.
Learn to interface a 16x2 lcd with microcontroller, using rs and registers, rw and enable signals, 4-bit and 8-bit modes, contrast and backlight control, and why lcds replace seven-segment displays.
Learn to initialize an LCD in 4-bit and 8-bit modes for AVR, wire RW, EN, and data lines, and send commands like clear display and set cursor positions.
Learn to interface a 16x2 LCD with a microcontroller using embedded C on AVR, using command and data functions to initialize, send commands, and write data.
Explore the LCD initialization function for AVR embedded C: set data lines to output, apply enable sequencing with a 2,000 microsecond delay, and initialize LCD for 5 by 7 pixels.
Learn to print characters on the LCD using Embedded C for AVR by implementing command and data functions, initializing the LCD, and positioning the cursor for ASCII output.
Position the LCD cursor with the go to XY function to set the row and column in hex addresses. Print full strings with the LCD print function.
demonstrates printing strings on an lcd by initializing the display, positioning the cursor with x and y coordinates, and using a print function to render multi-character text.
Learn to print integers on an LCD using embedded C on AVR, by extracting digits, converting to ASCII, and displaying characters up to five digits.
Demonstrates printing a five-digit counter on an lcd with embedded c on AVR, using lcd go to x y and lcd print integer to update every 200 ms from 00000.
Wrap LCD interface functions into a user defined embedded C library for AVR, enabling countdown displays and printing numbers and strings with x y positioning.
Process discrete values with digital computers, because the world is analog and sensors convert physical quantities to voltages, which an analog to digital converter turns into binary data.
Explore how analog-to-digital converters convert 0 to 5 volts into binary data, focusing on resolution and step size. Higher resolution lowers step size and increases complexity, memory, and processing needs.
Explain how the adc binary output is proportional to the input analog voltage and how step size and reference voltage determine the conversion.
Explore the ATmega16 ADC features: a 10-bit resolution, eight analog channels via a multiplexer, and selectable references (Vcc 5V, internal 2.56V, or external).
Explore the admux register in avr adc, selecting reference voltage and input channels via the adc multiplexer. Understand left and right adjust of adc results and how to read data.
Explore how the ADC on AVR is controlled via the ADCSRA register, enabling the ADC, starting conversions, handling end-of-conversion, auto triggering, interrupts, and selecting the clock prescaler.
Learn to program the avr adc in embedded c: enable the adc, choose channel zero, set prescaler, start and wait for conversion, read adch, and display results on an lcd.
Learn to read an adc value from 0 to 255 on an avr, compute the input voltage in millivolts using the step size, and display the result on an lcd.
Learn to build a temperature monitoring system with an LM35 sensor, ADC, and LCD display on an AVR microcontroller; convert sensor voltage to Celsius and display it.
Control the speed and direction of a DC motor using PWM and an H-bridge, interfacing with a microcontroller and ADC to rotate clockwise or counterclockwise.
Control a DC motor with an AVR microcontroller by reading a potentiometer via ADC, using PWM to set motor speed, and displaying the value on an LCD.
Learn Embedded C with AVR Microcontrollers!!
8.5 Hours of Video Content.
8 Quizzes with more than 70 Questions.
13 Hands-on Practicals
All Codes are available in the resources
Lecture Material (PDF / PPTs) are available in the resources
All Wiring Diagrams are available resources
Description
This course Demystifies the internal working of Microcontroller and Peripherals. You will learn register-level Embedded C programming to use inbuilt peripherals on the microcontroller to interface sensors, actuators, and Liquid Crystal Displays (LCD). You will learn to use Timers to generate accurate delays, Use timers to generate Pulse Width Modulation (PWM) Waveforms with variable duty cycle. Learn to use analog to digital converter (ADC) to gather data from analog sensors and display it to LCDs.
Each section ends with a Quiz to examine your learning outcomes from this course. All the codes (C Programs) are available in resources along with the lecture material.
This is NOT Arduino Style Programming!!
I believe that Arduino is for quick prototyping of products but not for Mastering Microcontrollers and peripherals. In Arduino, you use many Third-Party Libraries, In this course, you will be writing your own libraries, Your code will be talking and manipulate microcontroller registers, True Register Level programming is presented in this course.
Major Topics Covered
Masking: Learn to manipulate (Set/Reset) a particular bit in a port or MCU register without altering other bits.
Pull-up Register: Learn the importance of pull-up resistors, enabling and disabling them, also learn to use them in interfacing digital sensors.
Timers: Learn to write C programs to generate accurate delays using MCU Timers.
Pulse Width Modulation: Learn to generate PWM wave with variable duty cycle using MCU timers and PWM registers.
Liquid Crystal Display: Learn to interface LCDs with MCU using GPIOs, No third-party library is used for LCD, You will learn to write your own library for LCDs.
Analog to Digital Converter: Learn to interface analog sensors such as a potentiometer to read voltage across it.
Temperature Monitoring System: Learn to interface LM35 temperature sensor IC to read ambient temperature and display the same on LCD.
Speed Control of DC Motor: Learn to control the Direction and Speed of DC Motor using half-bridge integrated circuit L293D and PWM Technique. Vary the Speed using a POT connected to ADC and vary the PWM duty cycle accordingly.