A kind of method of utilizing video synchronization signal line transmitting user data
Technical field
The present invention relates to a kind of method of utilizing video synchronization signal line transmitting user data, definite says, relate to and a kind of two synchronization pulse Hs (HSync) in the standard VGA vision signal and Vs (VSync) are extracted and reappear in the characteristic of this locality, so that when transmit leg interrupts the transmission of Hs and Vs synchronizing signal in the VGA vision signal, the recipient can reappear this two signals according to the Hs and the Vs characteristics of signals of instant extraction, so that can continue steady display VGA video information at the receiving terminal display; Simultaneously, transmit user data, improve the data transmission efficiency of system with vacant transmission line.Interruption, the replay method of this Hs and two synchronizing signals of Vs can be used for solving the not enough problem of transmission line, improves VGA transmission of video signals efficient, belongs to VGA Video signal processing technical field.
Background technology
The VGA vision signal carries Visual Display Data, and this Visual Display Data to receiving terminal, just converts the video image on the display by the VGA standard transmission to.The VGA vision signal includes R/G/B/Hs/Vs totally five kinds of signals, wherein, the R/G/B signal carries trichromatic colouring information, two synchronization pulse Hs/Vs are normal necessary synchronizing informations of display image on display screen, be used to inform viewing hardware: the concluding time of the demonstration of each frame and next frame time started, and the demonstration concluding time of each horizontal scanning line in every frame and the time started of next line scan line.
The displaying principle of VGA video image is: as a kind of video transmission standard of extensive use in the color monitor field, VGA has the resolution height, shows many advantages such as speed is fast, color is abundant.During display video image, what of the frame width of cloth and horizontal scanning line the display quality of image depend on display.Every two field picture comprises many horizontal scanning lines, and every horizontal scanning line comprises a plurality of pixels again.Pixel quantity in the video image in the scanning number of lines of every frame and every the scan line all is subjected to the VGA sequencing control, frame sequential and row sequential all need to produce synchronizing signal (Sync), wherein, going the generation pulse of sequential and frame sequential is called horizontal-drive signal (HSync) and vertical synchronizing signal (VSync) again.The frequency of two kinds of signals and between relation determined the image resolution ratio that the VGA signal is produced.Generally, the correlation between the two-way synchronizing signal (being horizontal-drive signal and vertical sync pulse) of control monitor resolution remains unchanged.
In engineering, in order to solve the long Distance Transmission problem of VGA vision signal, following three kinds of methods have successively been adopted: VGA wire rod+VGA amplifier, RGB cable+RGB line driver, twisted-pair feeder+twisted-pair feeder transmission equipment.At present, the third twisted-pair feeder transmission method has become the main flow that engineering is used, it had both solved the problem that the transmission of VGA wire rod is crosstalked greatly, the transmission material is difficult to select, and when having avoided the RGB cable transmission again, the defective that rgb signal and Hs/Vs signal can not arrive display screen simultaneously can occur.In recent years, engineering is used normally with common netting twine (twisted-pair feeder) as transmission medium.There are 4 pairs of twisted-pair feeders the netting twine the inside, and when transmitting the VGA vision signal, with three pairs of twisted-pair feeder transmission, remaining a pair of twisted-pair feeder is used to transmit the Hs/Vs signal to R/G/B signal wherein respectively.Yet, when transmit leg also will transmit other signals (for example audio signal and comprise user data or control signals such as RS485, mouse-keyboard signal or usb signal), do not transmitted these signals with regard to there being unnecessary circuit.
In order to address this problem, present engineering is used normally at transmitting terminal Hs and two signal recompiles of Vs, sneaks in the R/G/B signal and transmits, arrive the recipient after, decode again, thereby a unnecessary circuit transmitted other signals.Though the transmission means of this coding, decoding has solved the not enough problem of transmission line,, it requires difficulty big to technology, realizes complexity, and may influence video image quality.Therefore, how to address this problem as early as possible, just become the focus of scientific and technical personnel's concern in the industry.
Summary of the invention
In view of this, the purpose of this invention is to provide a kind of method of utilizing video synchronization signal line transmitting user data, this method is in the process of transmission VGA vision signal, can vacate out vacant circuit transmitting user data or other signals in order to make transmitting terminal, on line related, interrupt Hs and two synchronizing signals of Vs in the transmission VGA vision signal, and reappear Hs and Vs signal in this locality, and then realize the steady display of vision signal on display by receiving terminal; And in the time of interrupting transmission Hs and two synchronizing signals of Vs, on the circuit of vacateing, transmit user data or other signals, realize identical traffic effect with the coding and decoding mode.Characteristics of the present invention are: simple to operate, easy realization, and practical, cost is low and be easy to other equipment integrated etc.
In order to achieve the above object, the invention provides a kind of method of the VGA of utilization video synchronization signal line transmitting user data, it is characterized in that: transmitting terminal regularly sends the synchronizing signal of standard VGA video, after receiving terminal is realized receiving synchronously, transmitting terminal is ended the transmission of the synchronizing signal of this standard VGA video, and the circuit that will transmit the VGA video synchronization signal originally is used for transmitting user data; Receiving terminal then according to the having or not of the synchronizing signal of being monitored, judges that the signal that is received is normal video synchronizing signal or user data; Simultaneously,, reappear this VGA synchronizing signal, guarantee the steady display of VGA vision signal at local recovery according to a plurality of characteristic parameters of the VGA video synchronization signal that obtains for the previous period and store.
Described transmitting terminal regularly sends the synchronizing signal of standard VGA video, and being provides enough synchronizing informations in order to guarantee to receiving terminal; Horizontal-drive signal Hs and vertical synchronizing signal Vs that receiving terminal sends display to are produced by receiving terminal, and receiving terminal should guarantee these two signals and transmitting terminal are carried out renewal synchronously.
The synchronizing signal of described standard VGA video comprises horizontal-drive signal Hs and vertical synchronizing signal Vs, adopts the transmission of two data lines respectively; A plurality of characteristic parameters of described VGA video synchronization signal comprise the pulse polarity of Vs, initial pulse position and pulse duration, the pulse polarity of Hs and initial pulse position and the pulse duration thereof of Hs of Vs.
Having or not of described receiving terminal monitoring synchronizing signal is whether the receiving terminal monitoring receives vertical synchronizing signal Vs, and determined level synchronizing signal Hs is standard level synchronizing signal or user data again; When receiving terminal can receive vertical synchronizing signal Vs, then a plurality of characteristic parameters of described VGA video synchronization signal are gathered in real time, stored and upgrade; When finding that vertical synchronizing signal Vs loses, then receiving terminal is considered as user data with the information that transmits on the horizontal-drive signal Hs transmission line.
Described method comprises following operating procedure:
(1) transmitting terminal sends to receiving terminal with the VGA vision signal;
(2) receiving terminal obtains storage in real time and upgrades Hs in the standard VGA video synchronization signal and a plurality of characteristic parameters of two synchronizing signals of Vs: receiving terminal carries out filtering and normalized to the VGA vision signal that receives, obtain six signal characteristic parameters in two synchronizing signals of Hs and Vs in real time, and utilize six latchs to store this six signal characteristic parameters respectively; Receiving terminal continues, constantly carries out this step operation, so that the signal characteristic parameter that real-time update is obtained when receiving Hs and two synchronizing signals of Vs;
(3) receiving terminal is carried out the operation that reappears this Hs and two synchronizing signals of Vs: receiving terminal is according to the Hs of the current storage of step (2) and six signal characteristic parameters of two synchronizing signals of Vs, real-time replay and the synchronous video synchronization signal of transmitting terminal sequential are so that receiving terminal still can be realized lasting, the steady display of image; This step continues, operation incessantly, to guarantee that display continues, display image stably;
(4), after receiving terminal is realized receiving synchronously, when transmitting terminal need send user data, just end to send Hs and two synchronizing signals of Vs in the standard VGA vision signal, and it is changed to high level or low level through the setting-up time section; Through after setting time-delay, transmitting terminal sends user data on the Hs holding wire again, and after the user data transmission finishes, recovers to send this Vs and two synchronizing signals of Hs; If amount of user data is big, then transmitting terminal adopts and periodically ends the transmission of Hs and two synchronizing signals of Vs, and inserts the transmission user data during corresponding;
(5) receiving terminal losing by monitoring Vs synchronizing signal, judge when transmitting terminal has interrupted sending Hs and two synchronizing signals of Vs, what transmit on the Hs signal transmssion line in the time of therefore is user data, and receiving terminal just carries out the reception of user data according to the agreement form of transmitting-receiving two-end.
Described six signal characteristic parameters are: the clock-pulse width T in the Vs signal
VL, the lock-out pulse in the Vs signal finishes the duration T that begins to first lock-out pulse of Hs signal
VtoH, duration T that lock-out pulse finishes to begin to next synchronous pulse in the Vs signal
VH, the width T of the lock-out pulse in the Hs signal
HL, duration T that lock-out pulse finishes to begin to next synchronous pulse in the Hs signal
HH, T
VHThe pulse number T of Hs in time period
CoutH
Described step (2) further comprises following content of operation:
(21) receiving terminal uses High Speed System clock and time counter to continue, extract incessantly following two signal characteristic parameters from the vertical synchronizing signal Vs that receives;
Receiving terminal after resetting is in wait state, and with High Speed System clock monitoring vertical synchronizing signal Vs, and when detecting the Vs signal pulse and occur, time counter picks up counting, and when detecting the Vs signal pulse and finish, then exports timing result; This timing result is the pulse width T of Vs signal
VL
Receiving terminal is at output T
VLThe time, the Vs signal Synchronization end-of-pulsing of being monitored, time counter picks up counting, frame scan begins, and starts the monitoring to the Hs signal, when detecting the Vs signal and next pulse occurs, export timing result, and return the time status of above-mentioned Vs signal pulse, i.e. frame scan finishes; This moment, the count results of output was duration T that lock-out pulse finishes to begin to next synchronous pulse in the Vs signal
VH
(22) receiving terminal extracts following four signal characteristic parameters from the horizontal-drive signal Hs that receives:
When frame scan began, receiving terminal began to monitor the Hs signal simultaneously, and time counter picks up counting, when detecting the Hs signal pulse and occur, and the output timing result; This timing result is that the lock-out pulse in the Vs signal finishes the duration T that begins to first lock-out pulse of Hs signal
VtoH
Receiving terminal is at output T
VtoHThe time, the Hs signal of being monitored enters pulse and begins the sequential section, and time counter picks up counting, when this end-of-pulsing, the output timing result; This timing result is the width T of the lock-out pulse in the Hs signal
HL
Receiving terminal is at output T
HLThe time, the Hs signal Synchronization end-of-pulsing of being monitored, time counter picks up counting, up to the Hs signal of being monitored when pulse occurs next time, the output timing result; This result is duration T that lock-out pulse finishes to begin to next synchronous pulse in the Hs signal
HH
T at the Vs signal
VHPeriod, the pulse number T that receiving terminal monitoring and record Hs signal occur
CoutH, when receiving terminal monitors the frame scan end, the output count results; The pulse number T that this count results is between two pulses of Vs signal, promptly end-of-pulsing begins Hs signal in the period to next pulse
CoutH
The basis for estimation of losing of described Vs synchronizing signal is to monitor vertical synchronizing signal Vs with the High Speed System clock when pulse occurring, counter begins the zero clearing counting, if the duration of counter meets or exceeds cycle of Vs signal or cycle during multiple, do not monitor next pulse yet and occur, think that then the Vs vertical synchronizing signal loses; Receiving terminal output cue this moment informs that other equipment preparations are received in the user data that is about to appearance on the original Hs signal transmssion line.
Described step (3) further comprises following content of operation: receiving terminal with vertical synchronizing signal Vs as initial excitation, behind the vertical synchronizing signal Vs that has received at least three cycles, six latchs have all latched six characteristic parameters of current Vs and two synchronizing signals of Hs; Receiving terminal utilizes system clock to begin counting, two synchronizing signals of Vs that generation and output and transmitting terminal are synchronous and Hs just according to these six characteristic parameters that receive; When if the characteristic parameter of Hs and two synchronizing signals of Vs changes in the VGA vision signal that transmitting terminal sends, the latch of receiving terminal is the real-time update memory contents constantly, constantly according to the latch content change, adjust the output of synchronizing signal in real time simultaneously.
The present invention is a kind of efficient, practical method of utilizing video synchronization signal line transmitting user data, and its advantage is: operating procedure is simple, realize easily, start-up time is short, stable output signal.It has avoided Vs and two synchronizing signals of Hs and the issuable interference when collinear transmission of R/G/B colour signal, and, only need increase and use a programmable logic cells CPLD that macrocell is abundant, just can finish reception, reproduction and the alarm prompt of Vs and two synchronizing signals of Hs, and, can very expediently this CPLD circuit be integrated in the other system; Simultaneously, the vacant holding wire of vacateing is used for transmitting user data and other signals, improves the data transmission efficiency of whole system and the allomeric function of system.Moreover the inventive method is compared with the recognition methods or the system of other vision signals, and implementation method is simple, easy, and the hardware cost of increase is very cheap, and effect is remarkable, and therefore, the present invention has good popularization and application prospect.
Description of drawings
Fig. 1 is the method operating procedure schematic diagram that the present invention utilizes video synchronization signal line transmitting user data.
Fig. 2 (a) and (b) are respectively to extract monitoring in the operating process of synchronous pulse information in the step 2 in the inventive method to extract two schematic diagrames that the Hs signal is extracted in Vs signal and monitoring; Reproduction Hs and two signals of Vs then are the operating processes that adopts in contrast in the step 3.
Fig. 3 is a flow chart of judging in the step 5 of the specific embodiment of the invention whether synchronizing signal interrupts.
Fig. 4 is in the embodiment of the invention l-G simulation test, receiving terminal before receiving the VGA vision signal reset signal to the reset effect analogous diagram of all inputs.
Fig. 5 is in the embodiment of the invention emulation experiment, and receiving terminal reappears video synchronization signal effect emulation figure.
Fig. 6 is in the example emulation experiment of the present invention, and receiving terminal is judged the effect emulation figure whether video synchronization signal interrupts.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with drawings and Examples.
Referring to Fig. 1, introduce the method that the present invention utilizes VGA video synchronization signal line transmitting user data: transmitting terminal regularly sends the synchronizing signal of standard VGA video, after receiving terminal is realized receiving synchronously, transmitting terminal is ended the transmission of the synchronizing signal of this standard VGA video, and the circuit that will transmit the VGA video synchronization signal originally is used for transmitting user data; Receiving terminal then according to the having or not of the synchronizing signal of being monitored, judges that the signal that is received is normal video synchronizing signal or user data; Simultaneously,, reappear this VGA synchronizing signal, guarantee the steady display of VGA vision signal at local recovery according to a plurality of characteristic parameters of the VGA video synchronization signal that obtains for the previous period and store.
Need to prove: transmitting terminal of the present invention will regularly send the synchronizing signal of standard VGA video, is that receiving terminal provides enough synchronizing informations with the assurance; And receiving terminal sends the horizontal-drive signal Hs of display to and vertical synchronizing signal Vs is produced by receiving terminal, and receiving terminal must guarantee these two signals and transmitting terminal are carried out renewal synchronously.In addition, the present invention is horizontal-drive signal Hs and the vertical synchronizing signal Vs that adopts in the synchronizing signal of two data lines difference transmission standard VGA video.A plurality of characteristic parameters of VGA video synchronization signal comprise the pulse polarity of Vs, initial pulse position and pulse duration, the pulse polarity of Hs and initial pulse position and the pulse duration thereof of Hs of Vs.
The basis that has or not of receiving terminal monitoring synchronizing signal of the present invention is whether the receiving terminal monitoring receives vertical synchronizing signal Vs, and then determined level synchronizing signal Hs is standard level synchronizing signal or user data.Just, when receiving terminal can receive vertical synchronizing signal Vs, then a plurality of characteristic parameters of VGA video synchronization signal that receive on VGA video synchronization signal transmission line are gathered in real time, stored and upgrade; When finding that vertical synchronizing signal Vs loses, then receiving terminal is considered as user data with the information that transmits on the horizontal-drive signal Hs transmission line.
Referring to Fig. 1, it is as described below to introduce concrete operations step of the present invention:
Step 1, transmitting terminal regularly send to receiving terminal with the VGA vision signal.
Step 2, (when carrying out this step, transmitting terminal still sends the VGA vision signal to receiving terminal), receiving terminal carries out filtering and normalized to the VGA vision signal that receives, obtain pulse polarity and the initial pulse position of Hs and six the signal characteristic parameters of pulse duration thereof of the initial pulse position of Hs in the VGA vision signal and the pulse polarity that comprises Vs in two synchronizing signals of Vs, Vs and pulse duration thereof, Hs in real time, and utilize six latchs to store this six signal characteristic parameters respectively; Receiving terminal continues, constantly carries out the operation of this step 2, so that six signal characteristic parameters that real-time update is obtained when receiving Hs and two synchronizing signals of Vs.
Six signal characteristic parameters here are actually following six time parameters: the clock-pulse width T in the Vs signal
VL, the lock-out pulse in the Vs signal finishes the duration T that begins to first lock-out pulse of Hs signal
VtoH, duration T that lock-out pulse finishes to begin to next synchronous pulse in the Vs signal
VH, the width T of the lock-out pulse in the Hs signal
HL, duration T that lock-out pulse finishes to begin to next synchronous pulse in the Hs signal
HH, T
VHThe pulse number T of Hs in time period
CoutH
This step 2 can also further be subdivided into following two content of operation (these two content of operation are that receiving terminal is once and again being carried out):
(21) receiving terminal uses High Speed System clock and time counter to continue, extract incessantly following two characteristic parameters from the vertical synchronizing signal Vs that receives.The idiographic flow of this step is referring to Fig. 2 (a).
Receiving terminal after resetting is in wait state, and with High Speed System clock monitoring vertical synchronizing signal Vs, and when detecting the Vs signal pulse and occur, time counter picks up counting, and when detecting the Vs signal pulse and finish, then exports timing result; This timing result is the pulse width T of Vs signal
VL
Receiving terminal is at output T
VLThe time, the Vs signal Synchronization end-of-pulsing of being monitored, time counter picks up counting, frame scan begins, startup is to the monitoring of Hs signal, when detecting the Vs signal and next pulse occurs, and the output timing result, and return the time status of the Vs signal pulse of carrying out above-mentioned steps, i.e. frame scan finishes; This moment, the count results of output was duration T that lock-out pulse finishes to begin to next synchronous pulse in the Vs signal
VH
(22) receiving terminal extracts following four signal characteristic parameters from the horizontal-drive signal Hs that receives.The idiographic flow of this step is referring to Fig. 2 (b):
When frame scan began, receiving terminal began to monitor the Hs signal simultaneously, and time counter picks up counting, when detecting the Hs signal pulse and occur, and the output timing result; This timing result is that the lock-out pulse in the Vs signal finishes the duration T that begins to first lock-out pulse of Hs signal
VtoH
Receiving terminal is at output T
VtoHThe time, the Hs signal of being monitored enters pulse and begins the sequential section, and time counter picks up counting, when this end-of-pulsing, the output timing result; This timing result is the width T of the lock-out pulse in the Hs signal
HL
Receiving terminal is at output T
HLThe time, the Hs signal Synchronization end-of-pulsing of being monitored, time counter picks up counting, up to the Hs signal of being monitored when pulse occurs next time, the output timing result; This result is duration T that lock-out pulse finishes to begin to next synchronous pulse in the Hs signal
HH
T at the Vs signal
VHPeriod, the pulse number T that receiving terminal monitoring and record Hs signal occur
CoutH, when receiving terminal monitors the frame scan end, the output count results; The pulse number T that this count results is between two pulses of Vs signal, promptly end-of-pulsing begins Hs signal in the period to next pulse
CoutH
Step 3, receiving terminal are carried out the operation that reappears this Hs and two synchronizing signals of Vs.Need to prove, after the memory of receiving terminal has obtained the parameter attribute of Hs and two synchronizing signals of Vs, just carry out the associative operation that reappears all the time incessantly, no matter the transmitting terminal transmission is video synchronization signal or user data.
The process of reappearing synchronizing signal is as follows: as initial excitation, behind the Vs signal that has received three cycles, six latchs have all latched six signal characteristic parameters of current Vs and two synchronizing signals of Hs to receiving terminal with vertical synchronization Vs signal; Receiving terminal just according to these six signal characteristic parameters that receive, utilizes system clock to begin to count one by one, two synchronizing signals of Vs that generation and output and transmitting terminal are synchronous and Hs; If when the signal characteristic of Hs and two synchronizing signals of Vs changed in the VGA vision signal that transmitting terminal sends, latch was brought in constant renewal in memory contents, receiving terminal is adjusted the output of synchronizing signal simultaneously constantly according to the latch content change.
Step 4, process setting-up time section, after receiving terminal was realized receiving synchronously, when transmitting terminal need send user data, just termination sent Hs and two synchronizing signals of Vs in the standard VGA vision signal, and the Vs signal is changed to high level or low level; Through after setting time-delay, transmitting terminal sends user data on the Hs holding wire again, and after the user data transmission finishes, recovers to send this Vs and two synchronizing signals of Hs; If amount of user data is big, then transmitting terminal adopts and periodically ends the transmission of Hs and two synchronizing signals of Vs, and inserts the transmission user data during corresponding.
Step 5 (referring to shown in Figure 3), receiving terminal are lost by monitoring Vs synchronizing signal, judge when transmitting terminal has interrupted sending Hs and two synchronizing signals of Vs, what receiving terminal received on the Hs signal transmssion line at this moment is user data, and just the agreement form according to transmitting-receiving two-end carries out Data Receiving.
In this step, the back receiving terminal that resets is in the work wait state all the time, simultaneously with High Speed System clock monitoring vertical synchronizing signal Vs.When detecting the Vs synchronous signal impulse and occur, time counter begins zero clearing and timing, if duration reaches Vs signal period or cycle during multiple, not detecting next pulse yet occurs, then receiving terminal is judged as the Vs synchronizing signal and loses, and just transmitting terminal has stopped sending Hs and two synchronizing signals of Vs and sent user data elsewhere.At this moment, transmitting terminal is changed to high level or low level with the Vs holding wire, and the outputting alarm prompt signal, informs that other equipment preparations are received in the user data that transmits on the Hs holding wire.
For correctness and the feasibility of verifying the inventive method, the applicant utilizes the Quartus emulation tool that this back method is carried out software emulation and implements test.The situation of following brief description l-G simulation test and result:
Referring to Fig. 4, when transmitting terminal was prepared to accept the pulse of VGA video synchronization signal, reset signal Rst became low level by high level, and after all input signals were resetted, all signals all reset to high level.
Referring to Fig. 5, the frequency of high frequency clock clk_in is 0.05MHZ, and the frequency of Hs signal is 640 times of Vs signal frequency.When rising edge appears in the Vs signal, show that frame scan begins, the Hs signal pulse promptly appears in horizontal sweep this moment.Occur interrupting after four pulses at the Vs signal, after this, the Vs signal still constantly produces, and the Vs signal after the reproduction has been inherited all characteristics of original this signal.In like manner, after the Hs signal interruption from transmitting terminal, receiving terminal has still produced the Hs signal of identical characteristics.
Referring to Fig. 6, introduce the output situation of prompting alarm signal: the Vs signal interrupts at high level, when reaching the high level threshold value, receiving terminal does not detect the trailing edge of Vs signal yet, then alarm signal is pointed out in output, and promptly Vlost_out places high level, shows that the Vs signal interrupts.
From foregoing description as can be seen, the embodiment simulation result of the inventive method has reached its intended purposes of the present invention and effect, has verified the correctness and the feasibility of the inventive method.