avrora.sim.mcu
Class ATMega128L.SimImpl.Timer16Bit

java.lang.Object
  extended byavrora.sim.mcu.ATMega128L.SimImpl.Timer16Bit
Direct Known Subclasses:
ATMega128L.SimImpl.Timer1, ATMega128L.SimImpl.Timer3
Enclosing class:
ATMega128L.SimImpl

protected abstract class ATMega128L.SimImpl.Timer16Bit
extends java.lang.Object

The Timer16Bit class emulates the functionality and behavior of a 16-bit timer on the Atmega128L. It has several control and data registers and can fire up to six different interrupts depending on the mode that it has been put into. It has three output compare units and one input capture unit. UNIMPLEMENTED: input capture unit.


Nested Class Summary
protected  class ATMega128L.SimImpl.Timer16Bit.BufferedRegister
          In PWN modes, writes to the OCRnx registers are buffered.
protected  class ATMega128L.SimImpl.Timer16Bit.ControlRegister
          ControlRegister is an abstract class describing the control registers of a 16-bit timer.
protected  class ATMega128L.SimImpl.Timer16Bit.ControlRegisterA
          ControlRegisterA describes the TCCRnA control register associated with a 160bit timer.
protected  class ATMega128L.SimImpl.Timer16Bit.ControlRegisterB
          ControlRegisterA describes the TCCRnB control register associated with a 160bit timer.
protected  class ATMega128L.SimImpl.Timer16Bit.ControlRegisterC
          ControlRegisterA describes the TCCRnA control register associated with a 16-bit timer.
protected  class ATMega128L.SimImpl.Timer16Bit.OCRnxPairedRegister
          The normal 16-bit read behavior described in the doc for PairedRegister does not apply for the OCRnx registers.
protected  class ATMega128L.SimImpl.Timer16Bit.OCRnxTempHighRegister
          See doc for OCRnxPairedRegister.
protected  class ATMega128L.SimImpl.Timer16Bit.PairedRegister
          The PairedRegister class exists to implement the shared temporary register for the high byte of the 16-bit registers corresponding to a 16-bit timer.
protected  class ATMega128L.SimImpl.Timer16Bit.TCNTnRegister
          Overloads the write behavior of this class of register in order to implement compare match blocking for one timer period.
protected  class ATMega128L.SimImpl.Timer16Bit.Ticker
          The Ticker implements the periodic behavior of the timer.
 
Field Summary
static int BOTTOM
           
static int MAX
           
static int MODE_CTC_ICRn
           
static int MODE_CTC_OCRnA
           
static int MODE_FASTPWM_10_BIT
           
static int MODE_FASTPWM_8_BIT
           
static int MODE_FASTPWM_9_BIT
           
static int MODE_FASTPWM_ICRn
           
static int MODE_FASTPWM_OCRnA
           
static int MODE_NORMAL
           
static int MODE_PWM_PHASE_CORRECT_10_BIT
           
static int MODE_PWM_PHASE_CORRECT_8_BIT
           
static int MODE_PWM_PHASE_CORRECT_9_BIT
           
static int MODE_PWM_PNF_ICRn
           
static int MODE_PWM_PNF_OCRnA
           
static int MODE_PWN_PHASE_CORRECT_ICRn
           
static int MODE_PWN_PHASE_CORRECT_OCRnA
           
protected  int[] periods
           
protected  ATMegaFamily.FlagRegister xTIFR_reg
           
protected  ATMegaFamily.MaskRegister xTIMSK_reg
           
 
Method Summary
protected  void compareMatchA()
           
protected  void compareMatchB()
           
protected  void compareMatchC()
           
protected abstract  void initValues()
           
protected  void overflow()
          Flags the overflow interrupt for this timer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_NORMAL

public static final int MODE_NORMAL
See Also:
Constant Field Values

MODE_PWM_PHASE_CORRECT_8_BIT

public static final int MODE_PWM_PHASE_CORRECT_8_BIT
See Also:
Constant Field Values

MODE_PWM_PHASE_CORRECT_9_BIT

public static final int MODE_PWM_PHASE_CORRECT_9_BIT
See Also:
Constant Field Values

MODE_PWM_PHASE_CORRECT_10_BIT

public static final int MODE_PWM_PHASE_CORRECT_10_BIT
See Also:
Constant Field Values

MODE_CTC_OCRnA

public static final int MODE_CTC_OCRnA
See Also:
Constant Field Values

MODE_FASTPWM_8_BIT

public static final int MODE_FASTPWM_8_BIT
See Also:
Constant Field Values

MODE_FASTPWM_9_BIT

public static final int MODE_FASTPWM_9_BIT
See Also:
Constant Field Values

MODE_FASTPWM_10_BIT

public static final int MODE_FASTPWM_10_BIT
See Also:
Constant Field Values

MODE_PWM_PNF_ICRn

public static final int MODE_PWM_PNF_ICRn
See Also:
Constant Field Values

MODE_PWM_PNF_OCRnA

public static final int MODE_PWM_PNF_OCRnA
See Also:
Constant Field Values

MODE_PWN_PHASE_CORRECT_ICRn

public static final int MODE_PWN_PHASE_CORRECT_ICRn
See Also:
Constant Field Values

MODE_PWN_PHASE_CORRECT_OCRnA

public static final int MODE_PWN_PHASE_CORRECT_OCRnA
See Also:
Constant Field Values

MODE_CTC_ICRn

public static final int MODE_CTC_ICRn
See Also:
Constant Field Values

MODE_FASTPWM_ICRn

public static final int MODE_FASTPWM_ICRn
See Also:
Constant Field Values

MODE_FASTPWM_OCRnA

public static final int MODE_FASTPWM_OCRnA
See Also:
Constant Field Values

MAX

public static final int MAX
See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
See Also:
Constant Field Values

xTIFR_reg

protected ATMegaFamily.FlagRegister xTIFR_reg

xTIMSK_reg

protected ATMegaFamily.MaskRegister xTIMSK_reg

periods

protected int[] periods
Method Detail

initValues

protected abstract void initValues()

compareMatchA

protected void compareMatchA()

compareMatchB

protected void compareMatchB()

compareMatchC

protected void compareMatchC()

overflow

protected void overflow()
Flags the overflow interrupt for this timer.