HWTimer16_2C3 Class Reference

Timer unit with 16Bit counter and 2 output compare units, but 3 config registers. More...

#include <hwtimer.h>

Inheritance diagram for HWTimer16_2C3:
Inheritance graph
[legend]
Collaboration diagram for HWTimer16_2C3:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 HWTimer16_2C3 (AvrDevice *core, PrescalerMultiplexer *p, int unit, IRQLine *tov, IRQLine *tcompA, PinAtPort *outA, IRQLine *tcompB, PinAtPort *outB, IRQLine *ticap, ICaptureSource *icapsrc)
void Reset (void)
 Perform a reset of this unit.

Public Attributes

IOReg< HWTimer16_2C3tccra_reg
 control register A
IOReg< HWTimer16_2C3tccrb_reg
 control register B
IOReg< HWTimer16_2C3tccrc_reg
 control register C

Protected Member Functions

void Set_TCCRA (unsigned char val)
 Register access to set control register A.
unsigned char Get_TCCRA ()
 Register access to read control register A.
void Set_TCCRB (unsigned char val)
 Register access to set control register B.
unsigned char Get_TCCRB ()
 Register access to read control register B.
void Set_TCCRC (unsigned char val)
 Register access to set control register C.
unsigned char Get_TCCRC ()
 Register access to read control register C.

Protected Attributes

unsigned char tccra_val
 register value TCCRA
unsigned char tccrb_val
 register value TCCRB

Detailed Description

Timer unit with 16Bit counter and 2 output compare units, but 3 config registers.

This timer unit is used by following devices: ATMega48/88/168/328.

TCCRxA register contains the following configuration bits (x=timer):

  +------+------+------+------+---+---+-----+-----+
  |COMxA1|COMxA0|COMxB1|COMxB0| - | - |WGMx1|WGMx0|
  +------+------+------+------+---+---+-----+-----+ 

TCCRxB register contains the following configuration bits (x=timer):

  +----+------+---+-----+-----+----+----+----+
  |ICNCx|ICESx| - |WGMx3|WGMx2|CSx2|CSx1|CSx0|
  +----+------+---+-----+-----+----+----+----+ 

TCCRxC register contains the following configuration bits (x=timer):

  +-----+-----+---+---+---+---+---+---+ 
  |FOCxA|FOCxB| - | - | - | - | - | - |
  +-----+-----+---+---+---+---+---+---+ 

Definition at line 574 of file hwtimer.h.


Constructor & Destructor Documentation

HWTimer16_2C3::HWTimer16_2C3 ( AvrDevice core,
PrescalerMultiplexer p,
int  unit,
IRQLine tov,
IRQLine tcompA,
PinAtPort outA,
IRQLine tcompB,
PinAtPort outB,
IRQLine ticap,
ICaptureSource icapsrc 
)

Definition at line 1155 of file hwtimer.cpp.


Member Function Documentation

unsigned char HWTimer16_2C3::Get_TCCRA (  )  [inline, protected]

Register access to read control register A.

Definition at line 583 of file hwtimer.h.

References tccra_val.

unsigned char HWTimer16_2C3::Get_TCCRB (  )  [inline, protected]

Register access to read control register B.

Definition at line 588 of file hwtimer.h.

References tccrb_val.

unsigned char HWTimer16_2C3::Get_TCCRC (  )  [inline, protected]

Register access to read control register C.

Definition at line 593 of file hwtimer.h.

void HWTimer16_2C3::Reset ( void   )  [virtual]

Perform a reset of this unit.

Reimplemented from HWTimer16.

Definition at line 1209 of file hwtimer.cpp.

References tccra_val, and tccrb_val.

void HWTimer16_2C3::Set_TCCRA ( unsigned char  val  )  [protected]

Register access to set control register A.

Definition at line 1173 of file hwtimer.cpp.

References HWTimer16::ChangeWGM(), BasicTimerUnit::SetCompareOutputMode(), tccra_val, and BasicTimerUnit::wgm.

Here is the call graph for this function:

void HWTimer16_2C3::Set_TCCRB ( unsigned char  val  )  [protected]

Register access to set control register B.

Definition at line 1185 of file hwtimer.cpp.

References HWTimer16::ChangeWGM(), BasicTimerUnit::icapNoiseCanceler, BasicTimerUnit::icapRisingEdge, BasicTimerUnit::SetClockMode(), tccrb_val, and BasicTimerUnit::wgm.

Here is the call graph for this function:

void HWTimer16_2C3::Set_TCCRC ( unsigned char  val  )  [protected]

Register access to set control register C.

Definition at line 1198 of file hwtimer.cpp.

References BasicTimerUnit::SetCompareOutput(), and BasicTimerUnit::WGMisPWM().

Here is the call graph for this function:


Member Data Documentation

unsigned char HWTimer16_2C3::tccra_val [protected]

register value TCCRA

Definition at line 577 of file hwtimer.h.

Referenced by Get_TCCRA(), Reset(), and Set_TCCRA().

unsigned char HWTimer16_2C3::tccrb_val [protected]

register value TCCRB

Definition at line 578 of file hwtimer.h.

Referenced by Get_TCCRB(), Reset(), and Set_TCCRB().


The documentation for this class was generated from the following files:
Generated on Sun Feb 12 16:52:11 2012 for Simulavr by  doxygen 1.6.3