At the time of the first exam, a student should be able to:
Number Systems
Convert between binary, decimal, and hexadecimal numbers.
Perform unsigned and signed (2's complement) binary arithmetic.
Microcontroller Components and ATmega32 Architecture
Explain the purpose of the following components: clock circuit, control unit, memory, I/O.
Describe the memory model used in the Harvard architecture.
Describe and explain the purpose for the various memory types found on the ATmega32.
Describe the memory model used on the ATmega32 including specific address ranges for registers, data memory and program memory.
Describe the main assembly language tools and their position in the toolchain (assembler, simulator, downloader, debugger).
Describe the role of AVR Studio and ATmon in the development process.
Describe the ATmega32 register set:
Program Counter
Instruction Register
Stack Pointer
General Purpose Registers R0-R31 (and the differences between the first and last 16).
General Purpose Registers X, Y and Z (and the differences between these and R0-R25)
Status Register (and the H, S, V, N, Z and C flags)
Explain the different addressing modes (direct, indirect).
ATmega32 Instruction Set
Use the transfer, load/store, increment/decrement, branch, add and bit manipulation instructions to implement short programs.
Analyze (determine memory and register (including status flags) contents) for short assembly language programs.
Analyze the time required for a set of instructions to execute.
Assembly Programming
Use assembler directives (.dseg, .cseg, .org, .byte, .db) and symbolic labels correctly within short assembly programs.
Analyze a listing file to determine where instructions are stored in memory.
Write delay loops that execute for a specified amount of time.
Initialize the stack pointer.
Use the stack for temporary storage.
Call and return from subroutines correctly.
Discuss the consequences of using the stack incorrectly.
Configure ports as input and/or output ports.
Write short assembly programs/subroutines that perform simple I/O.
Explain the term masking and demonstrate its use.
Copy data from program memory into data memory.
At the time of the second exam, a student should be able to:
LCD Display
You will be given the following information:
E is hardwired to PORTC7.
RS is hardwired to PORTC6.
WR is hardwired to PORTD7 (active low).
RD is hardwired to PORTD7 (active low).
Explain how the LCD controller knows the difference between commands
and data sent to it via PORTA.
Write a program that initializes the LCD using
lcdInit.
Write a subroutine that uses
lcdDataWrite
to display characters
from program memory on the LCD.
Write a subroutine that uses
lcdDataWrite
to display characters
from data memory on the LCD.
Explain why the LCD display did not work correctly during Lab 6 when
the potentiometer was turned completely clockwise or counter-clockwise.
ADC Subsystem
Describe the capabilities of the ATmega32's ADC subsystem.
Calculate the resolution of a ADC given the min/max voltages and the
number of bits used to represent the digital result.
Write code to configure and use the ADC subsystem for single ended
ADC on an arbitrary input channel using polling or interrupts.
Explain how PORTA can be used for both
digital and analog input.
Describe the mapping between each bit in the digital result and the
analog input voltage.
Interrupts
Explain the difference between polled and interrupt-driven systems.
Indicate where the interrupt vector table is located in memory.
Describe the purpose of the interrupt vector table.
Explain the purpose for having specific control registers associated
with particular interrupts.
Explain the purpose of the I bit in the
SREG register.
Differentiate the following two instructions:
RETI and RET.
Write a simple assembly interrupt service routine.
Write a simple assembly program that initializes everything needed to
enable a particular interrupt service routine.
Given specific sample code, show how the stack is changed as a result of
an interrupt.
Timer/Counter Subsystem
Describe how the TCNT0 and
OCR0 operate.
Configure the Timer/Counter0 subsystem to tick at a specified clock rate.
Write a function that uses the timer subsystem and polling to create a
delay of arbitrary length (up to 5 seconds).
Configure the Timer/Counter0 subsystem to cause an interrupt every
X seconds (where X is a number between 1 and 32 ms).
Write initialization code that configures all the necessary items so
that an interrupt service routine is called correctly.
At the time of the final exam, a student should be able to:
Mixing C and Assembly
Understand the GNU compiler's use of temporary and saved registers.
In particular,
Explain the differences in how the GNU compiler handles temporary and
saved registers.
Describe the steps that must be taken when using a temporary register
in an assembly function that was called from C.
Describe the steps that must be taken when using a temporary register
in assembly that calls a C function.
Describe the steps that must be taken when using a saved register
in an assembly function that was called from C.
Describe the steps that must be taken when using a saved register
in assembly that calls a C function.
State which register GCC assumes contains zero at all times and
describe how to accomodate this when writing assembly code that is
mixed with C.
Demonstrate proper use of the GCC syntax (be aware of the syntax
differences between GCC and the AVR assembler).
Describe how parameters are passed between C and assembly functions.
Describe the purpose of an object file
(.o).
Explain the purpose of the linker used when compiling programs with GCC.
Translate functions written in C into assembly functions.
Translate functions written in assembly into C functions.
Indicate when the extern and
.global keywords are required and explain
what they do.
Interpret disassembled C code.
Explain how local variables (inside C functions) are stored in memory.
Timer/Counter Subsystem
Configure the Timer/Counter0 subsystem to operate in normal, CTC,
PWM phase correct, and PWM fast modes
Configure the Timer/Counter0 subsystem to tick at a specified clock rate.
Configure the Timer/Counter0 subsystem to produce a waveform on
OC0 with a specified frequence and duty cycle.
Configure the Timer/Counter1 subsystem to produce a waveform on
OC1 with a specified frequence and duty cycle.
Configure the Timer/Counter1 subsystem to operate in input capture
mode.
Write a function that uses the timer subsystem to calculate the period
a waveform connected to the ICP.
Write initialization code that configures all the necessary items so
that any of the Timer/Counter0 and Timer/Counter1 subsystem interrupt
service routines are called correctly.
Describe at least two examples of how the Timer/Counter subsystem's
output pin action and input capture features can be used.
Describe what causes the timer/counter subsystems to be activated (start
counting).
I am responsible for all content posted on these pages; MSOE is welcome to share these opinions but may not want to.