欢迎访问ic37.com |
会员登录 免费注册
发布采购

ATMEGA8-16AI 参数 Datasheet PDF下载

ATMEGA8-16AI图片预览
型号: ATMEGA8-16AI
PDF下载: 下载PDF文件 查看货源
内容描述: 位的AVR微控制器8K字节在 - 系统内可编程Flash [-bit AVR Microcontroller with 8K Bytes In- System Programmable Flash]
分类和应用: 微控制器
文件页数/大小: 303 页 / 5122 K
品牌: ATMEL [ ATMEL ]
 浏览型号ATMEGA8-16AI的Datasheet PDF文件第76页浏览型号ATMEGA8-16AI的Datasheet PDF文件第77页浏览型号ATMEGA8-16AI的Datasheet PDF文件第78页浏览型号ATMEGA8-16AI的Datasheet PDF文件第79页浏览型号ATMEGA8-16AI的Datasheet PDF文件第81页浏览型号ATMEGA8-16AI的Datasheet PDF文件第82页浏览型号ATMEGA8-16AI的Datasheet PDF文件第83页浏览型号ATMEGA8-16AI的Datasheet PDF文件第84页  
Timer/Counter Clock  
Sources  
The Timer/Counter can be clocked by an internal or an external clock source. The clock  
source is selected by the clock select logic which is controlled by the clock select  
(CS12:0) bits located in the Timer/Counter Control Register B (TCCR1B). For details on  
clock sources and prescaler, see “Timer/Counter0 and Timer/Counter1 Prescalers” on  
page 72.  
Counter Unit  
The main part of the 16-bit Timer/Counter is the programmable 16-bit bi-directional  
counter unit. Figure 33 shows a block diagram of the counter and its surroundings.  
Figure 33. Counter Unit Block Diagram  
DATA BUS (8-bit)  
TOVn  
(Int. Req.)  
TEMP (8-bit)  
Clock Select  
Edge  
count  
Tn  
Detector  
TCNTnH (8-bit) TCNTnL (8-bit)  
TCNTn (16-bit Counter)  
clear  
clkTn  
Control Logic  
direction  
( From Prescaler )  
TOP  
BOTTOM  
Signal description (internal signals):  
count Increment or decrement TCNT1 by 1.  
direction Select between increment and decrement.  
clear  
Clear TCNT1 (set all bits to zero).  
Timer/Counter clock.  
clkT  
1
TOP  
Signalize that TCNT1 has reached maximum value.  
BOTTOM Signalize that TCNT1 has reached minimum value (zero).  
The 16-bit counter is mapped into two 8-bit I/O memory locations: counter high  
(TCNT1H) containing the upper eight bits of the counter, and Counter Low (TCNT1L)  
containing the lower eight bits. The TCNT1H Register can only be indirectly accessed  
by the CPU. When the CPU does an access to the TCNT1H I/O location, the CPU  
accesses the High byte temporary register (TEMP). The temporary register is updated  
with the TCNT1H value when the TCNT1L is read, and TCNT1H is updated with the  
temporary register value when TCNT1L is written. This allows the CPU to read or write  
the entire 16-bit counter value within one clock cycle via the 8-bit data bus. It is impor-  
tant to notice that there are special cases of writing to the TCNT1 Register when the  
counter is counting that will give unpredictable results. The special cases are described  
in the sections where they are of importance.  
Depending on the mode of operation used, the counter is cleared, incremented, or dec-  
remented at each timer clock (clk ). The clk can be generated from an external or  
1
1
T
T
internal clock source, selected by the clock select bits (CS12:0). When no clock source  
is selected (CS12:0 = 0) the timer is stopped. However, the TCNT1 value can be  
accessed by the CPU, independent of whether clkT1 is present or not. A CPU write over-  
rides (has priority over) all counter clear or count operations.  
80  
ATmega8(L)  
2486M–AVR–12/03  
 复制成功!