A low-cost loosely coupled bus control network method based on software implementation of UART-TTL

By implementing a low-cost, loosely coupled bus control network for UART-TTL through software, the communication challenges of multi-node, long-distance microcontrollers are solved. This enables flexibility in variable addressing and data transmission, reduces resource overhead, and improves system stability and efficiency.

CN118018350BActive Publication Date: 2024-10-18GUANGDONG LEGEND COMM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410164644.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-05
Publication Date
2024-10-18
Estimated Expiration
2044-02-05

AI Technical Summary

Technical Problem

In existing technologies, multi-node long-distance microcontrollers lack simple and easy-to-use stable communication methods, especially for low-computing-power devices and resource-constrained end-side devices, where fixed addressing leads to additional resource overhead.

Method used

A low-cost, loosely coupled bus control network method for UART-TTL is implemented in software. By pre-configuring the bus physical layer architecture, using variable-length addressing and codecs, supporting broadcast addresses and device groups, implementing address type svint_t, performing CRC8 checksum, and performing transmission error and collision packet detection.

Benefits of technology

It realizes a hardware-independent, single-wire, low-speed, long-distance bus system, solves the resource overhead caused by fixed addressing, and provides flexible address allocation and reliable data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118018350B_ABST
    Figure CN118018350B_ABST
Patent Text Reader

Abstract

The present invention specifically relates to a method for a low-cost loosely coupled bus control network of UART-TTL implemented by software, including the steps of pre-configuring the bus physical layer architecture; then configuring all nodes to receive all data packets on the bus, creating broadcast addresses and device groups and supporting implementation through negative addresses; creating a codec, enabling short address bytes when the address is low, and increasing the address length when allocating higher addresses; defining the address type as a svint_t non-compiler type; the decoder works to obtain the svint source address and destination address, the encoder performs CRC8 check on the payload group package and passes it to the svint_t destination address; the destination address receives the data packet. The present invention provides a method for a low-cost loosely coupled bus control network of UART-TTL implemented by software, realizing a single-conductor medium-low-speed long-distance bus system that is independent of hardware devices, realizing variable address addressing, and solving the resource overhead caused by fixed addressing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of communication, and in particular relates to a low-cost loosely coupled bus control network method for realizing UART-TTL by software. Background Art

[0002] With the advent of the era of the Internet of Everything, the basic bus (Bus) is a public communication trunk for transmitting information between various functional components of a computer. It is a transmission harness composed of wires. According to the type of information transmitted by the computer, the computer bus can be divided into a data bus, an address bus and a control bus, which are used to transmit data, data addresses and control signals respectively.

[0003] For long-distance microcontrollers with multiple nodes, there is no simple, easy-to-use, stable bus. Computers / servers / gateways and other MPU / CPUs and microcontrollers lack a simple and effective way to communicate on medium and low-speed buses. And for low-computing devices and resource-constrained end-side devices, solve the additional resource overhead caused by fixed addressing. For fixed addressing, if we choose int8_t, each data packet has only two bytes of overhead when addressing, but only 128 groups of 1 broadcast and 127 device addresses are available. If we choose int32_t, each data packet has 8 bytes of overhead, but the address can be grouped into 2_147_483_648, one broadcast and 2_147_483_647 device addresses, which shows that fixed addressing needs to be improved. Summary of the invention

[0004] The object of the present invention is to provide a low-cost loosely coupled bus control network method for realizing UART-TTL by software, so as to solve the problems raised in the above background technology.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0006] A low-cost loosely coupled bus control network method for implementing UART-TTL by software includes the steps of pre-configuring the bus physical layer architecture;

[0007] Then configure all nodes to receive all data packets on the bus, create broadcast addresses and device groups, and support implementation through negative addresses;

[0008] Instead of using fixed addressing, implement a variable length addressing;

[0009] Create a codec that enables short address bytes when the address is low and increases the address length when assigning higher addresses;

[0010] Define the address type as svint_t non-compiler type;

[0011] The decoder obtains the svint source address and destination address, and the encoder performs CRC8 check on the payload group and passes it to the svint_t destination address; the destination address receives the data packet.

[0012] Furthermore, pre-configuring the bus physical layer architecture includes configuring the bus data line to consist of a wire pulled to the bus Vcc voltage, and this wire can be used as a pull-down resistor for any node that transmits data; implementing a level driver in the bus driver circuit so that the bytes sent on the TX port are transmitted to the bus Bus_data line, and then converted into the logic level of the target controller and transmitted to the RX port; the target controller RX port receives the data packet and can also perform transmission error and collision packet detection.

[0013] Furthermore, a broadcast address is created with 0 as the broadcast address.

[0014] Furthermore, fixed addressing is not used, that is, fixed int(8,16,32,64)_t is not used for addressing.

[0015] Furthermore, the lower address is specifically an address between -64 and +63.

[0016] Further, it is passed to the svint_t destination address, which includes the broadcast group and the device group.

[0017] Beneficial Effects

