English
Language : 

AMG-XB404 Datasheet, PDF (53/73 Pages) alpha microelectronics gmbh – Fully Integrated Single Motor Controller for Electrical Motors
AMG-XB404
Fully Integrated Single Motor Controller for Electrical Motors
set ICEN to 1
CNT
IC
INT
Figure 37: Timer input capture mode
(assuming immediate interrupt handling)
In input capture mode (ICEN=1, see figure 37) an interrupt is generated if a rising edge at the input
capture input pin IC is detected and interrupt enable INTEN in TCR is set to 1. CNT will be stopped
and can be read via the bus. By writing 1 to TCR[6] CNT will continue to be incremented.
Bit
7
6
5
4
3
2
1
0
Register Comment
name
Write
Read
Initial value
TMRIE
TMRIE
0
ICEN
ICEN
0
OCEN
OCEN
0
OCIR
OCIR
0
RESOM
RESOM
0
PRESCALER[2:0]
PRESCALER[2:0]
0
0
0
TCR8
8 bit Timer
control
register
Write
Read
CNT[7:0]
CNT[7:0]
TCNT8
8 bit Timer
counter
register
Initial value
0
0
0
0
0
0
0
0
Write
OCR[7:0]
8 bit Timer
Read
OCR[7:0]
OCR8
output
compare
Initial value
0
0
0
0
0
0
0
0
register
Write
Read
Initial value
TMRIE
TMRIE
0
ICEN
ICEN
0
OCEN
OCEN
0
OCIR
OCIR
0
RESOM
RESOM
0
PRESCALER[2:0]
PRESCALER[2:0]
0
0
0
TCR16
16 bit Timer
control
register
Write
TCNTL[7:0]
16 bit Timer
Read
TCNTL[7:0]
TCNTL16
counter
register;
Initial value
0
0
0
0
0
0
0
0
low byte
Write
TCNTH[15:8]
16 bit Timer
Read
TCNTH[15:8]
TCNTH16
counter
register;
Initial value
0
0
0
0
0
0
0
0
high byte
Write
OCRL[7:0]
16 bit Timer
Read
OCRL[7:0]
OCRL16
output
compare
Initial value
0
0
0
0
0
0
0
0
register;
lower byte
Write
OCRH[15:8]
16 bit Timer
Read
OCRH[15:8]
OCRH16
output
compare
Initial value
0
0
0
0
0
0
0
0
register;
higher byte
Table 29: General purpose timer registers, registers for second 8bit timer are identical to first and not shown
5.7.7. Watchdog Timer
The dedicated watchdog timer can be used to restart program execution starting at the reset vector
address (zero) if the MCU fails to update it periodically. The watchdog is controlled by the
watchdog timer control register WDTCR, see table 30.
The watchdog is enabled by setting the watchdog enable flag WDE to 1. The time-out value is set
AMG-XB404
Revision: A
2. Nov. 2012 © All rights reserved
Page 53 of 73