CN202150110U - Multi-serial-port multi-path time division multiplexing serial communication device based on singlechip microcomputer - Google Patents

Multi-serial-port multi-path time division multiplexing serial communication device based on singlechip microcomputer Download PDF

Info

Publication number
CN202150110U
CN202150110U CN 201120184906 CN201120184906U CN202150110U CN 202150110 U CN202150110 U CN 202150110U CN 201120184906 CN201120184906 CN 201120184906 CN 201120184906 U CN201120184906 U CN 201120184906U CN 202150110 U CN202150110 U CN 202150110U
Authority
CN
China
Prior art keywords
serial
sio
serial communication
serial ports
port
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.)
Expired - Fee Related
Application number
CN 201120184906
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.)
Anhui Polytechnic University
Original Assignee
Anhui Polytechnic University
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 Anhui Polytechnic University filed Critical Anhui Polytechnic University
Priority to CN 201120184906 priority Critical patent/CN202150110U/en
Application granted granted Critical
Publication of CN202150110U publication Critical patent/CN202150110U/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

The utility model relates to a multi-serial-port multi-path time division multiplexing serial communication device based on a singlechip microcomputer, which comprises a serial port level converting circuit unit and a multi-serial-port multi-path time division multiplexing circuit unit. The multi-serial-port multi-path time division multiplexing circuit unit comprises a programmable logic array device and a chip. The programmable logic array device selects one serial communication port on the singlechip microcomputer. The serial port is handed to different sets of equipment through selecting different chips, and simultaneously input/output state of the chip is determined. Compared with the prior art, the multi-serial-port multi-path time division multiplexing serial communication device based on the singlechip microcomputer has the following functions: adding number of serial communication equipment, improving control flexibility to the serial communication equipment, saving hardware cost of a communication port expansion module, improving serial communication efficiency and utilization rate for the resource of the singlechip microcomputer.

Description

