Rainbow-electronics ATmega128RFA1 Bedienungsanleitung Seite 327

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 524
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 326
327
8266A-MCU Wireless-12/09
ATmega128RFA1
the counter even if the pin is configured as an output. This feature allows software
control of the counting.
Table 21-10 CS2 Register Bits
Register Bits Value Description
0x00 No clock source (Timer/Counter2 stopped)
0x01 clk_T2S/1 (no prescaling)
0x02 clk_T2S/8 (from prescaler)
0x03 clk_T2S/32 (from prescaler)
0x04 clk_T2S/64 (from prescaler)
0x05 clk_T2S/128 (from prescaler)
0x06 clk_T2S/256 (from prescaler)
CS22:20
0x07 clk_T2S/1024 (from prescaler)
21.11.5 TCNT2 – Timer/Counter2
Bit 7 6 5 4 3 2 1 0
NA ($B2) TCNT27:20 TCNT2
Read/Write RW RW RW RW RW RW RW RW
Initial Value 0 0 0 0 0 0 0 0
The Timer/Counter Register gives direct access, both for read and write operations, to
the 8-bit counter unit of the Timer/Counter2. Writing to the TCNT2 Register blocks
(removes) the Compare Match on the following timer clock. Modifying the counter
(TCNT2) while the counter is running, introduces a risk of missing a Compare Match
between TCNT2 and the OCR2x Registers.
Bit 7:0 – TCNT27:20 - Timer/Counter2 Byte
21.11.6 OCR2A – Timer/Counter2 Output Compare Register A
Bit 7 6 5 4 3 2 1 0
NA ($B3) OCR2A7:0 OCR2A
Read/Write RW RW RW RW RW RW RW RW
Initial Value 0 0 0 0 0 0 0 0
The Output Compare Register A contains an 8-bit value that is continuously compared
with the counter value (TCNT2). A match can be used to generate an Output Compare
interrupt, or to generate a waveform output on the OC2A pin.
Bit 7:0 – OCR2A7:0 - Output Compare Register
21.11.7 OCR2B – Timer/Counter2 Output Compare Register B
Bit 7 6 5 4 3 2 1 0
NA ($B4) OCR2B7:0 OCR2B
Read/Write RW RW RW RW RW RW RW RW
Initial Value 0 0 0 0 0 0 0 0
Seitenansicht 326
1 2 ... 322 323 324 325 326 327 328 329 330 331 332 ... 523 524

Kommentare zu diesen Handbüchern

Keine Kommentare