English
Language : 

AMG-XB404 Datasheet, PDF (47/73 Pages) alpha microelectronics gmbh – Fully Integrated Single Motor Controller for Electrical Motors
AMG-XB404
Fully Integrated Single Motor Controller for Electrical Motors
Bit
7
6
5
Write
PORTBO[7]
OC2
OC1
Initial value
0
0
0
Read
Write
PORTCO[7:5]
Initial value
0
0
0
Read
Write
Initial value
0
0
0
Read
Write
Initial value
0
0
0
Read
Write
Initial value
0
0
0
Read
Write
Initial value
0
0
0
Read
Write
Initial value
0
0
0
Read
Write
Initial value
0
0
0
Read
Table 21: XB404 GPIO registers
4
3
2
1
0
Port Comment
OC0
PORTBO[3:2]
0
0
0
PORTBI[7:0]
UARTRXPOL UARTTXPOL
0
0
B
Port B data
register
SCKLIPOL PORTCO[3]
0
0
PORTCI[7:2]
IC2POL
0
IC1POL
0
IC0POL
0
C
Port C data
register
PORTBE[7:0]
0
0
0
0
PORTBE[7:0]
Port B
0
B
output
enable
register
PORTCE[7:2]
0
0
0
0
PORTCE[7:2]
Port C
0
C
output
enable
register
PORTIE[7:0]
0
0
0
0
PORTIE[7:0]
Interrupt
0
-
enable
register
PORTIFR[7:0]
0
0
0
0
PORTIFR[7:0]
0
-
Interrupt
flag register
PORTEO[2:0]
0
0
0
0
PORTEI[2:0]
PORTEE[2:0]
0
0
0
0
PORTEE[2:0]
0
Port E data
register
E
Port E
0
output
enable
register
5.7.3. Universal Asynchronous Receiver Transmitter Interface (UART)
The UART's IO pins are mapped to GPIO pins if enabled (see figure 29). The baud rate is
adjustable. All data is sent and received in blocks of a start bit, eight data bits, and a stop bit (see
figure 30).
start
bit
7
6
54
3
2
1
0
stop
bit
Figure 30: UART data transfer
Data is sent by writing a byte to the transmit buffer register TXB, the most recent received byte can
be read from the receive buffer RXB, see table 32 p. 58.
The UART is configured by writing to the control and status register UCSR. As shown in table 23
the interface is enabled by setting UART_EN to 1, the baud rate is adjusted by setting the lower
three bits as shown in table 22. If the ready flag RDY is set to 1 the interface has sent all pending
data and is ready for another transmission. If the stop bit of an incoming transmission is not correct
a framing error is indicated by the framing error flag FERR being set to 1. An overflow error will be
indicated by the flag OERR. It is set to 1 if a byte is received before the previous byte has been
read from RXB.
The RX and TX polarities can be set by writing UARTRXPOL respectively UARTTXPOL (see
AMG-XB404
Revision: A
2. Nov. 2012 © All rights reserved
Page 47 of 73