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

ATMEGA32L-8AUR 参数 Datasheet PDF下载

ATMEGA32L-8AUR图片预览
型号: ATMEGA32L-8AUR
PDF下载: 下载PDF文件 查看货源
内容描述: [RISC Microcontroller, 8-Bit, FLASH, AVR RISC CPU, 8MHz, CMOS, PQFP44, 10 X 10 MM, 1 MM HEIGHT, 0.80 MM PITCH, GREEN, PLASTIC, MS-026ACB, TQFP-44]
分类和应用: 闪存微控制器
文件页数/大小: 347 页 / 3171 K
品牌: ATMEL [ ATMEL ]
 浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第86页浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第87页浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第88页浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第89页浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第91页浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第92页浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第93页浏览型号ATMEGA32L-8AUR的Datasheet PDF文件第94页  
The following code examples show how to do an atomic read of the TCNT1 Register  
contents. Reading any of the OCR1A/B or ICR1 Registers can be done by using the  
same principle.  
Assembly Code Example(1)  
TIM16_ReadTCNT1:  
; Save global interrupt flag  
in r18,SREG  
; Disable interrupts  
cli  
; Read TCNT1 into r17:r16  
in r16,TCNT1L  
in r17,TCNT1H  
; Restore global interrupt flag  
out SREG,r18  
ret  
C Code Example(1)  
unsigned int TIM16_ReadTCNT1( void )  
{
unsigned char sreg;  
unsigned int i;  
/* Save global interrupt flag */  
sreg = SREG;  
/* Disable interrupts */  
_CLI();  
/* Read TCNT1 into i */  
i = TCNT1;  
/* Restore global interrupt flag */  
SREG = sreg;  
return i;  
}
Note:  
1. See “About Code Examples” on page 7.  
The assembly code example returns the TCNT1 value in the r17:r16 register pair.  
90  
ATmega32(L)  
2503J–AVR–10/06  
 复制成功!