CE2810 -- Detailed Outcomes

At the time of the final exam, a student should be able to:

C Programming Language

  • Use C block (/* */) and inline (//) comment delimiters.
  • Describe the basic syntax used to declare a C function.
  • State the purpose of the void keyword.
  • Described the use of the #include, #define, #ifndef, #ifdef, and #endif preprocessor directives.
  • Use preprocessor directives to control header file conditional compilation.
  • List and describe each of the C fundamental data types.
  • Describe how the C99 standard enhances C data typing.
  • Justify using C99 data types rather than C fundamental data types in embedded systems.
  • Compare and contrast global variables and function variables.
  • Describe how variables are made visible across files.
  • State the type qualifier often needed with global variables modified by interrupt service subroutines.
  • Explain the purpose of the following type qualifiers: extern, static, and volatile.
  • Demonstrate use of the following type qualifiers: extern, static, and volatile.
  • Use if-else, do-while, while, for, and switch flow control structures.
  • Use the C inequality, equality, mathematic, bitwise, and assignment operators.
  • Compare and contrast passing values and pointers as function parameters.
  • Justify the use of function prototypes.
  • Describe how C arrays are declared, initialized, and indexed.
  • Describe the use of pointers to directly access memory and the use of pointers in call-by-reference function parameters.
  • Use pointer declaration and pointer dereferencing in C functions.
  • Use pointer arithmetic with pre/post increment and pre/post decrement operators to move through data in memory.
  • Compare and contrast initialized pointers, null pointers, and dangling pointers.
  • State how null pointers can be used in conditional statements to prevent memory access violations.
  • State the name of the header file that declares I/O control registers by name.
  • State the name of the header file that declares the C99 types.
  • State the name of the header file that assigns names to the jump vectors and declares the sei and cli functions.
  • Explain the role of the compiler and linker.
  • Describe the contents of files with extensions such as .h, .c, .o, .a, and .hex
  • Explain the purpose of a struct in C.
  • Interpret code that makes use of structs.
  • Make use struct in C.
  • Write and interpret C code that makes use of function pointers.
  • Demonstrate how structs and function pointers can be used to simulate a "class".
  • Explain the role of typedefs in C.
  • Demonstrate how a typedef may be used to simplify the declaration of a struct.
  • Demonstrate how memory can be allocated/deallocated on/off the heap using malloc/free.

Keypad

  • Analyze proposed methods of scanning the keypad identifying potential problems.
  • Describe the hardware configuration of the keypad.
  • Write C code to scan the keypad.

LCD

  • Implement C functions described in the lcd.h and lcdprivate.h header files.
  • Explain the steps needed to write an eight bit command/data to the LCD device provided in the hardware kit.

Interrupts

  • Compare and contrast 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.
  • List the port pins that are shared as the external (global) interrupt pins.
  • List example on-chip device interrupts.
  • Explain the purpose of the I bit in the SREG register.
  • Compare and contrast normal subroutines and ISRs.
  • Write a simple interrupt service routine in C.
  • Write a simple C program that initializes everything needed to enable a particular interrupt service routine.

USART

  • Write a C-language function for sending or receiving data using the USART subsystem.
  • Configure the USART using C instructions to comply with specific baud rate, character length, parity, etc.

Timers

  • Calculate the number of programmed timer events that occur in a given amount of time. For example, calculate the number of timer overflow events on Timer/Counter0 that would occur in 2 s if the timer were configured to divide a 16 MHz system clock by 1024 to generate the timer clock.
  • Write C device driver subroutines to control timer events.
  • Write C ISRs to respond to timer events.

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 assembler 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.
  • © 2001-2015 Dr. Christopher C. Taylor •
  • Office: L-343 •
  • Phone: 277-7339 •
  • npǝ˙ǝosɯ@ɹolʎɐʇ