參數(shù)資料
型號(hào): R5F3650NNFB
元件分類: 微控制器/微處理器
英文描述: MICROCONTROLLER, PQFP100
封裝: 14 X 14 MM, 0.50 MM PITCH, LQFP-100
文件頁(yè)數(shù): 10/81頁(yè)
文件大?。?/td> 879K
代理商: R5F3650NNFB
108
4317K–AVR–03/2013
AT90PWM2/3/2B/3B
The following code examples show how to do an atomic read of the TCNTn Register contents.
Reading any of the OCRnx or ICRn Registers can be done by using the same principle.
Note:
1. The example code assumes that the part specific header file is included.
For I/O Registers located in extended I/O map, “IN”, “OUT”, “SBIS”, “SBIC”, “CBI”, and “SBI”
instructions must be replaced with instructions that allow access to extended I/O. Typically
“LDS” and “STS” combined with “SBRS”, “SBRC”, “SBR”, and “CBR”.
The assembly code example returns the TCNTn value in the r17:r16 register pair.
TABLE 4.
Assembly Code Example(1)
TIM16_ReadTCNT
n:
; Save global interrupt flag
in
r18,SREG
; Disable interrupts
cli
; Read TCNT
n into r17:r16
in
r16,TCNT
nL
in
r17,TCNT
nH
; Restore global interrupt flag
out
SREG,r18
ret
C Code Example
unsigned int
TIM16_ReadTCNT
n( void )
{
unsigned char
sreg;
unsigned int
i;
/* Save global interrupt flag */
sreg = SREG;
/* Disable interrupts */
_CLI();
/* Read TCNT
n into i */
i = TCNT
n;
/* Restore global interrupt flag */
SREG = sreg;
return
i;
}
相關(guān)PDF資料
PDF描述
R5F36B3ENNP 16-BIT, FLASH, 16 MHz, MICROCONTROLLER, PQCC64
R5F36CAKNFA 16-BIT, FLASH, 32 MHz, MICROCONTROLLER, PQFP100
R5F36CAKNFB 16-BIT, FLASH, 32 MHz, MICROCONTROLLER, PQFP100
R5F36CA6DFA 16-BIT, FLASH, 32 MHz, MICROCONTROLLER, PQFP100
R5F36CA6DFB 16-BIT, FLASH, 32 MHz, MICROCONTROLLER, PQFP100
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
R5F3650RDFA 制造商:RENESAS 制造商全稱:Renesas Technology Corp 功能描述:RENESAS MCU
R5F3650RDFB 制造商:RENESAS 制造商全稱:Renesas Technology Corp 功能描述:RENESAS MCU
R5F3650RNFA 制造商:RENESAS 制造商全稱:Renesas Technology Corp 功能描述:RENESAS MCU
R5F3650RNFB 制造商:RENESAS 制造商全稱:Renesas Technology Corp 功能描述:This MCU consumes low power, and supports operating modes
R5F3650TDFA 制造商:RENESAS 制造商全稱:Renesas Technology Corp 功能描述:RENESAS MCU