摘要
文章介绍了分布式测温系统结构以及应用I^2C总线接口芯片设计存储器电路,I^2C总线采用两线制,由数据线SDA和时钟线SOL构成。文中说明I^2C总线特点和寻址方式。对I^2C总线数据传送的过程进行了详细阐述。分析了I^2C总线启动与结束时序,解释了数据传送过程中应答信号与非应答信号的处理。并指出了程序设计中应答信号与非应答信号容易产生错误的地方。给出了I^2C总线E^2PROM芯片与单片机的硬件连接。对I^2C总线E^2PROM芯片的软件编程进行了详细描述,阐述了E^2PROM芯片的写入程序设计以及连续读取程序设计。文中基于I^2C总线存储器电路连接与软件编程已经成功应用于分布式测温系统中,实现了正确存储报警信息的功能。
This paper introduces the structure of distributed temperature measurement system and memory circuit of applying I^2C bus interface chip. I^2C bus adopts 2-wire serial interface. It is consist of serial data SDA and serial clock SCL. This paper illustrates the characteristic of I^2C bus and addressing space. The transfer process of data based on I^2C bus is expounded in detail. The start time slot and ending time slot of I^2C bus is analyzed. The process of acknowledge signal and non- acknowledge signal in data transfer are explained. The error that is easy to be produced for acknowledge signal and non- acknowledge signal is pointed out. The hardware connection between E^2PROM based on I^2C bus and MCU is given out. The software program of E^2PROM based on I^2C bus is described in detail. Writing program and reading program for E^2PROM are expounded. The circuit connection and software program based on I^2C bus in this paper are already applied on distributed temperature measurement system on success. The function to memory alarm message is realized correctly.
出处
《制造业自动化》
北大核心
2008年第9期8-11,25,共5页
Manufacturing Automation
基金
北京市教育委员会科技发展计划项目(编号KM200511232010)
关键词
I^2C总线
时序
存储器
读写
I^2C Bus
time slots
memory
reading and writing