LAB1 Introduction to Embedded Systems
LAB1 Introduction to Embedded Systems
AVR MICROCONTROLLERS
EMBEDDED SYSTEMS AND INTERFACING LAB
Attendance 20%
HW. 15%
Practical Test 25%
Concepts Test 15%
Project 25%
TOPICS AND LABS
Introduction to Embedded systems and AVR UART (HC-06 – WiFi module)
microcontrollers
I2C
Getting started with atmega16 and atmel studio
SPI
GPIO Digital output and 7-segment display
ESP32 and IoT
GPIO Digital input and Keypad
16x2 LCD display
Interrupt
Counters / Timers (Compare – Input capture - )
PWM
ADC
TOPICS AND LABS
Lecture Topics
1. Overview of Embedded Systems
2. Applications of Embedded Systems in Mechatronics
3. Introduction to AVR Microcontrollers
4. AVR Architecture and Key Features
5. Introduction to the Development Environment (Atmel
Studio\)
OVERVIEW OF EMBEDDED SYSTEMS
designed to perform a specific function or task within a larger system. Unlike general-purpose computers,
embedded systems are dedicated to particular tasks, optimizing performance, power consumption, and
cost.
OVERVIEW OF EMBEDDED SYSTEMS
• Specialized Functionality: Designed for specific control functions within a larger system.
• Real-Time Operation: Often required to respond to events within strict time constraints.
• Reliability and Stability: Must operate reliably under varying conditions for extended periods.
COMPONENTS OF EMBEDDED SYSTEMS:
• Memory: Stores the program code and data (RAM, ROM, Flash).
• Peripherals: Interfaces for communication (UART, I2C, SPI), input (sensors), and output
(actuators).
•Stand-alone Systems: Operate independently without the need for a host system (e.g., digital watches).
•Real-time Systems: Respond to inputs or events within a predefined time frame (e.g., automotive control
systems).
•Networked Systems: Connected to other systems or networks for communication (e.g., IoT devices).
SoC
MCUs
•Wireless MCUs
•Automotive
FPGA
TYPES OF MCUs
EMBEDDED
Embedded
SYSTEMS Systems
CONTROLLERS
ASIC PLC
DSP
FPGA
SoC PLC
TYPES OF
EMBEDDED
Embedded
SYSTEMS Systems
CONTROLLERS
MCUs
•Wireless MCUs
•Automotive
DSP
MCUs
ASIC
PLC
FPGA DSP
TYPES OF
EMBEDDED
Embedded
SYSTEMS Systems
CONTROLLERS
SoC ASIC
MCUs
•Wireless MCUs
•Automotive
MCUs
DSP
PLC ASIC
TYPES OF
EMBEDDED
Embedded
SYSTEMS Systems
CONTROLLERS
MCUs
FPGA •Wireless MCUs
•Automotive
MCUs
SoC
ASIC
MCUs
DSP •Wireless MCUs
•Automotive
TYPES OF MCUs
EMBEDDED
Embedded
SYSTEMS Systems
CONTROLLERS
PLC SoC
FPGA
MCUs
•Wireless MCUs
•Automotive
MCUs
ASIC SoC
TYPES OF
EMBEDDED
Embedded
SYSTEMS Systems
CONTROLLERS
DSP FPGA
PLC
MCUs
•Wireless MCUs
•Automotive
MCUs
ASIC SoC
TYPES OF
EMBEDDED
Embedded
SYSTEMS Systems
CONTROLLERS
DSP FPGA
PLC
Applications of Embedded Systems in Real world
SMARTPHONES:
COMBINING COMMUNICATION,
COMPUTING, AND MULTIMEDIA
CAPABILITIES.
CONSUMER
ELECTRONICS HOME APPLIANCES:
SMART REFRIGERATORS, WASHING
MACHINES, AND OVENS WITH
EMBEDDED CONTROL FOR
APPLICATIONS ENHANCED FUNCTIONALITY.
Engine Control Units (ECUs):
Managing engine performance,
emissions, and fuel efficiency.
bit RISC single-chip microcontrollers. AVR was one of the first microcontroller families
flash memory one-time programmable ROM
different address spaces, but having the ability to read data items from
•AVR microcontrollers were developed by Atmel (now part of Microchip Technology) in the
1990s.
•Known for their high performance, low power consumption, and ease of use in embedded
applications.
•Various older AVR microcontrollers:
ATmega8 in 28-pin narrow dual in-line
package (DIP-28N), ATxmega128A1 in 100-
pin thin quad flat pack (TQFP-100)
package, ATtiny45 in 8-pin small outline
(SO-8) package.
AVR
•ATmega328P in 28-pin
narrow dual in-line package
(DIP-28N). It is commonly
AVR found on Arduino boards.
AVR Microcontroller Family
Application-specific AVR megaAVRs with special features not found on the other members of the AVR family,
USB
32-bit AVRs
AVR Microcontroller Family
The ATtiny series features small package microcontrollers with a limited peripheral set available.
However, the improved tinyAVR 0/1/2-series (released in 2016) include:
• Peripherals equal to or exceed megaAVR 0-series
• Event System
• Improved AVRxt instruction set, hardware multiply
Frequency
Flash size Package SRAM EEPROM
[MHz]
0.5–32 KB 1.6–20 6–32-pin package 32–3072 bytes 64–512 bytes
The ATmega series features microcontrollers that provide an extended instruction set (multiply
instructions and instructions for handling larger program memories), an extensive peripheral set,
a solid amount of program memory, as well as a wide range of pins available. The megaAVR 0-
series (released in 2016) also has functionality such as:
• Event system
• New peripherals with enhanced functionality
• Improved AVRxt instruction set
Frequency
Flash size Package SRAM EEPROM
[MHz]
4–256 KB 1.6–20 28–100-pin package 256–16384 bytes 256–4096 bytes
AVR Microcontroller Family
the ATxmega series offers a wide variety of peripherals and functionality such as:
• Extended performance features, such as DMA, "Event System", and cryptography support
ADCs
Frequency
Flash size Package SRAM EEPROM
[MHz]
16–256 KB 32 44–100-pin package 1–32 KB 512–2048 bytes
•Harvard Architecture: Separate memory spaces for program code and data, allowing
simultaneous access.
•Registers: 32 general-purpose working registers for fast and efficient data manipulation.
•ALU: Arithmetic Logic Unit for performing arithmetic and logical operations.
Memory Organization:
•EEPROM: Non-volatile memory for storing data that must be preserved across power cycles.
I/O Ports:
•Digital I/O: Configurable as input or output for interfacing with digital devices.
• Timers: For generating precise time delays, PWM signals, and event counting.
•I2C: Inter-Integrated Circuit for communication with multiple devices using a two-wire interface.
•Sleep Modes: Various low-power modes to reduce power consumption during idle
periods.
•RISC Architecture: Reduced Instruction Set Computing for efficient and fast instruction execution.
•Flash Memory: In-system programmable memory for storing code, allowing easy updates.
•Peripheral Integration: Built-in peripherals like timers, ADCs, PWMs, UARTs, I2C, and SPI for
versatile interfacing.
•Peripherals: 3 timers, 6 PWM channels, 8-channel 10-bit ADC, USART, SPI, I2C.
•Applications: Widely used in Arduino boards, making it accessible for prototyping and learning.
EMBEDDED SYSTEMS REQUIREMENTS
PROTEUS Emulating the MCU and simulation of the embedded system design
LAB SOFTWARES
SOFTWARES
WHAT MAKE ARDUINO
SOFTWARE
•Processing HARDWARE
•Avr-gcc •USB to TTl ARDUINO
•Avrdude •Development project
•Bootloader Boardss
•Libraries and core
OUR LABS
SOFTWARE HARDWARE
• Atmel Studio • Arduino ISP AVR Lab
7 • MCU
• Avrdude • Peripherals
NORMS
NORMS
Atmel Studio IDE SM training
Academy