[go: up one dir, main page]

CN105930294A - Digital IIC (Inter-Integrated Circuit) system based on state machine - Google Patents

Digital IIC (Inter-Integrated Circuit) system based on state machine Download PDF

Info

Publication number
CN105930294A
CN105930294A CN201610470849.4A CN201610470849A CN105930294A CN 105930294 A CN105930294 A CN 105930294A CN 201610470849 A CN201610470849 A CN 201610470849A CN 105930294 A CN105930294 A CN 105930294A
Authority
CN
China
Prior art keywords
iic
state machine
bus
serial
slave
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610470849.4A
Other languages
Chinese (zh)
Inventor
张宏彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201610470849.4A priority Critical patent/CN105930294A/en
Publication of CN105930294A publication Critical patent/CN105930294A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0016Inter-integrated circuit (I2C)

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)

Abstract

The invention relates to a digital IIC (Inter-Integrated Circuit) system based on a state machine. The digital IIC system comprises a processor, a serial bus clock, a serial data bus and a plurality of slave devices, wherein the processor is provided with two pin ends; the two pin ends are respectively connected with the serial bus clock and the serial data bus; the serial bus clock and the serial data bus are respectively and sequentially connected to a slave device I, a slave device II, a slave device III and a slave device IV. The digital IIC system disclosed by the invention has the beneficial effects that the problem that plenty of CPU (Central Processing Unit) time is wasted on IIC time sequence waiting can be avoided when an IIC is used by the digital IIC system, so that the whole system efficiency is increased; a timer is used for interrupting and pushing the state machine to simulate the operation of the IIC, the operation is realized by adopting an interruption way, and the system efficiency is greatly improved through the design; the digital IIC system is beneficial for meeting IIC interconnection at a high speed and a low speed.

Description

