CS-280
Study Guide for Exam 2

Material covered since Exam 1:

Program and Data Memory

  1. Explain the differences in addressing between Program (Flash) and Data (SRAM) Memory.

  2. Explain the differences in how the contents of Program and Data Memory is retained during power cycle on the Atmega32.

  3. Write the directives that allocate space in either Program or Data Memory.

  4. Explain the difference between the directives for allocating space in Program vs. Data Memory.

  5. Explain how values in Program memory is initialized vs. how values in Data memory are initialized.

  6. Write a simple subroutine that reads values from either Program and Data memory. Be familiar with the instructions that use the "Z+" syntax for indexing.

  7. Write a simple subroutine that writes values to Data memory. (Note we did not cover how to write either Program memory, which is rather complicated).

  8. Note we did not cover reading/writing EEPROM, which is also rather complex.

Subroutines and the Stack

  1. Explain the difference between CALL/RCALL and JMP/RJMP, and how each is properly used.

  2. Explain how the instructions CALL, RCALL, and RET are used and how they manipulate the stack.

  3. Explain the instructions PUSH, POP, and how they manipulate the stack.

  4. Write a simple assembly subroutine.

  5. Write a simple assembly program that calls an assembly subroutine.

  6. Given sample code, explain how the Stack is manipulated by various instructions such as RCALL, CALL, PUSH, POP, and RET.

Interrupts

  1. Explain the difference between polled and interrupt-driven systems

  2. Explain the purpose of the interrupt vector table (Program memory 0x0 through 0x29).

  3. Explain the purpose of having specific control registers associated with particular interrupts; explain in general what the special-purpose control registers are used for w.r.t External Interrupts, vs those used for ADC Interrupts.

  4. Explain the function of the I bit in SREG vs. the function of specific enable bits in various interrupt control registers.

  5. Explain the difference between the RETI instruction for returning from an ISR vs a RET instruction for returning from a normal subroutine.

  6. Write a simple assembly interrupt service routine.

  7. Write a simple assembly program that initializes the vector for a specific interrupt.

  8. Given sample code, explain how the Stack is manipulated by an interrupt.

USART

  1. Explain how a byte of data can be transmitted serially over a wire by sequentially modulating the voltage applied to the wire.

  2. Explain the concept of serial data transmission speed: the time rate at which the voltage applied to the wire is modulated.

  3. Explain how the serial data transmission of the bits comprising the data bytes can be augmented with start bits, stop bits, or parity bits.

  4. Explain the purpose of parity bits, start bits, and stop bits.

  5. Given the documentation for a particular control register, explain what the various bits within the control register do - ie. how they affect the operation of the USART.

A/D conversion

  1. Explain the purpose and capabilities of the A/D conversion subsystem on the Atmega32 microcontroller.

  2. Explain how PortA on the Atmega32 can be used as both a pure digital I/O as well as an analog input port.

  3. Given the documentation for a particular control register, explain what the various bits within the control register do - ie. how they affect the operation of the ADC.

LCD display

  1. Explain how each character in the ASCII table corresponds to a specific index within that table.

  2. Explain how the LCD display processor, when sent a numeric value, interprets that value as a command to displayh a character at that value's index in the ASCII talble, OR interprets that value as a command that, for instance, can be used to set the cursor position.