UPC EETAC Bachelor's Degree in Telecommunications Systems and in Network Engineering EEL


Lecture 1

Chapter III: Introduction to microcontrollers. L9.1: µC basics

[P9] Description of microcontroller architecture. 



3.1. Microcomputer architecture

3.1.1. Microprocessor (µP). Basics

3.1.2. Microcontroller (µC), RAM, ROM, I/O


Fig. 1. The idea of microcontroller (or microcomputer) integrating a microprocessor, program and data memnories and many dedicated peripherals (or subsystems) in a single chip (picture ref.)

3.1.3. Harvard and Von Neumann architectures

Harvard architecture is used by Microchip PIC and AVR devices. Von Neumann is used by Intel 8051 microcontrollers.


Fig. 2. Harvard architecture has separated buses for program and data memories.

3.1.4. PIC18F4520 chip architecture8-bit microcontrollers from Microchip. The architecture of the PIC18F family

3.1.5. Microchip: PIC16F877A, ATmega8535, ATmega328P (the one used in Arduino boards)

(Optional) Arduino platform is based on another microcontroller ATmega328P that has become very well known, so that you can program it using "*.ino" source files and its development environment Arduino IDE, or instead using "*.c" files and Microchip MPLABX IDE. At the EETAC we have acquired the academic cloud license to simulate Arduino boards and applications in Proteus. Hence, you are invited to try your own projects. In this Proteus unit there is a project sample.


3.1.6. Low-level assembly and high-level C languages

High level C language  is prefered over the assembler language because most of the hardware details of the micrcontroller remain hidden for a beginner user. Read from books in the library. For instance, this Chapter 1 in the Wilmshurst, Tim, Designing Embedded Systems with PIC Microcontrollers, Newnes, 2010. Available as an eBook at the UPC library.

More materials to examine: (1), (2), etc. etc. 


3.2. Other µC families and chips

3.2.1. Texas Instruments

3.2.2. Renesas

3.2.3. NXP

3.2.4. STMicroelectronics

3.2.5. Infineon (Cypress)


3.3. EDA tools (MPLAB X) for developing and testing

3.3.1. Microchip integrated development environment (IDE) MPLAB X

3.3.2. C compiler XC8

3.3.3. Proteus VSM as the virtual laboratory simulation tool.


3.4. Digital I/O. Combinational circuits in C

3.4.1. Specifications Truth table, symbol, timing diagram Hardware-software diagram and software organisation Software organisation: setup, main loop

Analysis of P9 highlighted project on the design of 1-digit BCD adder (Adder_BCD_1digit). What is BCD data, why an error signal, what algoritm allow us to add in BCD using components such Adder_4bit in P3?. Can you infer the circuit using a plan C2 as in P3 using Adder_4bit components? How such circuit is translated not now into VHDL but into C language?