Review for Second Exam

  1. C Programming
    1. Setting and clearing bits in registers
      • PORTA = PORTA | 0x02;
      • PORTA = PORTA & ~0x0C;
    2. Using pointers to access specific memory location or port.
      • * (unsigned char *) 0x0400 = 0xaa;
      • #define PORTX (* (unsigned char *) 0x400)
        PORTX = 0xaa;
  2. Interrupts
    1. Interrupt Vectors (and reset vector)
      • How to set interrupt vector in C
    2. How do you enable interrupts (specific mask and general mask)
    3. What happens to stack when you receive an enabled interrupt
    4. What happens when you leave ISR with RTI instruction?
    5. What setup do you need to do before enabling interrupts?
    6. What do you need to do in interrupt service routine (clear source of interrupt, exit with RTI instruction)?
    7. How long (approximately) does it take to service an interrupt?
  3. Timer/Counter Subsystem
    1. Enable Timer
    2. Timer Prescaler
      • How to set
      • How it affects frequency of timer clock
    3. Timer Overflow Interrupt
    4. Input Capture
    5. Output Compare
    6. How to enable interrupts in the timer subsystem
    7. How to clear flags in the timer subsystem

  4. Real Time Interrupt
    1. How to enable
    2. How to change rate
    3. How to enable interrupt
    4. How to clear flag
  5. Pulse Width Modulation
    1. How to get into 8-bit, left-aligned high-polarity mode
    2. How to set PWM period (frequency)
    3. How to set PWM duty cycle
    4. How to enable PWM channel

Bill Rison