avrora.sim.mcu
Class Timer16Bit
java.lang.Object
avrora.sim.mcu.AtmelInternalDevice
avrora.sim.mcu.Timer16Bit
- Direct Known Subclasses:
- ATMegaFamily.Timer1, ATMegaFamily.Timer3
- public abstract class Timer16Bit
- extends AtmelInternalDevice
The Timer16Bit
class emulates the functionality and behavior of a 16-bit timer on the
Atmega128. 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 |
Timer16Bit.BufferedRegister
In PWN modes, writes to the OCRnx registers are buffered. |
protected class |
Timer16Bit.OCRnxPairedRegister
The normal 16-bit read behavior described in the doc for PairedRegister does not apply for the
OCRnx registers. |
protected class |
Timer16Bit.OCRnxTempHighRegister
See doc for OCRnxPairedRegister. |
protected class |
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 |
Timer16Bit.TCNTnRegister
Overloads the write behavior of this class of register in order to implement compare match
blocking for one timer period. |
protected class |
Timer16Bit.Ticker
The Ticker implements the periodic behavior of the timer. |
Method Summary |
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 |
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
externalClock
protected final Clock externalClock
xTIFR_reg
protected ATMegaFamily.FlagRegister xTIFR_reg
xTIMSK_reg
protected ATMegaFamily.MaskRegister xTIMSK_reg
periods
protected int[] periods
Timer16Bit
protected Timer16Bit(int n,
int numUnits,
AtmelMicrocontroller m)
initValues
protected abstract void initValues()
overflow
protected void overflow()
- Flags the overflow interrupt for this timer.