A kind of digital integrated electronic circuit bus system based on state machine
Technical field
The present invention relates to iic bus technology, particularly relate to a kind of digital integrated electronic circuit bus system based on state machine.
Background technology
Iic bus technology i.e. Inter-Integrated Circuit(IC bus), designed at early eighties by Philips Semiconductor Co., Ltd., it is primarily used to connect integrated circuit (ICS), IIC is a kind of multidirectional control bus, the most multiple chips may be connected under same bus structure, the most each chip can serve as the control source of real-time Data Transmission, and this mode simplifies signal transmission bus interface.Secondly, iic bus is to use holding wire minimum in various bus, and has the bus of the functions such as automatic addressing, the synchronization of many host clock and arbitration.Therefore, using the iic bus system that designs a calculating machine very convenient flexibly, volume is the least, is used widely in all kinds of actual application.
This case it is important to note that, more IIC device is also using in existing unmanned plane during flying device system design process, so the IIC design of whole system also highlights important, but, the comprehensive feature of IIC technology at present and the use of actual scene limit, need according to some reason following, carry out innovative design:
First, at present, the speed of the most of IIC device used on the market is general at present only supports 400Kbit/s, belong to relative to MCU speed and connect at a slow speed, when using IIC in a rapid system, the sequential that being easily caused a large amount of CPU time wastes in IIC waits, thus drags slow whole system efficiency.
Second, in aerocraft system designs, there is multiple IIC device, and each response device speed speed is inconsistent, some device can support 400Kbit/s, when some device can only support 100Kbit/s even 50Kbit/s, system effectiveness to be made reaches optimization, is now accomplished by making special handling for the device of different rates;The method used in aerocraft system designs is to be divided into by device quickly and slow response component other places reason, the method is used to need to use multiple IIC interfaces, aerocraft system design comparison is intensive simultaneously, the peripheral resource of used MCU is limited, so that realizing many IIC interface by the mode of GPIO simulation is the selection making system optimization.
3rd, the program of overwhelming majority GPIO simulation iic bus is all inquiry mode at present, wastes a large amount of cpu cycle for circular wait.This case use timer interruption promote state machine to simulate the operation of iic bus, employing interrupt mode realizes, call back function can be automatically called when read-write completes or makes mistakes by self-defining call back function, this design greatly improves system effectiveness, certainly, this design also can read and write iic bus by inquiry mode, it is only necessary to inquiry IIC_BUSY.
4th, when design, if the device without subaddressing is only supported in the CPAL storehouse selecting MCU, the ST company of STM32 to release under interrupt mode works, it is impossible to accomplish that interrupt mode completes to read and write major part I2C device.Simultaneously, CPAL storehouse is when multiple IIC use simultaneously, the most also there are existing problems, actual product uses instability, thus, finally abandon and use the CPAL storehouse of ST company and standard peripherals storehouse to access IIC device, use GPIO based on state machine to simulate iic bus, be the most also to support that interrupt mode completes IIC read-write.
Therefore, for the above, need prior art is effectively innovated.
Summary of the invention
For disadvantages described above, the present invention provides a kind of digital integrated electronic circuit bus system based on state machine that system effectiveness is greatly improved, to solve many deficiencies of prior art.
For achieving the above object, the present invention is by the following technical solutions:
A kind of digital integrated electronic circuit bus system based on state machine, it is made up of processor, Serial Bus Clock, serial data bus and some slaves, described processor arranges two leads ends, the two leads ends connects Serial Bus Clock, serial data bus respectively, and described Serial Bus Clock, serial data bus are sequentially ingressed into slave I, slave II, slave III, slave IV the most respectively;Described Serial Bus Clock, serial data bus promote the running of whole IIC state machine based on intervalometer, by adjusting the timing step of intervalometer, meet the IIC interconnection of high, low speed.
Described Serial Bus Clock, serial data bus are respectively provided with pull-up resistor.
When bus system realizes, including IIC write operation flow process, this flow process supports that 1 to 4 byte IIC, from address of devices, supports that multibyte data sends;
When bus system realizes, including IIC read operation flow process, this flow process supports that 1 to 4 byte IIC, from address of devices, supports that multibyte data reads.
Having the beneficial effect that of digital integrated electronic circuit bus system based on state machine of the present invention
(1), when this system uses IIC, a large amount of CPU time can be avoided to waste the problem waited in IIC sequential, improve whole system efficiency;
(2) using timer interruption to promote state machine to simulate the operation of iic bus, use interrupt mode to realize, this design greatly improves system effectiveness;
(3) be conducive to meeting the IIC interconnection of high, low speed.
Accompanying drawing explanation
Below according to accompanying drawing, the present invention is described in further detail.
Fig. 1 is digital integrated electronic circuit bus system connection diagram based on state machine described in the embodiment of the present invention;
Fig. 2 is that the intervalometer of digital integrated electronic circuit bus system based on state machine described in the embodiment of the present invention promotes state machine entrance schematic flow sheet;
Fig. 3 is the IIC write operation schematic flow sheet of digital integrated electronic circuit bus system based on state machine described in the embodiment of the present invention;
Fig. 4 is the IIC read operation schematic flow sheet of digital integrated electronic circuit bus system based on state machine described in the embodiment of the present invention.
In figure:
1, processor;2, slave I;3, slave II;4, slave III;5, slave IV;6, supply pin;7, Serial Bus Clock;8, serial data bus.
Detailed description of the invention
As shown in Figure 1, digital integrated electronic circuit bus system based on state machine described in the embodiment of the present invention, by processor 1, Serial Bus Clock 7, serial data bus 8 and some slaves composition, described processor 1 arranges two leads ends, the two leads ends connects Serial Bus Clock 7 respectively, serial data bus 8, described Serial Bus Clock 7, serial data bus 8 is each all sequentially ingressed into slave I 2, slave II 3, slave III 4, slave IV 5, simultaneously, if with pull-up resistor to meet circuit sequence requirement inside described processor 1, then it is not required to external pull-up resistor.It addition, this digital integrated electronic circuit bus system is with power module.
As in Figure 2-4, the digital integrated electronic circuit bus system based on state machine described in the embodiment of the present invention, promote the running of whole IIC state machine based on intervalometer, by adjusting the timing step of intervalometer, the IIC interconnection of high, low speed can be met;This bus system workflow mainly includes that intervalometer promotes state machine entrance flow process, IIC write operation, IIC read operation, and IIC write operation therein supports that 1 to 4 byte IIC, from address of devices, supports that multibyte data sends;IIC read operation therein supports that 1 to 4 byte IIC, from address of devices, supports that multibyte data reads.
Digital integrated electronic circuit bus system based on state machine described in the above embodiment of the present invention, this case uses timer interruption to promote state machine to simulate the operation of iic bus, employing interrupt mode realizes, call back function can be automatically called when read-write completes or makes mistakes by self-defining call back function, this design greatly improves system effectiveness, this design also can read and write iic bus by inquiry mode, it is only necessary to inquiry IIC_BUSY;If the device without subaddressing is only supported in the CPAL storehouse selecting MCU, the ST company of STM32 to release under interrupt mode works, it is impossible to accomplish that interrupt mode completes to read and write major part I2C device.Simultaneously, CPAL storehouse is when multiple IIC use simultaneously, the most also there are existing problems, actual product uses instability, thus, finally abandon and use the CPAL storehouse of ST company and standard peripherals storehouse to access IIC device, use GPIO based on state machine to simulate iic bus, be the most also to support that interrupt mode completes IIC read-write.
The above-mentioned description to embodiment be for the ease of those skilled in the art it will be appreciated that and application this case technology, these examples obviously can be made various amendment by person skilled in the art easily, and General Principle described herein is applied in other embodiments without through performing creative labour.Therefore, this case is not limited to above example, and those skilled in the art should be in the protection domain of this case according to the announcement of this case, the improvement made for this case and amendment.

