Tutorials to .com

Tutorials to .com » Mechine » Mcu » A single-chip multi-machine communication system design

A single-chip multi-machine communication system design

Print View , by: iSee ,Total views: 28 ,Word Count: 2282 ,Date: Thu, 20 Aug 2009 Time: 10:01 AM

1 Introduction

With the mcu and the continuous development of computer technology, the application of single-chip from an independent stand-alone to network development, from single-chip computer and network consisting of multi-machine systems have become a single-chip technology development direction. Combination of the two, give full play to the MCU in real-time data acquisition and data management advantages. Single-chip in the computer network communication and data transmission, industrial automation, real-time process control and data processing are widely used, has penetrated into all areas of our lives. Many applications are related to the single-chip multi-machine communication. However, single-chip data on the network approach is different from the common computer system, in particular, have only single-chip 8-bit interface to send and receive data, which to some extent hindered the single-chip applications in the network. Therefore, the use of single-chip technology and computer network technology to combine the methods of single-chip multi-machine communication systems research, in the design of single-chip network communication protocol, based on the network using bus-based topology, network interface circuit using the form of port forwarding, to achieve the 8-bit single-chip multi-machine communication.

2 system Design of Network Protocol

The development of network capacity for 1 server and 62 clients, between the client can communicate with each other. Client and server can also communicate with each other. Reference to the agreement designed to stop waiting for agreement packets into IP packets designed. After a comprehensive analysis and optimization of processing, the development of the following single-chip multi-communication protocol.

(1) server agreement

① server according to 1 / 384 of the interval to send inquiry packet;

② asked whether the current address plus 1, to determine if more than 63 asked whether the current home address is 1, if less than a home address is asked whether the current 62, to the next step;

③ asked to address the current machine asked to send a packet;

④ Send to wait for a time interval;

⑤ If you do not receive a confirmation packet is a packet to the current re-issued, re-issued counter 1, counter is greater than 2 shift ⑥; If you receive a confirmation packet to ⑦;

⑥ set to send the failure tag, re-made Counter-ching 0, go to ②;

⑦ settings sent successfully marked, re-made Counter-ching 0, go to ⑧;

⑧ view client was asked whether there is data to send, there is the allocation of bus time and the right to use the film to ⑨, otherwise go to ②;

⑨ client waiting to be asked to send the end of the packet, if and when we receive go to ②. In a time slice (1/384s), the have not received as overtime. Bus service to recover the right to use the machine, go to ②.

(2) the client agreement

① is the machine to receive data packets;

② If the packet is asked to check whether the local data to send and, if so, then send "data send a message" to the server, and incidentally confirmed to ③, or to send "no data send a message" to the server, and incidentally confirmed to ①; other types do not deal with packets, go to ①;

Waiting for the allocation of network resources ③ packets sent to confirm receipt of the package, go to ⑤; time to stop waiting to go ①;

④ packets waiting for a confirmation of receipt is to ⑤, otherwise go to ⑦;

⑤ to check whether there are data to send, it will send data packets to ⑥; would send "the end send a message" to the server, go to ①.

⑥ check overtime, if overtime sent to the end of ①, otherwise go to ④.

⑦ re-issued, whether or not more than two, is to send the current failure to ⑤, otherwise go to ④.

Therefore, each packet will be issued a confirmation of the request of the other side, if there is no confirmation, it will once again, more than two were considered not up to the other side, sending a failure; and be asked to send the client data, if free bus service will be allocated the use of machine time for films, film at this time, if the data did not send completed, services will be forced to recover the machine. Can send completed and the end customers to send confidential data packets, the right to use the return bus.

3 System Design of Network Topology

Optional bus-type network topology, the direct link in the bus station, the unified management by the server network bus, the allocation of network resources. Token Bus network use is similar to the agreement, each polling by the server whether the client has data to send, if the distribution of delivery time, the transfer of bus use right, or else asked about the next client; which will be the interface circuit relay signals received and transmitted. Therefore the network on any machine by sending data to other machines are visible, and to some extent to ensure the reliability of the signal.

Network topology design is shown below:

A single-chip multi-machine communication system design

Figure 1 System design of network topology

4, the functions of network interface circuits and design

(1) the functions of network interface circuits

Network interface circuit to complete the main functions are as follows: ① the completion of the receiving network element; ② docking received data element transmitted to other ports; ③ mechanism for multi-port, port forwarding each other; ④ submit the data elements received; ⑤ Relay received data element; ⑥ signal to provide network status; ⑦ isomorphism between the ports, the use of cross-line.

(2) Network Interface Circuit Design

