Digital Design 2

VIIIAA05  |  Electrical Engineering BSc  |  Credit: 6

Objectives, learning outcomes and obtained knowledge

The course (together with the course entitled Digital Design 1) provides the students with all system level hardware and software knowledge required to the logical level design of microprocessor and microcontroller based digital equipment. The theoretical background is also widened through the solution of design problems during the classroom and laboratory practices and homework assignments.

  • learn the methods and practices in the design and analysis of microprocessor and microcontroller based systems.
  • obtain detailed understanding of a simple microcontroller, its common peripherals and its assembly language
  • be able to quickly understand the usage of other microprocessors

    Synopsis

    Lectures (one lecture every week):

    Week 1: Quick review of combinational and sequential networks, binary arithmetic, binary multiplication. Separation of control and datapaths.

    Week 2: Organization of a general purpose control unit: the ALU, Program counter, instruction decoder, register file, instruction memory, data memory. Case study: designing a simple number sequencing CPU (3 instructions)

    Week 3: Three state signals, time multiplexing of data wires. Busses and bus systems (control, data and address busses). Extending the memory interface. Separate I/O and memory busses.

    Week 4: Simple memory types (RAM, ROM, FLASH). Memory interfacing to an actual bus system (as an example the Microchip PIC24F family’s EPMP bus is used).

    Week 5: Introduction of an actual commercial microcontroller: CPU core and instruction set, power requirements, reset and clocking. (as an example, the Microchip PIC24F core is used, the actual device used in labs will be the PIC24JF256GA705)

    Week 6: Introduction to he programming model of the PIC24: Registers, instruction encoding, address modes. Arithmetic and logical instructions, condition flags, conditional jumps.

    Week 7: Indirect addressing and stack. Pointers, subroutines, parameter passing to subroutines. (Mainly in assembly, with some references to C)

    Week 8: Interrupt handling, context save and restore. Nested interrupts, interrupt priorities. Implementing a simple software based delay, and its problems.

    Week 9: Introduction to common microcontroller peripherals through the example of a timer, and common timer based peripherals (input capture, output compare, PWM).

    Week 10: Communication related peripherals (UART, SPI).

    Week 11: Organization and handling of simple communication buffers, an example for setup and interrupt based usage of the PIC24F’s buffered UART.

    Week 12: Introduction to bus arbitration and DMA. Overview of the PIC24F’s DMA capabilities.

    Week 13: Specialties of modern memory types: NVRAM, FRAM, MRAM, DRAM, DDRAM, NAND and NOR FLASH.

    Week 14: Quick overview of programmable logical devices: PAL, GAL, CPLD, FPGA, the PIC24F’s CLC peripheral.

     Practices (one practice every two weeks):

    1: Logic levels and logic level conversion, open collector buffers. Implementing simple logical functions usint only open collector outputs.

    2: Simple design tasks based on arithmetic, comparators, multiplexers and counters.

    3: Memory interfacing to a bus system.

    4: Basic assembly programming: formula evaluation, simple loops, counting problem.

    5: Basic assembly programming: subroutines, functions, lookup tables, data conversion.

    6: IO handling, button debouncing, writing a simple embedded control program in assembly.

    7: Practicing common exam problems

    Labs (3 times 3 hour lab practices in total):

    1: Hands-on practice in a microcontroller development environment (MPLAB X). Trace and debug functions. Debugging and tracing a simple C and assembly program.

    2: IO port handling, edge detection, output pulse generation. Filling an external shift register using bit-banged IO (a shift register based LED display is used on the dev board).

    3: Complex microcontroller based program, using IO ports, timers and SPI peripheral. (implementing a stopwatch)