[0018] The present invention provides a low-cost loosely coupled bus control network for realizing UART-TTL by software, realizes a single-wire medium-low speed long-distance bus system that is independent of hardware devices, realizes variable addressing, and solves the resource extra overhead caused by fixed addressing. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a diagram of the bus physical layer architecture involved in the present invention.

[0020] Figure 2 The present invention is a schematic diagram of a bus driving circuit.

[0021] Figure 3 This is a data table diagram of the codec address correspondence relationship of the present invention.

[0022] Figure 4 This is a structural diagram corresponding to a single byte address of the codec of the present invention.

[0023] Figure 5 This is a structural diagram corresponding to two byte addresses of the codec of the present invention. DETAILED DESCRIPTION

[0024] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0025] Pre-configured bus physical layer architecture: Figure 1 and Figure 2 The physical layer architecture of the bus is introduced; the bus data line consists of a wire pulled to the bus Vcc voltage, and this wire can be used as a pull-down resistor for any node that transmits data; the traditional UART consists of two point-to-point lines RXTX, and a simple level driver is implemented in the bus driver circuit, which enables the bytes sent on the TX port to be transmitted to the bus Bus_data line, and then converted into the logic level of the target controller and transmitted to the RX port; the target controller RX port receives the data packet, and compared to UART, it can perform transmission error and collision packet detection; this completes the transmission of the bus physical layer and data link layer.

[0026] The software implements a low-cost loosely coupled bus control network method of UART-TTL, including the following steps:

[0027] First, all nodes can receive all data packets on the bus, create broadcast addresses (0 is the general broadcast address) and device groups and support implementation through negative addresses; do not use fixed int(8,16,32,64)_t for addressing, implement a variable length addressing; create a codec that enables short address bytes when the address is low (between -64 and +63) and increases the address length when assigning higher addresses; Figure 4 is a single byte address, Figure 5 It is a 2-byte address. These address types are described as svint_t (signed variable int) non-compiler types. The decoder works to obtain the svint source address and destination address. The encoder performs a CRC8 check on the payload group and passes it to the svint_t destination address, which can be a broadcast group or a device group. The destination address receives the data packet and ends this process. Figure 3 , 4 ,5 variable length addressing: I, Figure 3 :E extension, the address continues to the next byte, and the address of the last byte is 0; II, S sign, integer sign, and only used in the first byte, the address conversion is set to: -(addr+1); III, An address bit.

[0028] The present invention provides a low-cost loosely coupled bus control network for realizing UART-TTL by software, realizes a single-wire medium-low speed long-distance bus system that is independent of hardware devices, realizes variable addressing, and solves the resource extra overhead caused by fixed addressing.

[0029] The embodiments that require protection in this application include:

[0030] A low-cost loosely coupled bus control network method for implementing UART-TTL by software includes the steps of pre-configuring a bus physical layer architecture;

[0031] Then configure all nodes to receive all data packets on the bus, create broadcast addresses and device groups, and support implementation through negative addresses;

[0032] Instead of using fixed addressing, implement a variable length addressing;

[0033] Create a codec that enables short address bytes when the address is low and increases the address length when assigning higher addresses;

[0034] Define the address type as svint_t non-compiler type;

[0035] The decoder obtains the svint source address and destination address, and the encoder performs CRC8 check on the payload group and passes it to the svint_t destination address; the destination address receives the data packet.

[0036] Preferably, pre-configuring the bus physical layer architecture includes configuring the bus data line to consist of a conductor pulled to the bus Vcc voltage, which conductor can be used as a pull-down resistor for any node transmitting data;

[0037] A level driver is implemented in the bus driver circuit so that the bytes sent on the TX port are transmitted to the bus Bus_data line, then converted into the logic level of the target controller and transmitted to the RX port; the target controller RX port receives the data packet and can also perform transmission error and collision packet detection.

[0038] Preferably, the broadcast address is created with 0 as the broadcast address.

[0039] Preferably, fixed addressing is not used, that is, fixed int(8,16,32,64)_t is not used for addressing.

[0040] Preferably, the address is lower, specifically an address between -64 and +63.

[0041] Preferably, it is delivered to the svint_t destination address, and the destination address includes a broadcast group and a device group.

[0042] The embodiment of the present application also provides a computer device, which may include a terminal device or a server, and the data calculation program of the aforementioned software implementing the UART-TTL low-cost loosely coupled bus control network method may be configured in the computer device. The computer device is introduced below.

[0043] If the computer device is a terminal device, the present application embodiment provides a terminal device, taking the terminal device as a mobile phone as an example:

[0044] The mobile phone includes components such as a radio frequency (RF) circuit, a memory, an input unit, a display unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a processor, and a power supply.

[0045] RF circuits can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is processed by the processor; in addition, the designed uplink data is sent to the base station. Usually, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA for short), a duplexer, etc. In addition, the RF circuit can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (GSM for short), General Packet Radio Service (GPRS for short), Code Division Multiple Access (CDMA for short), Wideband Code Division Multiple Access (WCDMA for short), Long Term Evolution (LTE for short), email, Short Messaging Service (SMS for short), etc.