A kind of SCM Based many serial ports multichannel time-sharing multiplex serial communication apparatus
Technical field
The utility model relates to the electrical engineering apparatus field, relates in particular to a kind of SCM Based many serial ports multichannel time-sharing multiplex serial communication apparatus.
Background technology
At present, most of programmable logic controller (PLC)s have only a maximum dual serial communication interface, and when a lot of system design; Many equipment utilize serial ports transmission data; The serial ports quantity of these programmable logic controller (PLC)s just can't satisfy system's needs like this, if increase the quantity of programmable logic controller (PLC), has so not only increased the cost of system design; And the internal resource of programmable logic controller (PLC) can not get sufficient utilization, causes the wasting of resources.
Compare with similar technology; Like Chinese invention patent: a kind of serial communication interface time sharing multiplex device based on programmable logic controller (PLC); Application number 201010210262.2, this patent are that a RS-232C interface of a programmable logic controller (PLC) of a kind of usefulness (PLC) connects two or more a kind of serial communication interface time sharing multiplex devices based on programmable logic controller (PLC) that carry out the equipment of communication through the RS-232C interface simultaneously.RS-232C interface on the programmable logic controller (PLC) in the device is connected with the RS-232C interface of a RS485/RS232C converter earlier; Two RS485/RS232C converters of the RS485 interface of the one RS485/RS232C converter parallel connection, two RS485/RS232C converters join with the different external equipments with the programmable logic controller (PLC) communication respectively with normally closed contact through the normally opened contact of relay.This patent has realized that an interface of programmable logic controller (PLC) connects two or more equipment that carry out communication through the RS-232C interface simultaneously; Make the internal resource of programmable logic controller (PLC) obtain utilizing more fully; Yet the number of devices of its serializable communication is still more limited; The dirigibility of serial communication device control is not good enough, and the efficient of the serial communication especially utilization factor of mcu resource is still lower.
The utility model content
The purpose of the utility model be exactly for the number of devices that overcomes existing serial communication interface time sharing multiplex device serializable communication based on programmable logic controller (PLC) more limited; Deficiencies such as the dirigibility of serial communication device control is not good enough and a kind of extension serial communication amount of equipment that increases is provided; Improved the dirigibility of serial communication device control; Save the hardware cost of communication port expansion module, improved SCM Based many serial ports multichannel time-sharing multiplex serial communication apparatus of utilization factor of efficient and the mcu resource of serial communication.
The purpose of the utility model can realize through following technical scheme: a kind of SCM Based many serial ports multichannel time-sharing multiplex serial communication apparatus comprises serial ports level shifting circuit unit and many serial ports multichannel time-sharing multiplex circuit unit.
Said single-chip microcomputer is STC12C5A60S2.
Said many serial ports multichannel time-sharing multiplex circuit unit comprises programmable logic array device and chip; Said programmable logic array device is chosen or two serial communication ports on the said single-chip microcomputer; Select different chips to give different equipment serial ports through sheet, confirm the input/output state of chip simultaneously.
Said programmable logic array device is GAL20V8.
Said serial ports level shifting circuit unit comprises the MAX232 chip that the MAXIM company of RS232 level conversion produces and the RS485 chip 75LBC184 of TI company production.
Compared with prior art; The beneficial effect of the utility model is: the current port of multi-path serial that utilizes single-chip microcomputer; (GAL) is connected with the programmable logic array device, realizes the time-sharing multiplex of many serial ports through the programming programmable logic array, has two road serial ports to use simultaneously; But increased the extension serial communication amount of equipment, improved the dirigibility of serial communication device control, saved the hardware cost of communication port expansion module, improved the efficient of serial communication and the utilization factor of mcu resource.
Description of drawings
Fig. 1 is the utility model structural representation;
Fig. 2 is the circuit theory diagrams of single-chip microcomputer in the utility model.
Embodiment
Below in conjunction with accompanying drawing and specific embodiment the utility model is elaborated.
Embodiment:
As shown in Figure 1, present embodiment provides a kind of SCM Based many serial ports multichannel time-sharing multiplex serial communication apparatus, comprises serial ports level shifting circuit unit and many serial ports multichannel time-sharing multiplex circuit unit.Said many serial ports multichannel time-sharing multiplex circuit unit comprises programmable logic array device (GAL20V8).
Single-chip microcomputer described in the embodiment is STC12C5A60S2, and it includes two serial ports, through much six road RS232 of programmable logic array device time-sharing multiplex or RS485 serial line interface.U10 during the circuit theory diagrams of said single-chip microcomputer are as shown in Figure 2.
The multichannel of many serial ports described in embodiment time-sharing multiplex circuit unit comprises programmable logic array device (GAL20V8); Choose serial communication interface in two serials on the single-chip microcomputer; Through selecting four logical addresses of single-chip microcomputer output, realize the time division multiplex of serial ports through the programming programmable logic array.And, can expand more serial communication device through the more GAL of cascade; When the more programmable logic array of cascade (GAL20V8),, just can realize with the communication between more current equipment as long as increase logical address.U11 during the circuit theory diagrams of said many serial ports multichannel time-sharing multiplex circuit unit are as shown in Figure 2.
The level shifting circuit of serial ports described in embodiment unit comprises the MAX232 chip of MAXIM company production and the 75LBC184 that TI company produces; When single-chip microcomputer is connected with programmable logic array (GAL20V8); Four logical addresses through programming monolithic processor and programmable logic array; Select the different communication port of single-chip microcomputer, through MAX232 chip and outside RS232 serial equipment communicating, simultaneously through 75LBC184 chip and outside RS485 devices communicating.The selection of the transmission of RS485 and reception simultaneously is by the I/O control of single-chip microcomputer.U1, U2, U3, U4, U5, U6, U7, U8, U9 during the circuit theory diagrams of said serial ports level shifting circuit unit are as shown in Figure 2.
When the design of communications circuit, consider distance between the two, if communication distance is shorter, can utilize the RS-232C interface to prolong communication distance.Otherwise use the RS-485 interface standard, realize long haul communication and master-slave mode multi-computer communication.That adopt in the present embodiment is RS-485.
Specifically, be core with single-chip microcomputer STC12C5A60S2 in the present embodiment, this single-chip microcomputer has only 2 serial ports, can carry out the scheduling of two road serial ports simultaneously and use simultaneously.Select two road serial ports and external device communication through the sheet of logical address.Said choosing is the logical address through SIO_SEC1, SIO_SEC2, SIO_SEC3, four compositions of SIO_SEC4, realizes the time division multiplex of serial ports through programming programmable logic array (GAL).Select to go here and there slogan through the logic control of GAL, concrete steering logic is following:
Serial ports receiving end logical formula:
RXD1=/SIO_SEC4*/SIO_SEC3*/SIO_SEC2*/SIO_SEC1*RX1
+/SIO_SEC4*/SIO_SEC3*/SIO_SEC2*SIO_SEC1*RX2
+/SIO_SEC4*/SIO_SEC3*SIO_SEC2*/SIO_SEC1*RX3
+/SIO_SEC4*/SIO_SEC3*SIO_SEC2*SIO_SEC1*RX4
+/SIO_SEC4*SIO_SEC3*/SIO_SEC2*/SIO_SEC1*RX5
+/SIO_SEC4*SIO_SEC3*/SIO_SEC2*SIO_SEC1*RX6
RXD2=SIO_SEC4*/SIO_SEC3*/SIO_SEC2*/SIO_SEC1*RX1
+SIO_SEC4*/SIO_SEC3*/SIO_SEC2*SIO_SEC1*RX2
+SIO_SEC4*/SIO_SEC3*SIO_SEC2*/SIO_SEC1*RX3
+SIO_SEC4*/SIO_SEC3*SIO_SEC2*SIO_SEC1*RX4
+SIO_SEC4*SIO_SEC3*/SIO_SEC2*/SIO_SEC1*RX5
+SIO_SEC4*SIO_SEC3*/SIO_SEC2*SIO_SEC1*RX6
Serial ports transmitting terminal logical formula:
TX1=/SIO_SEC4*/SIO_SEC3*/SIO_SEC2*/SIO_SEC1*TXD1
+SIO_SEC4*/SIO_SEC3*/SIO_SEC2*/SIO_SEC1*TXD2
TX2=/SIO_SEC4*/SIO_SEC3*/SIO_SEC2*SIO_SEC1*TXD1
+SIO_SEC4*/SIO_SEC3*/SIO_SEC2*SIO_SEC1*TXD2
TX3=/SIO_SEC4*/SIO_SEC3*SIO_SEC2*/SIO_SEC1*TXD1
+SIO_SEC4*/SIO_SEC3*SIO_SEC2*/SIO_SEC1*TXD2
TX4=/SIO_SEC4*/SIO_SEC3*SIO_SEC2*SIO_SEC1*TXD1
+SIO_SEC4*/SIO_SEC3*SIO_SEC2*SIO_SEC1*TXD2
TX5=/SIO_SEC4*SIO_SEC3*/SIO_SEC2*/SIO_SEC1*TXD1
+SIO_SEC4*SIO_SEC3*/SIO_SEC2*/SIO_SEC1*TXD2
TX6=/SIO_SEC4*SIO_SEC3*/SIO_SEC2*SIO_SEC1*TXD1
+SIO_SEC4*SIO_SEC3*/SIO_SEC2*SIO_SEC1*TXD2
Realize the time division multiplex of serial ports through programming programmable logic array (GAL20V8).
GAL20V8 is the GAL device, field programmable device.It can have 20 input pins at most, at most 8 output pins can be arranged.It both can realize the logic function of combinational logic, also can realize the logic function of sequential logic.
General programmable device GAL20V8 has 8 output pins; Be denoted as IO0~IO7; I1~I10, I12 and I13 totally 12 special-purpose input pins are arranged; Other has I0/CLK and two pins of I11/OE, and when the circuit that is programmed needed clock signal and uses output permission control, time clock allowed control signal just can only import from I0/CLK and these two pins of I11/OE respectively with output; When not needing these two signals (or one), they can be used as the data input pin at (or one).IO0~IO7 also can be used for input function in some occasion, or timesharing is used for the I/O function, can be determined by the user.It has 20 inputs, 8 outputs (having at least 2 pins to be used for output) at most thus.
GAL20V8 is inner, comprises input buffering door, output feedback buffered gate, with gate array, OLMC output logic macrocell OLMC (including or array) with export triple gate etc.
To programme to general programmable device GAL20V8, need to use special-purpose Software tool and can just can in the GAL20V8 device, write needed logic function the programmable device of GAL device programming.
Design and operating process cardinal principle be as follows:
1, the source file of editor's expansion " .PLD " by name, this document are used to be described in the inner logic function that realizes of GAL20V8.This is a text, but form should meet the requirement of corresponding composing software, also can use ABEL language editor to expand the source file of " .ABL " by name, and just will have corresponding composing software to accomplish compiling could use.
2, with corresponding software the source file that has designed is compiled, to generate the fuse map file of GAL20V8, expansion " .JED " by name.
3, in the GAL20V8 device, write the content of fuse map file defined with programming device, promptly GAL20V8 is programmed.

