HWTimer16_3C Class Reference

Timer unit with 16Bit counter and 3 output compare units. More...

#include <hwtimer.h>

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

List of all members.

Public Member Functions

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

Public Attributes

IOReg< HWTimer16_3Ctccra_reg
 control register A
IOReg< HWTimer16_3Ctccrb_reg
 control register B
IOReg< HWTimer16_3Ctccrc_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 3 output compare units.

This timer unit is used by following devices: ATMega128.

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

  +------+------+------+------+------+------+-----+-----+
  |COMxA1|COMxA0|COMxB1|COMxB0|COMxC1|COMxC0|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|FOCxC| - | - | - | - | - |
  +-----+-----+-----+---+---+---+---+---+ 

Definition at line 637 of file hwtimer.h.


Constructor & Destructor Documentation

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

Definition at line 1215 of file hwtimer.cpp.


Member Function Documentation

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

Register access to read control register A.

Definition at line 646 of file hwtimer.h.

References tccra_val.

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

Register access to read control register B.

Definition at line 651 of file hwtimer.h.

References tccrb_val.

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

Register access to read control register C.

Definition at line 656 of file hwtimer.h.

void HWTimer16_3C::Reset ( void   )  [virtual]

Perform a reset of this unit.

Reimplemented from HWTimer16.

Definition at line 1275 of file hwtimer.cpp.

References tccra_val, and tccrb_val.

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

Register access to set control register A.

Definition at line 1235 of file hwtimer.cpp.

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

Here is the call graph for this function:

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

Register access to set control register B.

Definition at line 1248 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_3C::Set_TCCRC ( unsigned char  val  )  [protected]

Register access to set control register C.

Definition at line 1261 of file hwtimer.cpp.

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

Here is the call graph for this function:


Member Data Documentation

control register A

Definition at line 659 of file hwtimer.h.

Referenced by AvrDevice_at90canbase::AvrDevice_at90canbase(), and AvrDevice_atmega128::AvrDevice_atmega128().

unsigned char HWTimer16_3C::tccra_val [protected]

register value TCCRA

Definition at line 640 of file hwtimer.h.

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

control register B

Definition at line 660 of file hwtimer.h.

Referenced by AvrDevice_at90canbase::AvrDevice_at90canbase(), and AvrDevice_atmega128::AvrDevice_atmega128().

unsigned char HWTimer16_3C::tccrb_val [protected]

register value TCCRB

Definition at line 641 of file hwtimer.h.

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

control register C

Definition at line 661 of file hwtimer.h.

Referenced by AvrDevice_at90canbase::AvrDevice_at90canbase(), and AvrDevice_atmega128::AvrDevice_atmega128().


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