Rainbow-electronics ATmega8515L Uživatelský manuál Strana 120

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 223
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 119
120
ATmega8515(L)
2512A–AVR–04/02
Output Compare Register 1 A
– OCR1AH and OCR1AL
Output Compare Register 1 B
– OCR1BH and OCR1BL
The Output Compare Registers contain a 16-bit value that iscontinuously compared
with the counter value (TCNT1).Amatch can beused to generateanoutput compare
interrupt, or to generate a waveform output on the OC1xpin.
The Output Compare Registers are16-bit in size. To ensurethat both the high andlow
bytes are written simultaneously when the CPUwrites to these registers, theaccess is
performed usingan8-bit temporary highbyte register(TEMP).This temporary register
issharedbyall theother 16-bit registers. See “Accessing 16-bit Registers”onpage 97.
Input Capture Register 1 –
ICR1H and ICR1L
The Input Captureis updatedwith the counter(TCNT1) value each time an event occurs
on the ICP1 pin (or optionally on theAnalog Comparator output for Timer/Counter1).
Theinput capture can beusedfordefining the counter TOPvalue.
The Input Capture Register is 16-bit in size. To ensurethat both the high andlowbytes
are readsimultaneously when the CPU accesses these registers, theaccess isper-
formed using an 8-bit temporary highbyte register(TEMP).This temporary register is
sharedbyall theother 16-bit registers. See “Accessing 16-bit Registers”onpage 97.
Timer/Counter Interrupt Mask
Register – TIMSK
(1)
Note: 1. Thisregistercontains interrupt controlbitsforseveral Timer/Counters, but only
Timer1 bits are described in thissection. The remaining bits are described in their
respective timersections.
Bit 7 – TOIE1: Timer/Counter1, Overflow Interrupt Enable
When thisbit iswrittentoone, and the I-flag in the Status Register isset (interrupts glo-
bally enabled), theTimer/Counter1overflow interruptis enabled.The corresponding
InterruptVector(see Interrupts”onpage 51) is executedwhen theTOV1 flag,located
in TIFR, isset.
Bit 76543 210
OCR1A[15:8] OCR1AH
OCR1A[7:0] OCR1AL
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value00000000
Bit 76543 210
OCR1B[15:8] OCR1BH
OCR1B[7:0] OCR1BL
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value00000000
Bit 76543 210
ICR1[15:8] ICR1H
ICR1[7:0] ICR1L
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value00000000
Bit 76543 210
TOIE1 OCIE1A OCIE1B
OCIE2 TICIE1 TOIE2 TOIE0 OCIE0 TIMSK
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value00000000
Zobrazit stránku 119
1 2 ... 115 116 117 118 119 120 121 122 123 124 125 ... 222 223

Komentáře k této Příručce

Žádné komentáře