ADuC812
2
I
C-COMPATIBLE INTERFACE
The ADuC812 supports a 2-wire serial interface mode which is
2
2
I
C compatible. The I
C-compatible interface shares its pins with
the on-chip SPI interface and therefore the user can only enable
one or the other interface at any given time (see SPE in SPICON
SDATA (Pin 27)
SCLOCK (Pin 26)
Three SFRs are used to control the I
These are described below:
I2CCON:
SFR Address
Power-On Default Value
Bit Addressable
M
D
O
M
D
E
Bit
Name
7
MDO
6
MDE
5
MCO
4
MDI
3
I2CM
2
I2CRS
1
I2CTX
0
I2CI
I2CADD
I
Function
Holds the I
for the part. It may be overwritten
by user code. Technical Note µC001
at www.analog.com/microconverter
describes the format of the I
standard 7-bit address in detail.
SFR Address
9BH
Power-On Default Value
55H
Bit Addressable
No
Serial data I/O Pin
Serial Clock
2
C-compatible interface.
2
I
C Control Register
E8H
00H
Yes
M
C
O
M
D
Table XIII. I2CCON SFR Bit Designations
Description
2
I
C Software Master Data Output Bit (MASTER MODE ONLY).
This data bit is used to implement a master I
bit will be outputted on the SDATA pin if the data output enable (MDE) bit is set.
2
I
C Software Master Data Output Enable Bit (MASTER MODE ONLY).
Set by user to enable the SDATA pin as an output (Tx). Cleared by the user to enable SDATA pin
as an input (Rx).
2
I
C Software Master Clock Output Bit (MASTER MODE ONLY).
This data bit is used to implement a master I
this bit will be outputted on the SCLOCK pin.
2
I
C Software Master Data Input Bit (MASTER MODE ONLY).
This data bit is used to implement a master I
pin is latched into this bit on SCLOCK if the Data Output Enable (MDE) = "0."
2
I
C Master/Slave Mode Bit.
2
Set by user to enable I
C software master mode.
Cleared by user to enable I
2
I
C Reset Bit (SLAVE MODE ONLY).
Set by user to reset the I
Cleared by user code for normal I
2
I
C Direction Transfer Bit (SLAVE MODE ONLY).
Set by the MicroConverter if the interface is transmitting.
Cleared by the MicroConverter if the interface is receiving.
2
I
C Interrupt Bit (SLAVE MODE ONLY).
Set by the MicroConverter after a byte has been transmitted or received.
Cleared by User Software.
2
C Address Register
2
C peripheral address
previously). An Application Note describing the operation of this
interface as implemented is available from the MicroConverter
Website at www.analog.com/microconverter. This interface
can be configured as a Software Master or Hardware Slave,
and uses two pins in the interface.
I
2 I
C
M
2
C transmitter interface in software. Data written to this
2
C transmitter interface in software. Data written to
2
C receiver interface in software. Data on the SDATA
2
C hardware slave mode.
2
C interface.
2
C operation.
I2CDAT
Function
2
C
SFR Address
Power-On Default Value
Bit Addressable
2 I
C
R
S
2 I
C
T
X
2
I
C Data Register
The I2CDAT SFR is written by
the user to transmit data over
2
the I
C interface or read by user
code to read data just received by
2
the I
C interface. User software
should only access I2CDAT once
per interrupt cycle.
9AH
00H
No
2 I
C
I
Need help?
Do you have a question about the MicroConverter ADuC812 and is the answer not in the manual?
Questions and answers