English
Language : 

AMG-XB404 Datasheet, PDF (15/73 Pages) alpha microelectronics gmbh – Fully Integrated Single Motor Controller for Electrical Motors
AMG-XB404
Fully Integrated Single Motor Controller for Electrical Motors
interrupt enable flag GIE and the desired per-interrupt interrupt enable flags to 1. If more than one
interrupt signal is active the interrupt with the lowest interrupt vector will be executed first. The GIE
flag is disabled during interrupt vector execution and re-enabled when returning from an interrupt. It
is possible to manually re-enable the GIE flag during interrupt execution, and thus employ nested
interrupts.
As shown in table 3 all interrupts are indicated by interrupt flags in registers INTCONL and
INTCONH. The interrupt enable flags TWIIE (two wire interface), TXCIE (UART transmission
complete), RXCIE (UART reception complete), and SPIIE (MCU SPI ready) are contained in
INTCONH. All other interrupt enable flags are contained in the control registers of the individual
units as summarized in table 4.
Bit
7
6
5
Write
-
-
-
Read
IF_ADC
IF_TXC
IF_RXC
Initial value
0
0
0
Write
-
-
-
Read
IF_PFC
IF_SPI
1
Initial value
0
0
1
Table 3: Interrupt controller registers
4
-
IF_TWI
0
PFCIE
PFCIE
0
3
-
EXTINT
0
SPIIE
SPIIE
0
2
-
IF_TMR2
0
RXCIE
RXCIE
0
1
-
IF_TMR1
0
TXCIE
TXCIE
0
0
-
IF_TMR0
0
TWIIE
TWIIE
0
Register
name
INTCONL
INTCONH
Comment
Interrupt
controller
register;
low byte
Interrupt
controller
register;
high byte
Interrupt priority Source
Auto clear Interrupt events
Interrupt enable flag Interrupt flag
1
TMR0
yes
Timer match
Input capture
TCR8[7]
INTCONL[0]
2
TMR1
yes
Timer match
Input capture
TCR8[7]
INTCONL[1]
3
TMR2
yes
Timer match
Input capture
TCR16[7]
INTCONL[2]
4
GPIO
no
External interrupt
PORTIE
INTCONL[3], PORTIFR
5
UART RXC
no
Data reception complete
INTCONH[2]
INTCONL[5]
6
UART TXC
no
Data transmission complete
INTCONH[1]
INTCONL[6]
7
TWI
no
Data reception/
INTCONH[0]
INTCONL[4]
transmission complete
8
ADC
no
Sampling finished
ADCCONF[6]
INTCONL[7]
9
SPI
no
Data transmission complete
INTCONH[3]
INTCONH[6]
10
PFC
no
Table 4: Interrupt sources
DMCE/PFC exception
INTCONH[4]
INTCONH[7]
AMG-XB404
Revision: A
2. Nov. 2012 © All rights reserved
Page 15 of 73