Claims (5)

1. SCM Based many serial ports multichannel time-sharing multiplex serial communication apparatus, it is characterized in that: said SCM Based many serial ports multichannel time-sharing multiplex serial communication apparatus comprises serial ports level shifting circuit unit and many serial ports multichannel time-sharing multiplex circuit unit.
2. SCM Based many serial ports multichannel time-sharing multiplex serial communication apparatus according to claim 1, it is characterized in that: said single-chip microcomputer is STC12C5A60S2.
3. SCM Based many serial ports multichannel time-sharing multiplex serial communication apparatus according to claim 1 and 2; It is characterized in that: said many serial ports multichannel time-sharing multiplex circuit unit comprises programmable logic array device and chip; Said programmable logic array device is chosen a serial communication port on the said single-chip microcomputer; Select different chips to give different equipment serial ports through sheet, confirm the input/output state of chip simultaneously.
4. SCM Based many serial ports multichannel time-sharing multiplex serial communication apparatus according to claim 3, it is characterized in that: said programmable logic array device is GAL20V8.
5. SCM Based many serial ports multichannel time-sharing multiplex serial communication apparatus according to claim 1 and 2 is characterized in that: said serial ports level shifting circuit unit comprises the MAX232 chip of MAXIM company production and the 75LBC184 that TI company produces.
CN 201120184906 2011-06-02 2011-06-02 Multi-serial-port multi-path time division multiplexing serial communication device based on singlechip microcomputer Expired - Fee Related CN202150110U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201120184906 CN202150110U (en) 2011-06-02 2011-06-02 Multi-serial-port multi-path time division multiplexing serial communication device based on singlechip microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201120184906 CN202150110U (en) 2011-06-02 2011-06-02 Multi-serial-port multi-path time division multiplexing serial communication device based on singlechip microcomputer

