Microcontroller Fundamentals, Lecture notes of Microprocessors

This course introduces the core principles and applications of microcontrollers, focusing on architecture, instruction sets, and hardware–software integration. Students learn how microcontrollers are programmed and interfaced with memory, sensors, and peripherals to build functional embedded systems.

Typology: Lecture notes

2025/2026

Available from 02/05/2026

neil-robert-membreve
neil-robert-membreve 🇵🇭

6 documents

1 / 21

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
>>>
>>> Microcontroller Fundamentals
Name: Neil Robert Membreve, M.Eng.
Date:
Department of Electrical Engineering
[~]
$
[1/21]
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download Microcontroller Fundamentals and more Lecture notes Microprocessors in PDF only on Docsity!

>>> Microcontroller Fundamentals

Name: Neil Robert Membreve, M.Eng. Date:

Department of Electrical Engineering

[~]$ [1/21]

>>> It’s the MCU in the Arduino UNO

Figure: Arduino Uno SMD R3 (^) Figure: ATmega328P

[1. It’s the MCU in the Arduino UNO]$ [2/21]

>>> Simplified view of an AVR microcontroller

[3. It’s the MCU in the Arduino UNO]$ [4/21]

>>> Atmega 328 architecture

Figure: Atmega328 block diagram [4. Atmega 328 architecture]$ [5/21]

>>> MCU memory

■ Bit ■ Building Block of Memory ■ Stores 1 piece of Boolean information (0 or 1) ■ Byte - 8 Bits. Usually minimum unit for access ■ Embedded systems usually have a few kilobytes of memory ■ Memory is one of the limiting factors in embedded systems

[6. ATMEGA128 memory system]$ [7/21]

>>> MCU memory

■ Computer Systems contain a mixture of memories ■ Memory considerations technology:

■ Capacity ■ Power ■ Speed/Latency ■ Price

Figure: Memory hierarchy: The memory hierarchy separates computer storage into a hierarchy based on response time. Fast memory is usually small and expensive. Embedded systems are usually limited to small memory

[7. ATMEGA128 memory system]$ [8/21]

>>> AVR input/output (I/O) port

■ Read-Modify-Write capability, i,.e, you can change pin direction, pin value, or pin pull-up resistor without affecting any other pins in the port ■ All AVR ports have: ■ bit-selectable pull-up resistors ■ bit-selectable tri-state outputs ■ schmitt trigger (i.e., comparator circuit) input buffers ■ are synchronized to the system clock to prevent metastability ■ have symmetrical DC drive capability

Figure: AVR I/O Pin Equivalent Schematic: The AVR I/O ports are the path to the outside world. The ports has protection diodes and programmable pull-up resistor

[9. AVR IO port]$ [10/21]

>>> AVR input/output (I/O) port

Figure: The ports are bi-directional I/O ports with optional internal pull-ups.

[10. AVR IO port]$ [11/21]

>>> AVR I/O port DC characteristicss

[12. AVR IO port]$ [13/21]

>>> AVR I/O port DC characteristicss

[13. AVR IO port]$ [14/21]

>>> AVR pins connection

■ VCC - this pin provides supply voltage to the chip. The typical voltage source is +5 V. Some AVR family members have lower voltage for VCC pins in order to reduce the noise and power dissipation of the AVR system ■ AVCC is the supply voltage pin for Port A and the A/D Converter. It should be externally connected to VCC, even if the ADC is not used. ■ AREF is the analog reference pin for ADC

[15. AVR MCU connection to a PCB]$ [16/21]

>>> Digital power supply

Figure: Insufficient power supply decoupling: The capacitor is placed too far away from the microcontroller, creating a large high current loop. As a result of this, noise is spread more easily to other devices on the board, and radiated emission from the board is increased even further. The whole ground plane will act as an antenna for the noise, instead of only the high current loop

Figure: Better placement of the capacitor: The lines that are part of the high current loop are not part of the power or ground planes. This prevents the power and ground planes to spread a lot of noise. Furthermore, a series inductor is inserted to reduce the switching noise on the power plane.

[16. AVR MCU connection to a PCB]$ [17/21]

>>> Reset Hardware

■ The RESET pin on the AVR is active LOW, and setting the pin LOW externally will thus result in a reset of the AVR. ■ The recommended pull-up resistor is 4.7kOhm or larger ■ The capacitor protect the RESET line further from noise ■ The components should be located physically close to the RESET pin of the AVR Figure: Recommended Reset Pin connection

[18. AVR MCU connection to a PCB]$ [19/21]

>>> Oscillator Hardware

■ The oscillator circuit is the "heartbeat" of the system and is crucial to correct operation. ■ As a general rule, the speed at which an embedded system runs is directly determined by the oscillator frequency: in most cases, if you double the oscillator frequency, the application will run twice as fast. ■ Although most MCU have internal oscillator, it is often necessarily to use an external oscillator for an accurate and stable frequency [19. AVR MCU connection to a PCB]$ [20/21]