From CVL Wiki

Revision as of 00:36, 2 May 2007 by Dengy (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


A typical microcontroller

The programming model








Central Processor Unit (CPU)

The I/O interface

The address, data, and control buses

Fig.1 Buses on the Spartan-3E board
Electrical lines that travel between microcontroller components (such as memory[1] and the CPU[2]) are called buses. Buses[3] are either wires (typically insulated if they are free-standing), or copper lines printed on a circuit board. Buses carry data between microcontroller components. The data carried over these buses are in digital form, which means with the exception of transition periods, they are discrete voltage values. There are three types of buses: address, data, and control buses. The two most popular microprocessor architectures, Harvard[4] and Princeton[5], each have different interconnects between components (such as memory, control, and processing); they, however, use the same buses to communicate with each other.

The address bus carries address data of varying size, depending on the platform and design of the microcontroller. For the MicroBlaze microcontroller, addresses are in 32-bit word form. This allows for up to 232 or 4,294,967,296 different addresses in any given component. The main components that communicate via the address bus are the processor (CPU) and memory (either data memory or instruction memory). Memory addresses are needed so that the reads and writes to memory are done in the right memory locations.

The data bus passes actual data through its communication lines. Again, the bandwidth of this bus can vary, but for the MicroBlaze it is 32 bits. The data bus is mostly used between memory and another microcontroller component. The address information for data to be passed goes through the address bus, but the actual data with reads and writes are passed through the data bus.

The control bus passes instructions and other control information between microcontroller components. This bus is mainly used to and from a major control component (a CPU or control circuit, or otherwise). A main job of the control component is to decide whether the data bus is to perform a read or write. The control circuitry also prioritizes instructions that need to be performed, and is in charge of executing them in sequence. In other words, the control bus keeps everything in order, and prevents data from being moved unsystematically.

Microprocessors vs microcontrollers

Hardware architecture


Instruction set features

MicroBlaze architecture

Data types and endianness

Registers (general-purpose and special-purpose)

Pipeline architecture

Memory architecture

Instruction cache

Data cache

Floating Point Unit

Fast Simplex Link

MicroBlaze instruction set architecture

Instruction set summary

Instruction and operand syntax


Load/store instructions

Arithmetic instructions

Logical instructions (including barrel shifts)

Comparisons and conditional branches

Unconditional branches, subroutines/exceptions, and returns

All other MicroBlaze instructions

Assembly language and C programming for the MicroBlaze

Using MicroBlaze tools for assembly and linking

Elements of a program: header, assembler directives, and conventions

Steps for writing an assembler program

Assembly source file, listing file, object file, and executable (elf) file

MicroBlaze C compiler

Downloading machine code into MicroBlaze memory

System stack and subroutines

Debugging techniques

Assembly program examples

C program examples

Overview of MicroBlaze peripherals

On-chip memory


OPB GPIO peripherals: LEDs, switches, LCD, ADC start, and SPI interface

Interrupt controller

Debug module

10/100 Ethernet MAC

VGA video interface

Programmable Timer/Counter

DMA controller

Bus Masters, Slaves, and OPB Bus Arbitration

OPB Timer/Counter

Generate mode

Capture mode

PWM mode


Reset, Interrupts, Exceptions and Break

OPB interrupt controller

Interrupts with OPB GPIO

Serial data link protocols

SPI Protocol

I2C Protocol

RS-232 Protocol

USB Protocol

Firewire Protocol

CAN Bus Protocol

Source-Synchronous and Self-Synchronous protocols

Analog converter subsystem

Concepts and terminology

Analog-to-digital (A/D) converters

A/D input synchronization

A/D interrupts

A/D programming

Example of A/D programs

Appendix A: List of microcontrollers and microprocessors that are widely used today

Appendix B: Glossary

Personal tools