http://blog.csdn.net/firefly_cjd/article/details/51921129
1、启动时序
红色阴影区表示启动信号
2、停止信号
3、IIC写一个字节
4、应答位ACK
SDA driven LOW by M1170 for one clock cycle when SCL is HIGH
XR20M1170IG16TR
I2C与SPI的选择:I2C-bus or SPI interface select. I2C-bus interface is selected if this pin is HIGH. SPI interface is selected if this pin is LOW
高电平为I2C,低电平为SPI
IRQ#: 中断信号 Interrupt output (open-drain, active LOW).
低电平有效
RESET#:复位信号
Reset (active LOW) - A longer than 40 ns LOW
pulse on this pin will reset the internal registers and
all outputs.
超过40ns的低电平脉冲
配置寄存器:
16550 UART兼容性控制、状态和数据传输
激活方向控制功能:set EFCR bit-4 to “1”
This pin is HIGH for receive state and LOW for transmit state.
时钟产生的两种方法:
external 24 MHz crystal on pins XTAL1 and XTAL2, or external clock source of up to 64 MHz on XTAL1 pin
TX FIFO is full 回复negative acknowledge:
SDA driven HIGH by M1170 for one clock cycle when SCL is HIGH
读和写的判定:
If bit-0 is’0’, then it is a write transaction. If bit-0 is ’1’, then it is a read transaction
THR/RHR:数据保持寄存器
ISR/IER:中断状态与控制寄存器
FCR:FIFO控制寄存器
LSR/LCR:接收线路状态与控制寄存器
MSR/MCR:调制解调器状态与控制寄存器
DLL/DLM/DLD:可编程数据速率(时钟)除数寄存器
SPR:用户可访问暂存寄存器
MCR:分频控制寄存器,Bit 7(1~4)
BAUD RATE GENERATOR框图
问题
1、如下图所示,本机硬件选用的是GND-GND的接法,为何不选用SDA-GND的接法
2、下图为子地址的格式,如何知道子地址是多少
3、什么情况下发中断