[0046] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0047] The input unit can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit may include a touch panel and other input devices. The touch panel, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on or near the touch panel using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the contact coordinates, and then sends it to the processor, and can receive the command sent by the processor and execute it. In addition, the touch panel can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel, the input unit may also include other input devices. Specifically, other input devices may include but are not limited to one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, etc.

[0048] The display unit can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit may include a display panel, and optionally, the display panel may be configured in the form of a liquid crystal display (LiquidCrystal Display, LCD for short), an organic light-emitting diode (Organic Light-Emitting Diode, OLED for short), etc. Further, the touch panel may cover the display panel, and when the touch panel detects a touch operation on or near it, it is transmitted to the processor to determine the type of touch event, and then the processor provides corresponding visual output on the display panel according to the type of touch event. Although in the figure, the touch panel and the display panel are used as two independent components to realize the input and output functions of the mobile phone, in some embodiments, the touch panel and the display panel can be integrated to realize the input and output functions of the mobile phone.

[0049] The mobile phone may also include at least one sensor, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may configure the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and / or backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.

[0050] The audio circuit, speaker, and microphone can provide an audio interface between the user and the mobile phone. The audio circuit can convert the received audio data into an electrical signal and transmit it to the speaker, which converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit and converted into audio data. The audio data is then processed by the output processor and sent to, for example, another mobile phone through the RF circuit, or the audio data is output to the memory for further processing.

[0051] WiFi is a short-range wireless transmission technology. A mobile phone can help users send and receive emails, browse web pages, and access streaming media through a WiFi module, which provides users with wireless broadband Internet access. Although the WiFi module is shown in the figure, it is understandable that it is not a necessary component of the mobile phone and can be omitted as needed without changing the essence of the invention.

[0052] The processor is the control center of the mobile phone. It uses various interfaces and lines to connect the various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory, and calling data stored in the memory, so as to monitor the mobile phone as a whole. Optionally, the processor may include one or more processing units; preferably, the processor may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor.

[0053] The mobile phone also includes a power source (such as a battery) for supplying power to various components. Preferably, the power source can be logically connected to the processor through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.

[0054] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.

[0055] In this embodiment, the processor included in the terminal device also has the following functions:

[0056] The execution software implements the data calculation program of the low-cost loosely coupled bus control network method of UART-TTL.

[0057] If the computer device is a server, an embodiment of the present application also provides a server, which may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) (for example, one or more processors) and memories, and one or more storage media for storing applications or data (for example, one or more mass storage devices). Among them, the memory and the storage medium can be short-term storage or permanent storage. The program stored in the storage medium may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit can be configured to communicate with the storage medium and execute a series of instruction operations in the storage medium on the server.

[0058] The server may also include one or more power supplies, one or more wired or wireless network interfaces, one or more input and output interfaces, and / or one or more operating systems, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0059] In addition, an embodiment of the present application further provides a storage medium, wherein the storage medium is used to store a computer program, and the computer program is used to execute the method provided in the above embodiment.

[0060] The embodiments of the present application also provide a computer program product including instructions, which, when executed on a computer, enables the computer to execute the method provided in the above embodiments.

[0061] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium can be at least one of the following media: read-only memory (English: Read-only Memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc. Various media that can store program codes.

[0062] Therefore, the present application also discloses a low-cost loosely coupled bus control network system of UART-TTL implemented by software, including a computer program product of instructions, which, when run on a computer, enables the computer to execute the above software to implement the low-cost loosely coupled bus control network method of UART-TTL.

[0063] It should be noted that each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

Claims

1. A low-cost loosely coupled bus control network method for UART-TTL implemented by software, characterized in that: The steps include pre-configuring the bus physical layer architecture; Then configure all nodes to receive all data packets on the bus, create broadcast addresses and device groups, and support implementation through negative addresses; Instead of using fixed addressing, implement a variable length addressing; Create a codec that enables short address bytes when the address is low and increases the address length when assigning higher addresses; Define the address type as svint_t non-compiler type; The decoder works to obtain the svint source address and destination address, and the encoder performs CRC8 verification on the payload group package and passes it to the svint_t destination address; The destination address receives the data packet; pre-configure the bus physical layer architecture including configuring the bus data line to consist of a wire pulled to the bus Vcc voltage, which can be used as a pull-down resistor for any node that transmits data; implement a level driver in the bus driver circuit so that the bytes sent on the TX port are transmitted to the bus Bus_data line, and then converted into the logic level of the target controller and transmitted to the RX port; the target controller RX port receives the data packet and can also perform transmission error and collision packet detection; create a broadcast address with 0 as the broadcast address; do not use fixed addressing, that is, do not use fixed int(8,16,32,64)_t for addressing; the address is lower, specifically the address is between -64 and +63; pass to svint_t destination address, the destination address includes broadcast group and device group.

Citation Information

Patent Citations

  • Tiny-net construction method based on tiny-net protocol

    CN106211184A