Claims (4)

1. a digital integrated electronic circuit bus system based on state machine, it is characterized in that, it is made up of processor, Serial Bus Clock, serial data bus and some slaves, described processor arranges two leads ends, the two leads ends connects Serial Bus Clock, serial data bus respectively, and described Serial Bus Clock, serial data bus are sequentially ingressed into slave I, slave II, slave III, slave IV the most respectively;Described Serial Bus Clock, serial data bus promote the running of IIC state machine based on intervalometer, by adjusting the timing step of intervalometer, meet the IIC interconnection of high, low speed.
Digital integrated electronic circuit bus system based on state machine the most according to claim 1, it is characterised in that: described Serial Bus Clock, serial data bus are respectively provided with pull-up resistor.
Digital integrated electronic circuit bus system based on state machine the most according to claim 1, it is characterised in that: when bus system realizes, including IIC write operation flow process, this flow process supports that 1 to 4 byte IIC, from address of devices, supports that multibyte data sends.
Digital integrated electronic circuit bus system based on state machine the most according to claim 1, it is characterised in that: when bus system realizes, including IIC read operation flow process, this flow process supports that 1 to 4 byte IIC, from address of devices, supports that multibyte data reads.
CN201610470849.4A 2016-06-25 2016-06-25 Digital IIC (Inter-Integrated Circuit) system based on state machine Pending CN105930294A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610470849.4A CN105930294A (en) 2016-06-25 2016-06-25 Digital IIC (Inter-Integrated Circuit) system based on state machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610470849.4A CN105930294A (en) 2016-06-25 2016-06-25 Digital IIC (Inter-Integrated Circuit) system based on state machine

Publications (1)

Publication Number Publication Date
CN105930294A true CN105930294A (en) 2016-09-07

Family

ID=56828301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610470849.4A Pending CN105930294A (en) 2016-06-25 2016-06-25 Digital IIC (Inter-Integrated Circuit) system based on state machine

Country Status (1)

