I2C BUS DATA TRANSMISSION APPLIED RESEARCH (HARDWARE PART)
Abstract
The I2C bus is the serial bus which Philips corporation promotes. The overall system only depends on the data line (SDA) and the clock line (SCL) realizes the consummation full-duplex data transmission. Namely CPU only depends on these two lines with each periphery component to realize the exchange of information. The I2C bus system compares with the traditional parallel bus system has the simple structure, the good maintainability, easy to realize the system to expand, realize the modular standardization design, the reliable higher merit.
The present paper mainly elaborated the data transmission question between the I2C bus components by the I2C bus which expands by single chip microcomputer. This design uses AT89S51 single chip microcomputer's two I/O mouth to expand the I2C bus. Overall system is constituted by temperature sensor, signal gathering electric circuit, keyboard, display circuit, E2PROM reading-writing electric circuit. This system may gather the environment temperature, may also establish the police temperature through the keyboard, then demonstrates the ambient temperature and the police temperature on LCD. The single chip microcomputer may read or write E2PRPOM through the I2C bus, then demonstrate the store content.
As far as the design of the hardware is concerned, we chose AD590 as the temperature sensor to gather the environment temperature, and chose Phillips Corporation's PCF8591 with the I2C bus mouth as A/D conversion to operate the gathering single, the touching style key as the keyboard, 128*64LCD with Chinese fonts as the monitor display. Because we has not found has I2C connection LCD, we also used Phillips Corporation's PCF8574 chip with the I2C bus in controlling the LCD demonstration. We use the E2PROM AT24C04 chip as the external memory, whose capacity is 4K. The development of software adopts the popular modularized structure and the modularized debug facilities. The design of software adopts assembly C language entirely. The primary program is composed of main program, I2C expansion procedure, keyboard scanning subroutine, A/D sampling subroutine, LCD demonstration subroutine and so on.
The advantage of the design is that the I2C bus make electric circuit more simple. therefore the chip’s pin will be less moreover the PCB line also to reduce, causes the hardware benefit biggest and electric circuit simple.