EAGLE
PRELIMINARY
Ver 1.3
3.27.10 TWI Registers
3.27.10.1 TWI Control Register (TWICON)
Address : FFE0 AC00h
Bit
31 : 8
7
R/W
R
R/W
Description
Default Value
Reserved.
-
0b
TWIEN : TWI Controller Enable bit.
TWI Controller Enable. This bit must be set before setting other control
register bits that may affect the TWI operation.
1: TWI Controller Enable
0: TWI Controller Disable
6
5
R
R/W
Reserved.
MSTA : Master/Slave Mode Select bit.
-
0b
When AE32000C changes this bit from ‘0’ to ‘1’, the TWI controller
generates a START condition in Master mode. When this bit is cleared, a
STOP condition is generated and the TWI controller switches to Slave
mode. If this bit is cleared, due to lost of bus control resulting from bus
arbitration, a STOP condition will not be generated.
1 : Generate Start condition
0 : Generate Stop condition
4
3
R/W
R/W
TWITR : Transmit/Receive Mode Select bit.
This bit selects the direction of Master data transfers. Available only in
master device.
1: TWI Master Transmit
0: TWI Master Receive
TXAK : Transmit Acknowledge Enable.
This bit specifies the value driven onto the SDA line during the
acknowledge cycles for both Master and Slave receivers
Since Master receivers indicate the end of data reception by not
acknowledging the last byte of transfer, this bit is a mean for AE32000C
to end a Master receiver transfer.
0b
0b
1: ACK bit = ‘1’ - no acknowledge
0: ACK bit = ‘0’ – acknowledge
2
R/W
REPST : Repeated Start Enable.
0b
Writing a ‘1’ to this bit generates a repeated START condition on the bus
if TWI controller is the current bus Master. This bit is cleared after Start
condition is generated. This bit is always read as ‘0’.
1: Generate Repeated Start condition
0 : N/A
1
0
R/W
R/W
TCFIRQ : Transfer complete IRQ Enable
This bit initiates the interrupt request for one byte of data transfer.
1 : Interrupt enable
0 : Interrupt disable
LSTIRQ : Lost Arbitration IRQ Enable
0b
0b
This bit enables interrupt request generation for a master which lost
arbitration.
1 : Interrupt enable
0 : Interrupt disable
Beijing Peak Microtech Co.Ltd.
CONFIDENTIAL
202