Country Link
CN (1) CN105930294A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111045968A (en) * 2019-11-04 2020-04-21 深圳震有科技股份有限公司 Method for realizing CPU slave computer on IIC, intelligent terminal and storage medium
CN118550856A (en) * 2024-07-25 2024-08-27 惠州市新明海科技有限公司 Method for simulating IIC communication, single-chip microcomputer product and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581026A (en) * 2004-05-19 2005-02-16 中兴通讯股份有限公司 Device and method for operating multiple I2C sub device in communication equipment
WO2006117752A1 (en) * 2005-04-29 2006-11-09 Koninklijke Philips Electronics, N.V. I2c slave/master interface enhancement using state machines
CN101627375A (en) * 2006-03-31 2010-01-13 Nxp股份有限公司 Method and system for I2C clock generation
CN103440216A (en) * 2013-08-22 2013-12-11 深圳市汇顶科技股份有限公司 Chip and method for debugging MCU through I2C slave unit
CN105354070A (en) * 2015-12-11 2016-02-24 成都广达新网科技股份有限公司 Method for upgrading equipment firmware through I2C

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581026A (en) * 2004-05-19 2005-02-16 中兴通讯股份有限公司 Device and method for operating multiple I2C sub device in communication equipment
WO2006117752A1 (en) * 2005-04-29 2006-11-09 Koninklijke Philips Electronics, N.V. I2c slave/master interface enhancement using state machines
CN101627375A (en) * 2006-03-31 2010-01-13 Nxp股份有限公司 Method and system for I2C clock generation
CN103440216A (en) * 2013-08-22 2013-12-11 深圳市汇顶科技股份有限公司 Chip and method for debugging MCU through I2C slave unit
CN105354070A (en) * 2015-12-11 2016-02-24 成都广达新网科技股份有限公司 Method for upgrading equipment firmware through I2C

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周兴华,倪敏娜: "《手把手教你学ARM Cortex-M0 ——基于LPC11X系列》", 31 January 2016, 北京航空航天大学出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111045968A (en) * 2019-11-04 2020-04-21 深圳震有科技股份有限公司 Method for realizing CPU slave computer on IIC, intelligent terminal and storage medium
CN118550856A (en) * 2024-07-25 2024-08-27 惠州市新明海科技有限公司 Method for simulating IIC communication, single-chip microcomputer product and storage medium

Similar Documents

Publication Publication Date Title
KR100352224B1 (en) Direct memory access(dma) transactions on a low pin count bus
CN103412834B (en) The multiplexing method of a kind of single SOC and single SOC multi-operation mode
JP7391154B2 (en) Daisy chain SPI integrated circuit and its method of operation
US6633944B1 (en) AHB segmentation bridge between busses having different native data widths
JPH077374B2 (en) Interface circuit
JPH05502526A (en) Enhanced VMEbus protocol using pseudo-synchronous handshaking and block mode data transfer
CN103377081A (en) Implementation method for interrupt mechanism between embedded numerical control system dual-core chip and peripheral
US20030131173A1 (en) Method and apparatus for host messaging unit for peripheral component interconnect busmaster devices
CN113138949A (en) Interrupt controller, interrupt control method, chip, computer device, and medium
CN201583943U (en) IP structure of high-performance low-power consumption DMA of audio SOC chip
CN102591817B (en) Multi-bus bridge controller and implementing method thereof
CN104714907A (en) Design method for converting PCI bus into ISA bus or APB bus
TW409204B (en) Expansion interface conversion device and conversion method therefor
CN105930294A (en) Digital IIC (Inter-Integrated Circuit) system based on state machine
CN1547082A (en) Programmable Interrupt Controller
CN105718396B (en) A kind of I of big data master transmissions2C bus units and its means of communication
CN112035399A (en) FPGA-based SPI slave module implementation method
CN203930809U (en) The management system of the different GPU of a kind of compatibility
CN104077258A (en) SPI (Serial Peripheral Interface) and Localbus intercommunication method and application thereof
CN212208283U (en) A two-way handshake communication circuit between single-chip microcomputers
CN210295083U (en) Display board card USB peripheral hardware connecting system
CN205910690U (en) Digital integrated circuit bus system based on state machine
CN208873141U (en) Mainboard and computer based on FT1500A processor
CN1560748A (en) Drive method of USB interface
CN221040028U (en) Development kit based on automatic driving AI system chip

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160907