Rainbow-electronics ATmega8515L Bedienungsanleitung Seite 119

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 223
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 118
119
ATmega8515(L)
2512A–AVR–04/02
When the ICR1 is used as TOPvalue (see description of the WGM13:0 bitslocated in
theTCCR1A and theTCCR1B Register), the ICP1 isdisconnected andconsequently
theinput capture function isdisabled.
Bit 5: Reserved Bit
Thisbit isreservedforfutureuse. For ensuring compatibilitywithfuture devices, thisbit
must be written to zero when TCCR1B iswritten.
Bit 4:3 WGM13:2: Waveform Generation Mode
See TCCR1A Registerdescription.
Bit 2:0 – CS12:0: Clock Select
Thethree Clock Select bitsselectthe clock sourcetobeusedbytheTimer/Counter, see
Figure55andFigure56.
If externalpin modes areusedfor theTimer/Counter1, transitions on theT1pin will
clock the counter even if the pin isconfigured as an output. Thisfeatureallows software
control of the counting.
Timer/Counter1 – TCNT1H
and TCNT1L
Thetwo
Timer/Counter
I/Olocations(TCNT1H and TCNT1L, combined TCNT1) give
directaccess, bothforread andforwrite operations, to theTimer/Counter unit 16-bit
counter.Toensurethat both the high andlowbytes are read andwritten simultaneously
when the CPU accesses these registers, theaccess isperformed usingan8-bit tempo-
rary highbyte register(TEMP).This temporary register issharedbyall theother 16-bit
registers. See “Accessing 16-bit Registers”onpage 97.
Modifying the counter(TCNT1)whilethe counter isrunning introduces a risk of missing
a comparematch between TCNT1 and one of the OCR1x Registers.
Writing to theTCNT1 registerblocks (removes) the comparematch on the following
timerclock for all compare units.
Table 54. Clock Select Bit Description
CS12 CS11 CS10 Description
000No clock source (Timer/counterstopped).
001clk
I/O
/1 (No prescaling)
010clk
I/O
/8 (From prescaler)
011clk
I/O
/64 (From prescaler)
100clk
I/O
/256(From prescaler)
101clk
I/O
/1024 (From prescaler)
110Externalclock sourceonT1pin. Clock on falling edge.
111Externalclock sourceonT1pin. Clock on rising edge.
Bit 76543 210
TCNT1[15:8] TCNT1H
TCNT1[7:0] TCNT1L
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value00000000
Seitenansicht 118
1 2 ... 114 115 116 117 118 119 120 121 122 123 124 ... 222 223

Kommentare zu diesen Handbüchern

Keine Kommentare