CN202904428U - Circuit for producing universal serial bus (USB) peripheral clock - Google Patents

Circuit for producing universal serial bus (USB) peripheral clock Download PDF

Info

Publication number
CN202904428U
CN202904428U CN 201220610928 CN201220610928U CN202904428U CN 202904428 U CN202904428 U CN 202904428U CN 201220610928 CN201220610928 CN 201220610928 CN 201220610928 U CN201220610928 U CN 201220610928U CN 202904428 U CN202904428 U CN 202904428U
Authority
CN
China
Prior art keywords
clock
oscillator
usb
packet
transmitter
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.)
Withdrawn - After Issue
Application number
CN 201220610928
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.)
IPGoal Microelectronics Sichuan Co Ltd
Original Assignee
IPGoal Microelectronics Sichuan 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 IPGoal Microelectronics Sichuan Co Ltd filed Critical IPGoal Microelectronics Sichuan Co Ltd
Priority to CN 201220610928 priority Critical patent/CN202904428U/en
Application granted granted Critical
Publication of CN202904428U publication Critical patent/CN202904428U/en
Anticipated expiration legal-status Critical
Withdrawn - After Issue legal-status Critical Current

Links

Images

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The utility model discloses a circuit for producing a universal bus (USB) peripheral clock. The circuit is placed on a USB main body structure. The circuit for producing the USB peripheral clock comprises an interior oscillator, a receiver, a transmitter, a clock counter and a clock processor. A clock with fixed-frequency is produced by the interior oscillator. The receiver is connected with the interior oscillator and a host machine and receives a data package transmitted by the master machine. The interior oscillator and the master machine are respectively connected with the transmitter, and a data package of the USB main body structure is sent to the master machine through the transmitter. The receiver and the interior oscillator are respectively connected with the clock counter, and the length of the received data package is counted by the clock counter. The clock counter, the interior oscillator and the transmitter are respectively connected with the clock processor, and the length of a data package sent by the transmitter is controlled and adjusted by the clock processor according to the length of the counted data package. A main clock is provided for normal work of the USB main body structure under a situation that pins of the USB main body structure do not need occupying. High-accuracy low-velocity/ full-velocity communication of the USB main body structure can be guaranteed.

Description

