Тёмный
No video :(

AVR Microcontroller Architecture [ATMega328/P, Arduino] 

Embedded system programming with AVR uC
Подписаться 410
Просмотров 20 тыс.
50% 1

www.udemy.com/...
The lesson discusses about the various memory components and peripherals available on the ATMega328 microcontroller.
NV Memory - The ATmega328 uC provides 32 kilobytes of on-chip In-system programmable flash memory.
The uC also contains 1K bytes of EEPROM memory that is Electrically Erasable Programmable Read-Only Memory and is a type of non-volatile memory used in computers, integrated in microcontrollers, and other electronic devices to store relatively small amounts of data. It is organized as a separate data space, in which single bytes can be read and written. The EEPROM has an endurance of at least 100,000 write or erase cycles.
SRAM - The uC provides 2 kilobytes of SRAM. SRAM stand for Static Random Access memory. It is a volatile memory meaning the data stored in SRAM is lost when power is removed. It is also called data memory as it stores the data during the program execution.
Notice that the Flash and SRAM are connected to the AVR CPU through different bus. This is the differentiating characteristics of Harvard architecture. The separate program and data buses enables the uC to access the program and data memory independently and facilitates CPU pipelining. The CPU pre-fetches the next instruction while the current instruction is being executed.
Clock generation - The Clock generation module supports various clock sources and can be configured by setting appropriate value in the CKSEL bits in fuse bytes. The uC supports Low power crystal oscillator, Full swing crystal oscillator, Low frequency crystal oscillator. And has two internal RC oscillators and it can work with external clock too. The device is shipped with internal RC oscillator enabled and clock divide by 8 fuse programmed. The frequency of internal oscillator is 8MHz and clock divide by 8 results in the uC running at 1MHz.
Timer - There are three Timer/Counter units with compare modes and PWM and a realtime clock on the uC. The timer0 and timer2 denoted by TC0 and TC2 respectively are 8 bit timers and TC1 is a 16 bit timer. It also provides a programmable watchdog timer with internal oscillator. Watchdog timer is used to recover the system from software failure by resetting the system. TC2 support asynchronous mode. It is operational in power-save mode and allows user to maintain a timer base while the rest of the device is sleeping.
Serial communication - TWI (I2C) SPI & USART - The uC supports three serial communication protocols - SPI, TWI and USART. The Serial Peripheral Interface, SPI, allows high-speed synchronous data transfer between the device and peripheral units, or between several AVR devices. The In-circuit programmer used to flash bootloader & application uses SPI protocol. The Universal Synchronous Asynchronous serial Receiver Transmitter, USART, is a highly flexible serial communication device. The USART can also be used in Master SPI mode. It is commonly used to communication with the development PC. The Two-Wire Serial Interface, TWI, protocol allows the systems designer to interconnect up to 128 different devices. The TWI is compatible with Philips’ I2C protocol
GPIO - The uC has three GPIO ports and 23 IO lines. The ports B and D are 8 bit wide where are port C is 7 bit wide.
ADC/AC - The uC also provides Analog comparator and Analog to Digital Converter. The Analog Comparator compares the two voltages and sets the Analog Comparator output accordingly. The comparator’s output can be set to trigger the Input Capture function of TC1. The ADC converts an analog input voltage to a 10-bit digital value through successive approximation.
Power management - The uC supports six sleep modes. Sleep modes are used to save power by enabling the application to shut down unused modules in the uC. The various sleep modes allow the user to tailor the power consumption according to the application's requirement. The power management of Atmega328 supports Brown-out detection. The BOD circuit monitors the supply voltage and resets the uC if the supply voltage falls below a predefined threshold. The trigger level for the BOD is selected by the BODLEVEL bits in extended Fuse byte.
Power rating slide - The table shows the maximum power rating of ATMega328 uC. The voltage on any pin except reset pin must be in the range of -0.5 V to Vcc+0.5V with respect to the ground. The reset pin allows the application of -0.5V to 13V. Higher voltage is applied to reset pin in high voltage programming mode to rescue fuses. The maximum operating voltage of the uC is 6 volts. The IO pins can source and sink 40mA of current and the Vcc & ground pins should not be supplied current in excess of 200mA. Take due care not to exceed the voltage and current ratings. The application of excessive power damages the uC & the development board.

Опубликовано:

 

28 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 7   
@cpakditno4n95
@cpakditno4n95 5 месяцев назад
Nicely done, this is what i was looking for, thank you mate.
@varabinda
@varabinda 28 дней назад
I am happy it helped you. Watch for more videos
@ashoksingh4879
@ashoksingh4879 4 года назад
Dear Sir, your explanation is great. You are doing a great job. Please keep on making such videos. 👌👌
@3DComputing
@3DComputing 2 года назад
Well done, nice explanation
@aabdev
@aabdev 3 года назад
In which direction the stack is growing in AVR? 1 Stack moves from a lower RAM address to a larger RAM address 2 Stack moves from a larger RAM address to a lower RAM address
@romandavydov8684
@romandavydov8684 2 года назад
2 from larger to lower ...
@richard_wenner
@richard_wenner 3 года назад
Very nicely done. Thank you.
Далее
Bare-Metal MCU #4 - Bootloaders and Programmers
18:24
AVR Fuse & Lock bytes [ATMega328/P, Arduino]
8:11
Просмотров 10 тыс.
Bare-Metal MCU #1 - Intro to registers
13:10
Просмотров 71 тыс.
AVR Architecture-Part 3: Code and Data Memory
18:58
Просмотров 19 тыс.
ATmega328 Architecture Overview
16:10
Просмотров 25 тыс.
Why Democracy Is Mathematically Impossible
23:34
Просмотров 2,1 млн
AVR USART (Serial Communication) Explained
26:41
Просмотров 35 тыс.
GPIO Port & Control Registers ATMega328 Arduino
9:54
MOSFETs and Transistors with Arduino
40:50
Просмотров 1 млн