To achieve these functional requirements, the design of network interface circuit used a total of four 74HC245 chips to send and receive data, share the work, each of which corresponds to a chip of a port. Outstanding performance for the three ports, it is because there is a port occupied by the machine, the circuit has been arranged in the circuit board. Cross the line between the port connections, when the detected signal received online, the chip started work, the signal is divided into three-way relay out, distributed to single-chip all the way, the other two sent to the other two ports . Resumption of land in the receiver line, if the same signal is detected, then the same operation. When the single-chip to send data to the outside world, on the start corresponds to the single-chip transceiver port on the chip, after relaying the signal sent to the other three ports, and at any time-up signal detection of changes, once the detected level down from the high-low signal changes in time, that is, the data illustrate the need to receive, after receiving an interrupt signal will have to start dealing with procedures.

Network interface circuit in the state of the design of the network signal BUS, when the chip did not work, that there is no data transmission network, when BUS taken by the non-gate circuit into a low-level anti-, and single-chip interrupt pin on the 2nd connected to this pin single chip can hold up the network, and sending data packets.

Network interface circuit design of the indicators also signal when the received data signals when they buy high and then take in the signal on the LED will be light-emitting LED to indicate receipt of data.

5 Electrical and client service road design

System in the client and server in two different circuits. The way customers and services mechanical and electrical integration of mechanical and electrical path in a circuit board, that is, the two circuits with the same performance out of a piece of circuit board.

For clients, customers do not need to control the circuit, but addressing their needs, hence, the need to address access circuit.

For servers, it does not need addressing, unity is fixed at 65 the address, so do not need to address access to this part of the circuit. Server across the network responsible for the supervision of the work with the poll.

Other circuits and services the client machines have the same configuration, so do not need to do any changes.

Circuit board, not to plug the device to achieve two different circuit configuration in the same circuit board to achieve greatly reduce development costs.

Figure 6, the system function modules

(1) system: the server part of

① Network poll completed every certain period of time machine to the network packets sent inquiry.

② read ADC data, shows the current ambient temperature

③ a transfer control valve, the data show that the electrical point of view

④ scanning the keyboard, providing key control

⑤ collected from the network information transfer valve, open the smart fan control

⑥ lighting control circuit of the open laboratory, Guan

⑦ able to take over the network on any client

Client part

① receive the polling server, send a confirmation packet

② read ADC data, shows the current ambient temperature

③ a transfer control valve, the data show that the electrical point of view

④ scanning the keyboard, providing key control

⑤ Read Local Address

⑥ receive operation from the management server

(2) functional:

software system is modular way, each device driver to prepare a. Driver is responsible for driving the equipment under their control. Provide interfaces to other programs, other programs to facilitate call control equipment.

Various drive functions as follows:

① LED driver: Driver data display, data show that the prescribed manner.

② the keyboard driver: Dynamic scanning keyboard, identification keys, and the circuit to avoid glitches.

③ buzzer driver: the designated driver means an audible buzzer.

④ ADC Driver: Read ADC data and converted to temperature values.

⑤ serial driver: send and receive data packets, filtering data packets of non-local

There is also a poll module which, it's driven by the clock by a certain time interval to the network to send each client asked packets. If the two did not receive any response, then send the packet as a failure. And be able to take over the management of the client to send packets. Also need to recognize, is regarded as a failure of more than two.

System module diagram as shown in Figure 2.

A single-chip multi-machine communication system design

Figure 2 System Function Block Diagram

By the map, we can see that all drivers are linked in the clock interrupt, the interrupt from the clock frequency of calls by some of these drivers.

7 Summary

System Design of a Web-based control and management control systems. It will drive network technology and computer technology for single-chip integration, network protocol design of computer network protocols and to stop waiting for TCP / IP protocol, but in order to better adapt to the single-chip processing to optimize the packet formats and control has greatly enhanced processing speed and efficiency. At the same time, the introduction of frame detection sequence, the provision of packet detection mechanism to enhance the reliability of the network. System network topology using bus-based, network interface circuit in the form of port forwarding, easy to expand and improve the stability. This system design can be a full-featured control of the network through the server all the clients to monitor the operation of all clients; system is simple, with a certain level of economic significance and practical value.

References

[1] (United States) Christa Anderson.Mark Minasi.Mastering Local Area Networks [M]. Press Sybex, 1999.

[2] Jiang An.. analog electronic technology [M]. Xidian University Press, 2002.

[3]. Yang LIN. Zhang Arran. Circuit Analysis [M]. Xi'an University of Electronic Science and Technology Press, 2001.

[4] Barry B.Brey.Programming the 80286,80386,80486, and Pentium-Based Personal Computer [M]. Publishing House of Electronics Industry, 1998.

[5] Tang Ying. Chol wind screen. Xiaodan Tang. Computer operating system [M]. Xidian University Press, 1996.

[6] Jiang An... digital Electronic Technology [M]. Xidian University Press, 2002.

[7]. The principle of micro-computer systems and applications [M]. Tsinghua University Press, 1998.

[8] Lin Xuemei. PENG Jia-hong.. Single-chip multi-communication protocol design [J]. Micro-computer information ,2006.2-2:24-26

[9] Zhang Lu. Smart card operating system storage management design [J]. Micro-computer information ,2005,8-3:18-19


Micro Controller Unit Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.