Circuit for generation of USB peripheral hardware clock
Technical field
The utility model relates to the USB communication field, relates more specifically to a kind of circuit for generation of USB peripheral hardware clock.
Background technology
USB is the abbreviation of English Universal Serial BUS, and Chinese implication is " USB (universal serial bus) ".USB is because its communication speed is fast, interface is simple, use the advantages such as convenient, present PC, MP4, mobile phone, PDA(Personal Digital Assistant have been become, palm PC), one of the indispensable standard interface of the electronic equipments such as digital camera, printer, scanner, obtained using widely at aspects such as information communication and data transmission.
Conventional communication system often all needs a relatively accurate clock source separately, utilize this clock source, produce the required major clock of communication system work through logics such as frequency division or frequencys multiplication again in communication system inside, the data stream of transmission is analyzed, gathered, to reach the purpose of data communication.In the no exception full speed at USB of USB communication system, the low speed communication (communication speed is that 1.5MHz is the low speed communication, and communication speed is that 12MHz is at full speed communication), system is to have relatively high expectations (± 2.5 ‰) of data transmission clock accuracy.Therefore, the USB communication system normally adopts the clock scheme of external crystal oscillator, namely outside by accurately clock (for example 12MHz) input of crystal oscillator generation chip internal, chip internal is again by logic module frequencys multiplication such as PLL, produce the required low speed of final system and work clock 300MHz at full speed, to guarantee the precision of USB agent structure communication.
Owing to need to use crystal oscillator to provide accurately clock to the USB agent structure, USB communication system chip just needs to increase by two pins at least to be used for crystal oscillator; So, in the relatively less electronic product of pin, just can't adopt the USB communication system.For example, in the electronic product of SIM card of routine and so on, pin generally only has 4~7, because the needs of other systemic-function, so that two pins of can't additionally reallocating use to crystal oscillator at all, thereby can't adopt the USB communication system at all.
Moreover, along with the development of manufacture craft and the raising of designing technique, the more and more miniaturization of the volume of electronic product, and the pin of electronic product is also in continuous minimizing.And the relative SOC(Systemon Chip of the volume of crystal oscillator element, system level chip) chip is still larger, will restrict like this development of the high integration of compact of product.Thereby crystal oscillator becomes the application of restriction USB communication system chip and the key factor of development.
Certainly, the USB chip internal also can pass through RC/LC oscillator generated clock, and offers the USB agent structure.But because RC/LC oscillator process deviation or other factors impact, so that chip internal oscillator generated clock and design object exist ± 20% deviation usually, and there is deviation in clock, to cause the length of transceiving data bag in communication process also to be difficult to be consistent, can't satisfy the accuracy requirement of system transmissions.
Therefore, be necessary to provide a kind of improved circuit for generation of USB peripheral hardware clock to overcome defects.
The utility model content
The purpose of this utility model provides a kind of circuit for generation of USB peripheral hardware clock, can be in the situation of the pin that does not need to take in addition the USB agent structure by the technical solution of the utility model, for the USB agent structure provides normal operation required major clock, and can guarantee that the USB agent structure carries out high-precision low speed/full speed communication.
For achieving the above object, the utility model provides a kind of circuit for generation of USB peripheral hardware clock, is arranged on the USB agent structure, and wherein this circuit comprises: internal oscillator, receiver, transmitter, clock counter and clock processor; Described internal oscillator produces the clock with fixed frequency; Described receiver is connected with described internal oscillator and main frame, and the packet that sends according to the clock Receiving Host of described internal oscillator output of described receiver; Described transmitter is connected with internal oscillator and main frame respectively, described transmitter under the control of the clock that described internal oscillator produces with the Packet Generation of USB agent structure to described main frame; Described clock counter is connected with described receiver and internal oscillator respectively, and described clock counter is counted the length of the packet of described receiver reception according to the clock that described internal oscillator sends; Described clock processor is connected with described clock counter, internal oscillator and transmitter respectively, described clock processor is according to the length of the packet of described clock counter counting, and the length of the packet that the described transmitter of regulating and controlling sends is identical with the length of the packet that receiver receives.
Preferably, described internal oscillator is RC oscillator or LC oscillator
Preferably, the clock of described internal oscillator generation is high frequency clock.
Preferably, the frequency of the clock of described internal oscillator output is 300MHz.
Compared with prior art, circuit for generation of USB peripheral hardware clock of the present utility model, because described clock processor is connected with described clock counter, internal oscillator and transmitter respectively, described clock counter is counted the data length of detecting host, and send count results to described clock processor, the length of the packet that described clock processor sends according to count results regulating and controlling transmitter, and the length of the packet that receives of the length that makes the packet that transmitter sends and receiver is consistent; Thereby the length that can guarantee the packet of described USB agent structure transmitting-receiving is identical, so that described USB agent structure can be accurately and carried out the low speed of various packets/full speed communication between the main frame under the control of the clock that produces.
By following description also by reference to the accompanying drawings, it is more clear that the utility model will become, and these accompanying drawings are used for explaining the utility model.
Description of drawings
Fig. 1 structural representation that to be the utility model be connected with main frame for generation of the circuit of USB peripheral hardware clock.
Embodiment
With reference now to accompanying drawing, describe embodiment of the present utility model, similar element numbers represents similar element in the accompanying drawing.As mentioned above, the utility model provides a kind of circuit for generation of USB peripheral hardware clock, can be in the situation of the pin that does not need to take in addition the USB agent structure by the technical solution of the utility model, for the USB agent structure provides normal operation required major clock, and can guarantee that the USB agent structure carries out high-precision low speed/full speed communication.
Please refer to Fig. 1, Fig. 1 structural representation that to be the utility model be connected with main frame for generation of the circuit of USB peripheral hardware clock.The utility model is arranged on the USB agent structure for generation of the circuit of USB peripheral hardware clock, and comprises internal oscillator, receiver, transmitter, clock counter and clock processor; Described internal oscillator produces the clock with fixed frequency, and the clock that produces is sent to respectively described receiver, transmitter, clock counter and clock processor, thinks that described receiver, transmitter, clock counter and clock processor provide work clock; Described receiver is connected with described internal oscillator and main frame, and the packet that sends according to the clock Receiving Host of described internal oscillator output of described receiver; Described transmitter is connected with internal oscillator and main frame respectively, described transmitter under the control of the clock that described internal oscillator produces with the Packet Generation of USB agent structure to described main frame; Described clock counter is connected with described receiver and internal oscillator respectively, and described clock counter is counted the length of the packet of described receiver reception according to the clock that described internal oscillator sends; Described clock processor is connected with described clock counter, internal oscillator and transmitter respectively, described clock processor is according to the length of the packet of described clock counter counting, and the length of the packet that the described transmitter of regulating and controlling sends is identical with the length of the packet that receiver receives.
Particularly, in preferred implementation of the present utility model, described internal oscillator is RC oscillator or LC oscillator, because RC oscillator or LC oscillator structure are simple, volume little and can production requirement the clock of frequency, therefore adopt RC oscillator or LC oscillator can not affect the development of the high integration of compact of USB system product; The clock of described RC oscillator or the output of LC oscillator is high frequency clock, and the high frequency clock in the oscillator of RC described in the utility model or the output of LC oscillator is 300MHz, the clock that wherein said RC oscillator or LC oscillator produce has certain error, usually the error maximum can reach ± 20%, also namely the scope of the clock of output still can make the USB agent structure normally carry out low speed/full speed communication under the cooperation of other device between 240MHz to 360MHz; As previously mentioned, even the error of the high frequency clock of described RC oscillator or LC oscillator output reaches ± and 20%, adopt high frequency clock sampling low-frequency data but be still this moment, and the packet that main frame sends is the packet of fixing, therefore,, error also can correctly judge normal receive data bag even reaching 20%; In addition, the frequency of the clock that described RC oscillator or LC oscillator produce can design according to the accuracy requirement of design, and the frequency of clock is higher usually, and the precision of USB agent structure communication is also higher.Described receiver is connected with described RC oscillator or LC oscillator and main frame respectively, thereby described RC oscillator or LC oscillator provide normal operation required work clock for described receiver, and the packet that sends according to the clock Receiving Host of described RC oscillator or the output of LC oscillator of described receiver; Wherein, the packet that main frame sends has generally included SOF(Start-of-Frame, and frame begins), Setup(disposes token packet), INToken(inputs token packet), OutToken(exports token packet).Described transmitter is connected with described RC oscillator or LC oscillator and main frame respectively, described transmitter under the control of the clock that described internal oscillator produces with the Packet Generation of USB agent structure to described main frame; Certainly because the frequency of the clock of described RC oscillator or the output of LC oscillator has error, so that the length of the packet that described transmitter sends there are differences with the length of the packet that receiver receives, thus need to be to corresponding adjusting of length of the packet of described transmitter transmission.Described clock counter is connected with described receiver, clock processor and RC oscillator or LC oscillator respectively, the clock that described clock counter sends according to described RC oscillator or LC oscillator is counted the length of the packet that described receiver receives, and count results is sent to described clock processor, thereby the length of the packet that described clock counter receives described receiver is counted in real time.From the above, the length of the packet that described receiver receives will be different because of the frequency of the clock of described RC oscillator or LC oscillator output, and correspondingly, the length of the packet that described transmitter sends also can be variant because of the difference of clock frequency, is difficult to consistent with the length of the packet that receives; Described clock processor is connected with described RC oscillator or LC oscillator and transmitter respectively, and described clock processor is according to the length of the packet of described clock counter counting, the length of the packet that the described transmitter of corresponding control sends; Particularly, the length that described clock processor is controlled the packet that described transmitter sends according to the count results of described clock counter is identical with the length of the packet of described receiver reception, with this consistance that guarantees USB agent structure transceiving data packet length, improved the precision that the USB agent structure is carried out low speed/full speed communication.
From the above, the utility model adopts high frequency clock that the packet that main frame sends is counted for generation of the circuit of USB peripheral hardware clock, can judge between current high frequency clock and the target clock according to the result of described clock processor and to have great error, thereby adjust the precision (being specially the length that sends packet) of revising transmitter, satisfy the USB system and carry out low speed/required accuracy requirement of full speed communication.
Below in conjunction with Fig. 1, the utility model is described for generation of a specific implementation process of the circuit of USB peripheral hardware clock;
In this specific embodiment, the packet that main frame sends is SOF(Start-of-Frame, and frame begins) packet.Described clock generation circuit adopts the RC oscillator as internal oscillator, and this RC oscillator produces the clock of 300MHz; In the full speed communication system of USB, it is 12Mb that main frame sends the data maximal rate, receiver adopts the high frequency clock of 300MHz ± 20% packet that main frame sends effectively to be received and differentiate fully, in a single day described receiver receives the SOF data and just notifies clock counter, simultaneously data is passed to clock counter.When the USB agent structure when carrying out the full speed communication, the length of general SOF packet is that 32Bits(comprises synchronous head, does not consider the position filling), code check is 12Mb, adopt accurately the clock of 300MHz that the length of whole packet is counted, do not consider that the count results of deviation is about 800Cycle.Clock counter sends count results to the clock processor, and the clock processor is controlled the length of the packet of transmitter transmission according to result again, and needs to keep certain decimal in processing procedure, to keep precision.Wherein, if the frequency of the clock that the RC oscillator produces is accurate, be the 300MHz of standard, the count results of described clock counter is 800Cycle, is every 25(800/32 just when then described transmitter sends packet) packet of individual clock transmission.If the frequency of the clock that described RC oscillator produces not is 300MHz accurately, but have certain error, and the count results that makes described clock counter is 799Cycle, packet of the whenever individual clock transmission in [24+31/32] (799/32) just when transmitter sends packet so.Because the clock number that sends is not integer, therefore need to adjust the process of transmitting of packet, only need one group of every 32Bits data, wherein 31Bits launches according to 25 clocks, last 1Bit data are launched according to 24 clocks and are got final product, so, on average the cycle of each packet has been exactly 24+31/32 clock.
By above-mentioned specific implementation process as can be known: count value is larger, and behind the regulation of electrical circuit of the utility model for generation of USB peripheral hardware clock, the precision of carrying out the communication of USB full-speed/low-speed is higher.As above-mentioned, count value is 800, so precision be exactly ± 1.25 ‰ (1/800), satisfied the requirement of USB agent structure when the full-speed/low-speed communication far away.In addition, consider that the error maximum possible of RC oscillator can reach ± 20%, so under the full speed pattern, count value also can be in 800 ± 20% interior fluctuations, and also, the poorest situation is that count value is 640, this moment, precision was ± 1.5625 ‰, also satisfied the communication need that USB master stops structure.And under low-speed mode, because code check only has 1.5Mb, count value can be larger, more can satisfy the USB agent structure to the requirement of communication precision.
In sum, in the communication process of described USB agent structure and main frame, although the clock that described RC oscillator or LC oscillator produce is not the clock of 300MHz accurately because of the existence of error, and so that the length of the packet that described receiver receives may be inconsistent, but the cooperation by described clock counter and clock processor is processed, can make the length of the packet that described transmitter sends consistent with the length of the packet that receives, thereby so that the length of the packet that described USB agent structure is received and dispatched simultaneously is identical.Therefore, by adjusting and the control that produces the circuit of USB peripheral hardware clock of the present utility model, the length that can guarantee the packet of described USB agent structure transmitting-receiving is identical, thereby described USB agent structure can be accurately and carried out the low speed of various packets/full speed communication between the main frame under the control of the clock that produces.
Abovely in conjunction with most preferred embodiment the utility model is described, but the utility model is not limited to the embodiment of above announcement, and should contains various modification, equivalent combinations of carrying out according to essence of the present utility model.

Claims (4)

1. the circuit for generation of USB peripheral hardware clock is arranged on the USB agent structure, it is characterized in that, comprising:
Internal oscillator, described internal oscillator produces the clock with fixed frequency;
Receiver, described receiver is connected with described internal oscillator and main frame, and the packet that sends according to the clock Receiving Host of described internal oscillator output of described receiver;
Transmitter, described transmitter is connected with internal oscillator and main frame respectively, described transmitter under the control of the clock that described internal oscillator produces with the Packet Generation of USB agent structure to described main frame;
Clock counter, described clock counter is connected with described receiver and internal oscillator respectively, and described clock counter is counted the length of the packet of described receiver reception according to the clock that described internal oscillator sends;
The clock processor, described clock processor is connected with described clock counter, internal oscillator and transmitter respectively, described clock processor is according to the length of the packet of described clock counter counting, and the length of the packet that the described transmitter of regulating and controlling sends is identical with the length of the packet that receiver receives.
2. the circuit for generation of USB peripheral hardware clock as claimed in claim 1 is characterized in that, described internal oscillator is RC oscillator or LC oscillator
3. the circuit for generation of USB peripheral hardware clock as claimed in claim 1 is characterized in that, the clock that described internal oscillator produces is high frequency clock.
4. the circuit for generation of USB peripheral hardware clock as claimed in claim 3 is characterized in that, the frequency of the clock of described internal oscillator output is 300MHz.
CN 201220610928 2012-11-19 2012-11-19 Circuit for producing universal serial bus (USB) peripheral clock Withdrawn - After Issue CN202904428U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201220610928 CN202904428U (en) 2012-11-19 2012-11-19 Circuit for producing universal serial bus (USB) peripheral clock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201220610928 CN202904428U (en) 2012-11-19 2012-11-19 Circuit for producing universal serial bus (USB) peripheral clock

Publications (1)

Publication Number Publication Date
CN202904428U true CN202904428U (en) 2013-04-24

Family

ID=48125075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201220610928 Withdrawn - After Issue CN202904428U (en) 2012-11-19 2012-11-19 Circuit for producing universal serial bus (USB) peripheral clock

Country Status (1)

Country Link
CN (1) CN202904428U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929330A (en) * 2012-11-19 2013-02-13 四川和芯微电子股份有限公司 Circuit and method for generating USB external clock

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929330A (en) * 2012-11-19 2013-02-13 四川和芯微电子股份有限公司 Circuit and method for generating USB external clock
CN102929330B (en) * 2012-11-19 2016-03-16 四川和芯微电子股份有限公司 For generation of circuit and the method for USB external clock

Similar Documents

Publication Publication Date Title
CN100435064C (en) Clock signal generator circuit for serial bus communication
CN104809094A (en) SPI (Serial Peripheral Interface) controller and communication method for SPI controller
CN102945061B (en) For generation of circuit and the method for USB external clock
CN1940808A (en) Compensated-clock generating circuit and usb device having same
CN108604217A (en) Across the low uncertain timer synchronization mechanism of the low latency of multiple equipment
CN102331979A (en) Dynamic clock frequency calibration method applied to universal serial bus (USB) equipment
CN109687867A (en) A kind of no crystal oscillator USB device clock correcting method and calibration circuit
CN202904429U (en) Circuit for producing universal serial bus (USB) peripheral clock
CN102929330B (en) For generation of circuit and the method for USB external clock
CN201878182U (en) Field programmable gate array (FPGA)-based bus communication system
US20220147218A1 (en) Touch screen detection chip combination and terminal device
CN103999419B (en) Low power transmitter for generating pulse modulated signals
CN202904428U (en) Circuit for producing universal serial bus (USB) peripheral clock
CN106444964A (en) Clock system for FPGA, and server
CN102957424B (en) Groove signal restoring circuit for ISO14443 TypeA agreement
CN102882623A (en) Configurable clock frequency synthesis device based on FPGA
CN104391817A (en) Electronic system synchronous with peripheral equipment
CN103455085A (en) Circuit and method for generating USB host work clock
CN203102268U (en) Control bus with trigger synchronization function and clock synchronization function
CN203433407U (en) Usb clock generating circuit
Kong et al. Design and Implementation of UART Based on Verilog HDL
CN206132994U (en) Ultrasonic ranging appearance based on FPGA
CN101751357B (en) Digital phase-locked loop device
CN220043390U (en) Low-jitter self-adaptive double-channel second pulse distribution device
Li et al. Research on Improvement of Configurable I2C controller IP Core

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP02 Change in the address of a patent holder

Address after: 610041 Sichuan city of Chengdu province high tech Zone Kyrgyzstan Road 33 block A No. 9

Patentee after: IPGoal Microelectronics (Sichuan) Co., Ltd.

Address before: 402 room 7, building 610041, incubator Park, hi tech Zone, Sichuan, Chengdu

Patentee before: IPGoal Microelectronics (Sichuan) Co., Ltd.

AV01 Patent right actively abandoned

Granted publication date: 20130424

Effective date of abandoning: 20160316

C25 Abandonment of patent right or utility model to avoid double patenting