CN102193893A - Serial port 232/422 signal output switching method - Google Patents

Serial port 232/422 signal output switching method Download PDF

Info

Publication number
CN102193893A
CN102193893A CN201110139412XA CN201110139412A CN102193893A CN 102193893 A CN102193893 A CN 102193893A CN 201110139412X A CN201110139412X A CN 201110139412XA CN 201110139412 A CN201110139412 A CN 201110139412A CN 102193893 A CN102193893 A CN 102193893A
Authority
CN
China
Prior art keywords
signal
output
control
serial ports
interface function
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
CN201110139412XA
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.)
Shandong Chaoyue Numerical Control Electronics Co Ltd
Original Assignee
Shandong Chaoyue Numerical Control Electronics Co Ltd
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 Shandong Chaoyue Numerical Control Electronics Co Ltd filed Critical Shandong Chaoyue Numerical Control Electronics Co Ltd
Priority to CN201110139412XA priority Critical patent/CN102193893A/en
Publication of CN102193893A publication Critical patent/CN102193893A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The invention provides a serial port 232/422 signal output switching method. The serial port 232/422 signal output switching method comprises the following steps of: jointing interface functions A and B which are formed on upper computer software with corresponding commands in a singlechip program; controlling output states of corresponding pin signals by using the commands of the singlechip program and controlling switching of a peripheral logic circuit so as to realize different processes on a standard signal output from the serial port; and finally realizing switching between an RS232 signal and an RS422 signal which are output from the serial port. Compared with the prior art, the method has a simple operation; and corresponding switching operation can be realized by simply clicking a mouse by calling control under an operating system instead of powering off a host and dismantling a chassis.

Description

A kind of serial ports 232/422 signal output switching method
 
