参数资料
型号: EP20K100BC324-2
厂商: ALTERA CORP
元件分类: PLD
英文描述: LOADABLE PLD, PBGA324
文件页数: 50/68页
文件大小: 975K
代理商: EP20K100BC324-2
54
4317K–AVR–03/2013
AT90PWM2/3/2B/3B
The following code example shows one assembly and one C function for changing the time-out
value of the Watchdog Timer.
Note:
1. The example code assumes that the part specific header file is included.
Note: The Watchdog Timer should be reset before any change of the WDP bits, since a change
in the WDP bits can result in a time-out when switching to a shorter time-out period;
9.2.1
Watchdog Timer Control Register - WDTCSR
Bit 7 - WDIF: Watchdog Interrupt Flag
This bit is set when a time-out occurs in the Watchdog Timer and the Watchdog Timer is config-
ured for interrupt. WDIF is cleared by hardware when executing the corresponding interrupt
handling vector. Alternatively, WDIF is cleared by writing a logic one to the flag. When the I-bit in
SREG and WDIE are set, the Watchdog Time-out Interrupt is executed.
Assembly Code Example
WDT_Prescaler_Change:
; Turn off global interrupt
cli
; Reset Watchdog Timer
wdr
; Start timed sequence
lds
r16, WDTCSR
ori
r16, (1<<WDCE) | (1<<WDE)
sts
WDTCSR, r16
; --
Got four cycles to set the new values from here -
; Set new prescaler(time-out) value = 64K cycles (~0.5 s)
ldi
r16, (1<<WDE) | (1<<WDP2) | (1<<WDP0)
sts
WDTCSR, r16
; --
Finished setting new values, used 2 cycles -
; Turn on global interrupt
sei
ret
C Code Example
void WDT_Prescaler_Change(void)
{
__disable_interrupt();
__watchdog_reset();
/* Start timed
equence */
WDTCSR |= (1<<WDCE) | (1<<WDE);
/* Set new prescaler(time-out) value = 64K cycles (~0.5 s) */
WDTCSR
= (1<<WDE) | (1<<WDP2) | (1<<WDP0);
__enable_interrupt();
}
Bit
76543210
WDIF
WDIE
WDP3
WDCE
WDE
WDP2
WDP1
WDP0
WDTCSR
Read/Write
R/W
Initial Value
0000
X
000
相关PDF资料
PDF描述
EP20K100BC324-3 LOADABLE PLD, PBGA324
EP20K100BI324-1 LOADABLE PLD, PBGA324
EP20K100BI324-2 LOADABLE PLD, PBGA324
EP20K100BI324-3 LOADABLE PLD, PBGA324
EP20K100BC484-1 LOADABLE PLD, PBGA484
相关代理商/技术参数
参数描述
EP20K100BC356-1 功能描述:FPGA - 现场可编程门阵列 CPLD - APEX 20K 416 Macro 252 IOs RoHS:否 制造商:Altera Corporation 系列:Cyclone V E 栅极数量: 逻辑块数量:943 内嵌式块RAM - EBR:1956 kbit 输入/输出端数量:128 最大工作频率:800 MHz 工作电源电压:1.1 V 最大工作温度:+ 70 C 安装风格:SMD/SMT 封装 / 箱体:FBGA-256
EP20K100BC356-1ES 制造商:未知厂家 制造商全称:未知厂家 功能描述:FPGA
EP20K100BC356-1V 制造商:Rochester Electronics LLC 功能描述:- Bulk
EP20K100BC356-2 功能描述:FPGA - 现场可编程门阵列 CPLD - APEX 20K 416 Macro 252 IOs RoHS:否 制造商:Altera Corporation 系列:Cyclone V E 栅极数量: 逻辑块数量:943 内嵌式块RAM - EBR:1956 kbit 输入/输出端数量:128 最大工作频率:800 MHz 工作电源电压:1.1 V 最大工作温度:+ 70 C 安装风格:SMD/SMT 封装 / 箱体:FBGA-256
EP20K100BC356-2ES 制造商:未知厂家 制造商全称:未知厂家 功能描述:FPGA