Publications (1)

Publication Number Publication Date
CN202150110U true CN202150110U (en) 2012-02-22

Family

ID=45591163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201120184906 Expired - Fee Related CN202150110U (en) 2011-06-02 2011-06-02 Multi-serial-port multi-path time division multiplexing serial communication device based on singlechip microcomputer

Country Status (1)

Country Link
CN (1) CN202150110U (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365798A (en) * 2013-06-27 2013-10-23 华为技术有限公司 Serial port time sharing multiplexing method and system
CN103514136A (en) * 2012-06-27 2014-01-15 苏州工业园区新宏博通讯科技有限公司 Multi-serial port conversion device
CN103885349A (en) * 2014-03-12 2014-06-25 安徽省(水利部淮河水利委员会)水利科学研究院 Device for controlling multiplexing of communication serial ports of instrument
US9742548B2 (en) 2014-05-15 2017-08-22 Huawei Technologies Co., Ltd. Method and apparatus for using serial port in time division multiplexing manner
CN110597753A (en) * 2019-10-16 2019-12-20 广东科瑞德电气科技有限公司 Circuit with reusable communication interface

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514136A (en) * 2012-06-27 2014-01-15 苏州工业园区新宏博通讯科技有限公司 Multi-serial port conversion device
CN103365798A (en) * 2013-06-27 2013-10-23 华为技术有限公司 Serial port time sharing multiplexing method and system
CN103365798B (en) * 2013-06-27 2016-08-31 华为技术有限公司 A kind of method and system of serial ports time-sharing multiplex
CN103885349A (en) * 2014-03-12 2014-06-25 安徽省(水利部淮河水利委员会)水利科学研究院 Device for controlling multiplexing of communication serial ports of instrument
US9742548B2 (en) 2014-05-15 2017-08-22 Huawei Technologies Co., Ltd. Method and apparatus for using serial port in time division multiplexing manner
CN110597753A (en) * 2019-10-16 2019-12-20 广东科瑞德电气科技有限公司 Circuit with reusable communication interface

Similar Documents

Publication Publication Date Title
CN202150110U (en) Multi-serial-port multi-path time division multiplexing serial communication device based on singlechip microcomputer
CN101345629B (en) Double on-site bus interface converter
CN101882125A (en) Serial communication interface time sharing multiplex device based on programmable logic controller
CN107248271B (en) Multi-master station acquisition system integrating multiple meters
CN204716222U (en) Control system of rig
CN101119107B (en) Low-power consumption non-overlapping four-phase clock circuit and implementing method
CN201993743U (en) Speech control system
CN202583746U (en) Microcomputer protection measurement-control device
CN102355394A (en) Method and device for performing data transmission control for a plurality of paths of controller area network (CAN) buses
CN102158114A (en) Method and device for measuring and controlling a four-quadrant cascaded high voltage transducer power unit
CN210244135U (en) Analog signal acquisition circuit of distribution automation terminal
CN205104017U (en) System of checking meter is concentrated to intelligence
CN203387478U (en) TMS320VC5402 chip-based programmable pulse width modulation generator
CN206610124U (en) A kind of DCS system thermocouple input module
CN103490747B (en) The configurable pulse generating method of a kind of multichannel
CN207649880U (en) A kind of optical module test system of changeable circuit
CN202615601U (en) Concentrator capable of achieving multi-mode multi-channel communication in designated shell
CN105389155A (en) Method and system for receiving TDM audio data by using SPI interface
CN204928174U (en) Networking type short network reactive compensation controlling means
CN205644087U (en) Smart home monitoring system
CN202688359U (en) Converter gas network-connected recycling device
CN205070832U (en) On -off control end
CN201813395U (en) Ethernet-PROFIBUS-DP bus gateway
CN204302718U (en) A kind of enhancement mode communication control interface module
CN202587042U (en) Full-media primary-secondary type timer

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120222

Termination date: 20130602