Technical field
The present invention relates to that RS232, RS422 communications protocol, single-chip microcomputer use, C programmer is write, circuit board principle design and fabric swatch, mainly be applied to computing machine, communication and association area, specifically a kind of serial ports 232/422 signal output switching method.
Background technology
Present conventional mainboard is externally exported rs 232 serial interface signal will realize that the blocked operation of exporting between 232 signals and output 422 signals is more loaded down with trivial details, needs to divide following several steps to carry out usually:
1) host computer is carried out power operation, take cabinet apart;
2), on mainboard, find the respective patch cord group, manual operation jumper cap, short circuit respective patch cord signal according to motherboard manual;
3) re-power to mainboard, whether the checking operation of doing is correct, recovers computer housing.
Summary of the invention
The purpose of this invention is to provide a kind of serial ports 232/422 signal output switching method.Under X86 framework operating system, need not outage and dismounting mainframe box, in mainboard (host computer) normal operating conditions, realize the quick switching between mainboard serial ports output RS232 signal and the RS422 signal.
The objective of the invention is to realize in the following manner, adopt being used of upper computer software, single-chip microcomputer and logical circuit, the hardware and software combination, utilize upper computer software to form different interface functions, with each interface function respectively with Single Chip Microcomputer (SCM) program in the corresponding command be connected mutually, utilize the order of Single Chip Microcomputer (SCM) program to control the output state of its respective pins signal, then control the peripheral logical circuit conversion, realization is carried out different processing to serial ports outputting standard signal, finally realizes the conversion between serial ports output RS232 and the RS422 signal.
Control procedure is divided foregrounding and consistency operation two parts, wherein:
Foregrounding: under Windwos operating system, call interface function;
Consistency operation: interface function control single chip computer program → Single Chip Microcomputer (SCM) program control single chip computer respective pins signal output state → single-chip microcomputer leg signal output state control peripheral circuit logical channel selection → different logical channel is carried out different processing → serial ports output RS232 signal or RS422 signal to serial ports outputting standard signal, and step is as follows:
Serial port of mainboard outputting standard rs 232 serial interface signal TXD2, RXD2, if this conversion of signals will be become the output of RS232 signal, then under Windows operating system, call interface function A, interface function A utilizes TXD3, RXD3 serial ports passage, its command information is passed to the Single Chip Microcomputer (SCM) program of single-chip microcomputer PCI16F87XA inside, the single-chip microcomputer internal processes takes orders, and make corresponding control action: control its output pin " 13 " CONTROL2 and be low level state output for " 0 ", be connected to the GATE control pin of N-channel MOS pipe MMBT3904 because of the CONTROL2 signal, therefore this metal-oxide-semiconductor presents " disconnection " state, therefore the TQ2-5V relay presents the not state of nature of energising, the standard TXD2 of final serial port of mainboard output, the RXD2 signal is the RS232 signal condition through the treatment conversion of MAX211E chip;
In the time above-mentioned serial ports will being converted to the output of RS422 signal, only need under Windows operating system, to call interface function B, the same control single chip computer program of this interface function B, then the output high level state that changes its pin " 13 " CONTROL2 is " 1 ", follow-up " CONTROL2 " signal of high level state that presents is with conducting metal-oxide-semiconductor MMBT3904, the TQ2-5V relay is closed because of powering on, the standard TXD2 of serial ports output, RXD2 signal be from another logical channel output, and be the RS422 signal condition by the treatment conversion of LTC485 chip.
The beneficial effects of the utility model are:
1) simple to operate, need not main frame outage and dismounting cabinet, only need under operating system, to call control, the simple click mouse just can be realized corresponding blocked operation;
2) switch rapidly, whole process only needed just can finish in 2~3 seconds, and the whole process of old-fashioned switching needs the time of 15~20min approximately, and user's time has been saved in new-type switching greatly;
3) operation is reliable, and the maloperation possibility that can effectively avoid manual switchover to exist has been protected electricity piece to greatest extent.
Description of drawings
Fig. 1 is the single chip machine controlling circuit schematic diagram;
Fig. 2 is a RS232/RS422 signal switching circuit schematic diagram;
Fig. 3 is the serial ports voltage transitions chip circuit schematic diagram after the RS232 signal switches;
Fig. 4 is a RS232/RS422 voltage commutation circuit schematic diagram.
Embodiment
Explain below with reference to Figure of description method of the present invention being done.
Serial ports 232/422 signal output switching method of the present invention, control procedure is divided foregrounding and consistency operation two parts, wherein:
Foregrounding: under Windwos operating system, call interface function;
Consistency operation: interface function control single chip computer program → Single Chip Microcomputer (SCM) program control single chip computer respective pins signal output state → single-chip microcomputer leg signal output state control peripheral circuit logical channel selection → different logical channel is carried out different processing → serial ports output RS232 signal or RS422 signal to serial ports outputting standard signal, 1~3 is specifically described in conjunction with the accompanying drawings
Serial port of mainboard outputting standard rs 232 serial interface signal TXD2, RXD2, if we want this conversion of signals is become the output of RS232 signal, then under Windows operating system, call interface function A, interface function A utilizes TXD3, RXD3 serial ports passage (information interaction passage between single-chip microcomputer and the mainboard) passes to its command information the Single Chip Microcomputer (SCM) program of single-chip microcomputer PCI16F87XA inside, the single-chip microcomputer internal processes takes orders, and make corresponding control action: control its output pin " 13 " and (CONTROL2) export for " 0 " (low level) state, be connected to the GATE control pin of N-channel MOS pipe MMBT3904 because of the CONTROL2 signal, therefore this metal-oxide-semiconductor presents " disconnection " state, therefore the TQ2-5V relay presents state of nature (not energising), the standard TXD2 of final serial port of mainboard output, the RXD2 signal is the RS232 signal condition through the treatment conversion of MAX211E chip.
When we want above-mentioned serial ports is converted to RS422 signal when output, only need under Windows operating system, to call interface function B, the same control single chip computer program of this interface function control, then changing its pin " 13 " output state (CONTROL2) is " 1 " (high level), follow-up " CONTROL2 " signal of high level state that presents is with conducting metal-oxide-semiconductor MMBT3904, the TQ2-5V relay is closed because of powering on, the standard TXD2 of serial ports output, RXD2 signal be from another logical channel output, and be the RS422 signal condition by the treatment conversion of LTC485 chip.
When we think once more above-mentioned serial ports to be converted to the output of RS232 signal, only need calling interface function A once more, specific implementation process front is by the agency of, repeats no more here.
For avoiding MAX211 chip and LTC485 chip to influence each other, we also control the input voltage of two kinds of chips in the control signal conversion, for keep and signal switches synchronously, the realization of " CONTROL2 " signal is also used in the switching of voltage, the specific implementation circuit is seen accompanying drawing 4 explanations.
If switch to the RS422 signal, this circuit can be realized the conversion process between standard serial port signal to 422 signal simultaneously, if switch to the RS232 signal, then need utilize accompanying drawing 3 circuit to realize the conversion process of standard serial port signal to 232 signal.

Claims (1)

1. serial ports 232/422 signal output switching method, it is characterized in that utilizing the interface function A and the B of upper computer software formation, with each interface function respectively with Single Chip Microcomputer (SCM) program in the corresponding command be connected mutually, utilize the order of Single Chip Microcomputer (SCM) program to control the output state of its respective pins signal, then control the peripheral logical circuit conversion, realization is carried out different processing to serial ports outputting standard signal, finally realizes the conversion between serial ports output RS232 and the RS422 signal;
Control procedure is divided foregrounding and consistency operation two parts, wherein:
Foregrounding: under Windwos operating system, call interface function;
Consistency operation: interface function control single chip computer program → Single Chip Microcomputer (SCM) program control single chip computer respective pins signal output state → single-chip microcomputer leg signal output state control peripheral circuit logical channel selection → different logical channel is carried out different processing → serial ports output RS232 signal or RS422 signal to serial ports outputting standard signal, and step is as follows:
Serial port of mainboard outputting standard rs 232 serial interface signal TXD2, RXD2, if this conversion of signals will be become the output of RS232 signal, then under Windows operating system, call interface function A, interface function A utilizes TXD3, RXD3 serial ports passage, its command information is passed to the Single Chip Microcomputer (SCM) program of single-chip microcomputer PCI16F87XA inside, the single-chip microcomputer internal processes takes orders, and make corresponding control action: control its output pin " 13 " CONTROL2 and be low level state output for " 0 ", be connected to the GATE control pin of N-channel MOS pipe MMBT3904 because of the CONTROL2 signal, therefore this metal-oxide-semiconductor presents " disconnection " state, therefore the TQ2-5V relay presents the not state of nature of energising, the standard TXD2 of final serial port of mainboard output, the RXD2 signal is the RS232 signal condition through the treatment conversion of MAX211E chip;
In the time above-mentioned serial ports will being converted to the output of RS422 signal, only need under Windows operating system, to call interface function B, the same control single chip computer program of this interface function B, then the output high level state that changes its pin " 13 " CONTROL2 is " 1 ", follow-up " CONTROL2 " signal of high level state that presents is with conducting metal-oxide-semiconductor MMBT3904, the TQ2-5V relay is closed because of powering on, the standard TXD2 of serial ports output, RXD2 signal be from another logical channel output, and be the RS422 signal condition by the treatment conversion of LTC485 chip.
CN201110139412XA 2011-05-27 2011-05-27 Serial port 232/422 signal output switching method Pending CN102193893A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110139412XA CN102193893A (en) 2011-05-27 2011-05-27 Serial port 232/422 signal output switching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110139412XA CN102193893A (en) 2011-05-27 2011-05-27 Serial port 232/422 signal output switching method

Publications (1)

Publication Number Publication Date
CN102193893A true CN102193893A (en) 2011-09-21

Family

ID=44601983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110139412XA Pending CN102193893A (en) 2011-05-27 2011-05-27 Serial port 232/422 signal output switching method

Country Status (1)

Country Link
CN (1) CN102193893A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106814214A (en) * 2015-11-30 2017-06-09 江苏中海达海洋信息技术有限公司 A kind of new A DCP digital adaptation custom systems
CN110008167A (en) * 2019-03-26 2019-07-12 山东超越数控电子股份有限公司 A kind of method of adjust automatically serial ports output mode
CN110378155A (en) * 2019-06-25 2019-10-25 苏州浪潮智能科技有限公司 A kind of server serial port disabling protection circuit, method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03251902A (en) * 1990-03-01 1991-11-11 Fuji Electric Co Ltd Programming device for programmable controller
JPH0720969A (en) * 1993-06-30 1995-01-24 Nippon Systecs:Kk On-line data input and output switching device utilizing personal computer
CN1975703A (en) * 2005-11-28 2007-06-06 Smk株式会社 Data input terminal device
CN201072550Y (en) * 2007-09-03 2008-06-11 青岛海信电器股份有限公司 Selection circuit suitable for duplex data transmission interface

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03251902A (en) * 1990-03-01 1991-11-11 Fuji Electric Co Ltd Programming device for programmable controller
JPH0720969A (en) * 1993-06-30 1995-01-24 Nippon Systecs:Kk On-line data input and output switching device utilizing personal computer
CN1975703A (en) * 2005-11-28 2007-06-06 Smk株式会社 Data input terminal device
CN201072550Y (en) * 2007-09-03 2008-06-11 青岛海信电器股份有限公司 Selection circuit suitable for duplex data transmission interface

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106814214A (en) * 2015-11-30 2017-06-09 江苏中海达海洋信息技术有限公司 A kind of new A DCP digital adaptation custom systems
CN110008167A (en) * 2019-03-26 2019-07-12 山东超越数控电子股份有限公司 A kind of method of adjust automatically serial ports output mode
CN110378155A (en) * 2019-06-25 2019-10-25 苏州浪潮智能科技有限公司 A kind of server serial port disabling protection circuit, method
CN110378155B (en) * 2019-06-25 2021-06-29 苏州浪潮智能科技有限公司 Server serial port forbidding protection circuit and method

Similar Documents

Publication Publication Date Title
CN102193893A (en) Serial port 232/422 signal output switching method
CN101826753A (en) Dual-power conversion intelligent controller
CN108153626B (en) USB, serial port multiplexing and safety isolation system
CN103064477B (en) Method for designing server motherboard
CN103605328A (en) STC single chip microcomputer-based embedded programmable logic controller (PLC) industrial control board
CN105468549A (en) Chip device and electronic system thereof
CN202720638U (en) Serial conversion circuit
CN204360371U (en) A kind of USBKey
CN203799367U (en) Virtual terminal control system
CN201159862Y (en) Computer main unit supporting independent start of multiple hard disks
CN208985150U (en) Increase the PCIE Riser card of warm connection function for mainboard
CN208596339U (en) A kind of double mainboard computers
CN102314209B (en) Control circuit of mainboard power supply
CN204203665U (en) Electronic equipment
CN111037057A (en) Welder human-computer interaction system and welder
CN111290988A (en) BMC daughter card module based on domestic MCU
CN206833587U (en) A kind of touch screen POS terminal PIN data protection circuit
CN210442665U (en) Power supply device adopting circuit mutual exclusion control
CN205721216U (en) A kind of control the control circuit of service card iic bus buffer in card insert type equipment
CN104317449B (en) The display of touch display one with Redundancy Design
CN105786740B (en) A kind of USBKey
CN203644017U (en) CPU (central processing unit) starting state switching control circuit
CN208922081U (en) A kind of programmable 8051 one-chip computer modules based on Bluetooth technology
CN109840171A (en) A kind of simple SSD power failure test method
CN118093457A (en) Quick maintenance device and maintenance method for USB drive interface of capacitive touch screen

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20110921