CN113392049B - Chip system for realizing transmission of ADC (analog to digital converter) acquisition data by simulating i2c protocol - Google Patents
Chip system for realizing transmission of ADC (analog to digital converter) acquisition data by simulating i2c protocol Download PDFInfo
- Publication number
- CN113392049B CN113392049B CN202010117967.3A CN202010117967A CN113392049B CN 113392049 B CN113392049 B CN 113392049B CN 202010117967 A CN202010117967 A CN 202010117967A CN 113392049 B CN113392049 B CN 113392049B
- Authority
- CN
- China
- Prior art keywords
- mcu
- chip
- adc
- main chip
- data
- 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.)
- Active
Links
- 230000005540 biological transmission Effects 0.000 title abstract description 5
- 238000004891 communication Methods 0.000 claims abstract description 14
- 238000012790 confirmation Methods 0.000 claims abstract description 8
- 238000012545 processing Methods 0.000 claims abstract description 7
- 238000004088 simulation Methods 0.000 claims abstract description 6
- 238000012360 testing method Methods 0.000 claims description 3
- 238000012795 verification Methods 0.000 claims description 3
- 238000012546 transfer Methods 0.000 claims description 2
- 238000000034 method Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 238000007639 printing Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000903 blocking effect Effects 0.000 description 1
- 230000005465 channeling Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/382—Information transfer, e.g. on bus using universal interface adapter
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B41—PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
- B41J—TYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
- B41J2/00—Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed
- B41J2/315—Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed characterised by selective application of heat to a heat sensitive printing or impression-transfer material
- B41J2/32—Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed characterised by selective application of heat to a heat sensitive printing or impression-transfer material using thermal heads
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01K—MEASURING TEMPERATURE; MEASURING QUANTITY OF HEAT; THERMALLY-SENSITIVE ELEMENTS NOT OTHERWISE PROVIDED FOR
- G01K13/00—Thermometers specially adapted for specific purposes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0016—Inter-integrated circuit (I2C)
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/38—Universal adapter
- G06F2213/3852—Converter between protocols
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Information Transfer Systems (AREA)
- Accessory Devices And Overall Control Thereof (AREA)
Abstract
The application provides a chip system for realizing transmission of ADC acquisition data by simulating an i2c protocol, which comprises: the MCU chip is used for expanding an ADC related interface of the main chip and simulating an i2c communication protocol through two GPIO pins; the CPU of the main chip is used for realizing acquisition of temperature data through the MCU, the CPU transmits a clock signal to the MCU through one pin of the MCU simulation i2c communication protocol, the MCU transmits a confirmation message to the main chip after the MCU catches the clock signal, the main chip starts reading ADC data after confirming MCU information, and the MCU transmits the acquired data to the main chip in a GPIO simulation waveform mode; and the program module of the printer transmits the ADC data to the program module of the printer for processing after the main chip receives the ADC data.
Description
Technical Field
The application relates to the field of printers, in particular to a chip system for realizing transmission of ADC (analog to digital converter) acquisition data by simulating an i2c protocol.
Background
With the continuous development of technology, more and more electronic products are appearing in people's daily life. Thermal ticket printers are a common printer device, and print functions are typically implemented by controlling a printhead based on a single chip microcomputer. Thermal ticket printers are a common printer device, and print functions are typically implemented by controlling a printhead based on a single chip microcomputer. For example, the Beijing junzheng X1000E chip is a chip aiming at the field of the Internet of things, and a set of printer driver based on the Beijing junzheng chip is developed aiming at the thermal printer market. However, the X1000E chip lacks relevant support of an ADC, which is a necessary interface of the printer and needs to detect the temperature of the printhead, and peripheral devices such as paper taking detection, paper blocking detection, and detection of power supply voltage. For this reason, the capability of supporting ADC of X1000E needs to be extended, and in view of low cost, for example, MCU using HR7p153 soft in the east can be considered.
Existing chips such as X1000E chips support the interface device of i2c but lack the associated support of ADCs, which are necessary interfaces for printers that need to detect the printhead temperature, etc. To solve this problem, a low-cost MCU chip HR7p153 is required to be externally connected to expand the ADC related interface, but HR7p153 does not support the i2c protocol, and there is a technical defect that there is no interface capable of communicating with X1000E.
Common technical terms include:
X1000E: the Beijing jun is pushing out a dual-core (large-size core) embedded chip aiming at the Internet of things.
MCU: micro control unit (Microcontroller Unit; MCU), also called single chip microcomputer (Single Chip Microcomputer) or single chip microcomputer
CPU: the main cpu of the chip X1000E which is being exited by Beijing jun is called as a big core for short.
I2c protocol: an interface for communication. The I2C bus is a simple, bi-directional two-wire synchronous serial bus developed by Philips corporation. It requires only two wires to transfer information between devices connected to the bus.
GPIO: general input and output abbreviations.
HR7p153: a third party MCU that can collect ADC data.
SerialClock (SCL) and SerialData (SDA)
SCL, SDA, two pins for source (DVD) and display (TV) channeling, a memory in the TV, which stores information about the resolution supported by the TV, for example: 720P or 1080P, if the source (DVD) does not know how much the television resolution is supported by the currently connected television, the source (DVD) does not know what resolution to send out, so the source (DVD) will read the television resolution through the two pins at the beginning, and when the source (DVD) knows the rear source (DVD) will send out the video picture that matches the television resolution. Where SCL is the CLOCK (CLOCK) pin and SDA is the data pin.
An ADC, analog-to-digital converter (english: analog-to-digital converter) is a type of device for converting a continuous signal in Analog form into a discrete signal in digital form. An analog to digital converter may provide the signal for measurement. The ADC functions to convert a continuously varying analog signal into a discrete digital signal. Real world analog signals, such as temperature, pressure, sound or images, etc., need to be converted into digital form that is easier to store, process and transmit.
Disclosure of Invention
In order to solve the above problems in the prior art, an object of the present application is to:
the application realizes the communication between the external MCU (for example HR7p 153) and the chip (for example X1000E) containing the CPU by using the GPIO to simulate the i2c protocol, solves the communication problem between the chip (X1000E) containing the CPU and the MCU and transmits the temperature data of the printing head acquired by the ADC.
Specifically, the application provides a chip system for realizing transmission of ADC acquisition data by simulating i2c protocol, which comprises:
the MCU chip is used for expanding an ADC related interface of the main chip and simulating an i2c communication protocol through two GPIO pins;
the CPU of the main chip is used for realizing acquisition of temperature data through the MCU, the CPU transmits a clock signal to the MCU through one pin of the MCU simulation i2c communication protocol, the MCU transmits a confirmation message to the main chip after the MCU catches the clock signal, the main chip starts reading ADC data after confirming MCU information, and the MCU transmits the acquired data to the main chip in a GPIO simulation waveform mode;
and the program module of the printer transmits the ADC data to the program module of the printer for processing after the main chip receives the ADC data.
The main chip of the printer is externally connected with the MCU chip.
The main chip supports the interface device of i2c but lacks the associated support of ADC.
The external MCU chip does not support the i2c protocol.
The application has the advantages that: the system can be used for realizing that the temperature data of the ADC acquisition printing head is correctly transmitted to the X1000E for use by using through two GPIO PI N analog i2c communication protocols of an external MCU, and the function of the X1000E for acquiring the temperature data of the ADC is expanded.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate and together with the description serve to explain the application.
Fig. 1 is a schematic block diagram of a system of the present application.
Fig. 2 is a schematic block flow diagram of a method of application of the system of the present application.
Detailed Description
Currently, technical terms commonly used in the art include:
GPIO: general input and output abbreviations.
CPU: the CPU (Central Processing Unit) is a very large scale integrated circuit, and is a computing Core (Core) and a Control Core (Control Unit) of a computer. Its function is mainly to interpret computer instructions and process data in computer software.
MCU: the micro control unit (Microcontroller Unit), also called a single chip microcomputer (Single Chip Microcomputer) or a single chip microcomputer, properly reduces the frequency and specification of a central processing unit (Central Process Unit; CPU), and can integrate peripheral interfaces such as a memory (memory), a counter (Timer), USB, A/D conversion, UART, PLC, DMA and the like, and even an LCD driving circuit on a single chip to form a chip-level computer for different application occasions to perform different combination control.
As shown in fig. 1, the present application relates to a chip system for implementing analog i2c protocol to transmit ADC acquisition data, the system comprising:
the MCU chip is used for expanding an ADC related interface of the main chip, simulating an i2c communication protocol through two GPIO pins, wherein one pin is used as an SCL pin of i2c, and the other pin is used as an SDA pin; the CPU of the main chip is used for realizing acquisition of temperature data through the MCU, the CPU transmits a clock signal to the MCU through an SCL pin of the MCU, the MCU transmits a confirmation message to the main chip after the MCU catches the clock signal, the main chip starts to read ADC data after confirming MCU information, and the MCU transmits the acquired data to the main chip in a GPIO analog waveform mode;
and the program module of the printer transmits the ADC data to the program module of the printer for processing after the main chip receives the ADC data.
The main chip of the printer is externally connected with the MCU chip.
The main chip supports the interface device of i2c but lacks the associated support of ADC.
The external MCU chip does not support the i2c protocol.
After the MCU captures the clock signal, the MCU tests with the CPU of the main chip, verifies the address of the MCU, and sends a confirmation message to the main chip after verification.
Further, for example, a dual-core (size core) embedded chip X1000E for the internet of things is being introduced by beijing jun. The main CPU of Beijing junzheng chip X1000E is called as 'big core'. For example, the Beijing jun X1000E chip is a chip for the field of Internet of things, and a set of printer drivers based on the jun chip are being developed for the thermal printer market. The CPU is responsible for preparing and transmitting data.
As shown in fig. 2, taking the example of the beijing junzheng X1000E chip, the method comprises the following steps:
s1, simulating an i2c communication protocol by an external MCU through two GPIO pins;
s2, one of the two GPIO pins in the step S1 waits for a clock signal transmitted by a CPU of the main chip, and the MCU sends a confirmation message to the main chip after grabbing the clock signal through the pin;
s3, after the MCU information is confirmed by the main chip, reading ADC data is started;
s4, the MCU starts to collect temperature data of the printing head, and the collected data is sent to the main chip in a GPIO analog waveform mode.
The main technology implementation process comprises the following steps:
1. taking two GPIOs of the MCU as corresponding initialization; one sclpin as i2c and the other sdapin.
And 2, waiting for a clock signal transmitted by the X1000E main CPU end by SCL pin, testing with a host after the clock signal is acquired, verifying the address of the MCU a priori, and sending a confirmation message to the X1000E after the verification is correct.
After the MCU information is confirmed by x1000e, the ADC data starts to be read.
And 4, the MCU starts to collect the temperature data of the printing head, and the collected data is sent to the X1000E in a GPIO analog waveform mode.
And 5, receiving the temperature data by X1000E, and delivering the temperature data to a printer program for processing.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, and various modifications and variations can be made to the embodiments of the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims (4)
1. A chip system for implementing analog i2c protocol to transfer ADC acquisition data, the system comprising:
the MCU chip is used for expanding an ADC related interface of the main chip and simulating an i2c communication protocol through two GPIO pins;
the CPU of the main chip is used for realizing acquisition of temperature data through the MCU, the CPU transmits a clock signal to the MCU through one pin of the MCU simulation i2c communication protocol, the MCU transmits a confirmation message to the main chip after the MCU catches the clock signal, the main chip starts reading ADC data after confirming MCU information, and the MCU transmits the acquired data to the main chip in a GPIO simulation waveform mode;
the main chip of the printer is externally connected with an MCU chip;
the main chip supports the interface device of i2c but lacks the relevant support of ADC;
the external MCU chip does not support the i2c protocol;
and the program module of the printer transmits the ADC data to the program module of the printer for processing after the main chip receives the ADC data.
2. The system on a chip for implementing analog i2c protocol for transferring ADC acquisition data as recited in claim 1, wherein,
after the MCU captures the clock signal, the MCU tests with the CPU of the main chip, verifies the address of the MCU, and sends a confirmation message to the main chip after verification.
3. The system on a chip for implementing an analog i2c protocol for transmitting ADC acquisition data according to claim 1, wherein said analog i2c communication protocol is implemented by two GPIO pins, one of which is the SCL pin of i2c and the other is the SDA pin.
4. The system on a chip for implementing analog i2c protocol for transmitting ADC acquisition data according to claim 1, wherein one of the pins of the analog i2c communication protocol by the MCU is an SCL pin.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010117967.3A CN113392049B (en) | 2020-02-26 | 2020-02-26 | Chip system for realizing transmission of ADC (analog to digital converter) acquisition data by simulating i2c protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010117967.3A CN113392049B (en) | 2020-02-26 | 2020-02-26 | Chip system for realizing transmission of ADC (analog to digital converter) acquisition data by simulating i2c protocol |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113392049A CN113392049A (en) | 2021-09-14 |
CN113392049B true CN113392049B (en) | 2023-10-31 |
Family
ID=77615272
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010117967.3A Active CN113392049B (en) | 2020-02-26 | 2020-02-26 | Chip system for realizing transmission of ADC (analog to digital converter) acquisition data by simulating i2c protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113392049B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012170921A2 (en) * | 2011-06-10 | 2012-12-13 | Intersil Americas LLC | System and method for operating a one-wire protocol slave in a two-wire protocol bus environment |
CN103442418A (en) * | 2013-08-28 | 2013-12-11 | 江苏大学 | High-temperature data collection and synchronous hibernation control method of CC2530 nodes in coal field fire area |
CN107577444A (en) * | 2017-10-20 | 2018-01-12 | 珠海美佳音科技有限公司 | The synchronous transfer circuit and synchronous method of printer compatible chip |
-
2020
- 2020-02-26 CN CN202010117967.3A patent/CN113392049B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012170921A2 (en) * | 2011-06-10 | 2012-12-13 | Intersil Americas LLC | System and method for operating a one-wire protocol slave in a two-wire protocol bus environment |
CN103442418A (en) * | 2013-08-28 | 2013-12-11 | 江苏大学 | High-temperature data collection and synchronous hibernation control method of CC2530 nodes in coal field fire area |
CN107577444A (en) * | 2017-10-20 | 2018-01-12 | 珠海美佳音科技有限公司 | The synchronous transfer circuit and synchronous method of printer compatible chip |
Also Published As
Publication number | Publication date |
---|---|
CN113392049A (en) | 2021-09-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6345330B2 (en) | Communication channel and interface devices for bridging computer interface buses | |
KR100572165B1 (en) | Universal Serial Bus Device Controller | |
US8886996B2 (en) | Debugging device and method for performing a debugging process to a target system | |
CN100507867C (en) | System for automatic testing USB compatibility | |
TWI385526B (en) | General purpose interface controller | |
JP6300202B2 (en) | Memory card and memory card control device | |
CN109359082B (en) | USB data real-time monitoring system and method based on FPGA | |
JP2008293181A (en) | Information processing apparatus and method | |
TW386215B (en) | Emulation system and information processor | |
CN113392049B (en) | Chip system for realizing transmission of ADC (analog to digital converter) acquisition data by simulating i2c protocol | |
WO2016208038A1 (en) | Host-side transceiver device and transceiver system | |
CN103064817B (en) | Simplified two-line serial data bus transport method | |
CN113312286A (en) | Method for realizing printing head temperature detection through GPIO (general purpose input/output) simulation i2c protocol | |
KR100607943B1 (en) | Apparatus and method for bus interface for optical module | |
CN107015935B (en) | Docking apparatus and control method thereof | |
US8161216B2 (en) | Interface transmission device and method | |
TWI229808B (en) | Interface conversion device for USB to VGA | |
TWI511478B (en) | Ultrasound data acquisition system, and method and ultrasound receiving device | |
KR101490823B1 (en) | Apparatus of universal inter-integrated circuit interface for controlling devices using fpga and communication method for using the same | |
JP4431768B2 (en) | Portable electronic device, reading method and writing method | |
CN208969663U (en) | Electric terminal | |
US20050154807A1 (en) | Converting module for connecting a memory card to a projector | |
CN221259955U (en) | Intelligent cabin core board detection system | |
JP6193810B2 (en) | Host-side transmission / reception device and transmission / reception system | |
CN210324158U (en) | Ink screen reading equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |