• The TMS320C54XX DSP USB connection realizes - en.51rd.net

        Universal serial bus USB (Universal Serial Bus) applies by three parts is composed: Has USB the connection PC system, to be able to support USB the system software and uses the USB connection the equipment. The USB application uses the general connection technology, realizes the peripheral device simple momentary connection, in order to achieves the convenience user, to reduce the cost, to expand the PC machine connection peripheral device scope the goal. The USB characteristic is as follows:

        (1) connection is flexible, the easy to operate the computer system connects auxiliary equipment’s connection and the non-unification standard now, like the keyboard with the PS/2 connection, the printer uses 25 needle’s parallel interfaces and so on. USB unifies these different connections, constitutes by a group of small moment plug and the software. After user insertion peripheral device, the computer system can the automatic diagnosis meet person’s peripheral device, but does not need again the initialize the system, the user may charged insert pulls out; For the USB design’s driver and the application software may the automatic start, not need the user to intervene the USB equipment, also does not involve questions and so on IRQ conflict; The USB independent employment own retention interrupt, will not struggle with other equipment with the PC machine limited resources.

        (2) provides the power source which for the peripheral device power source USB can the automatic diagnosis peripheral device need, and (highest may reach 500mA) through the USB electric cable to this equipment power supply.

        (3) speed quick USB maximum transfer rate may reach 12Mbit/s, compared to serial port speed quick 100 times, is comparable mouth speed quickly nearly 10 times. The USB port’s transmission speed is quicker than the present PC machine platform’s in any other type port’s transmission speed. It is estimated that from now on the USB speed will enhance to 100Mbit/s above.

        (4) supported multimedia USB to provide to telephone’s two group data support, it might support asynchronous and isochronism data transmission, caused the telephone to be possible with the PC machine integration, the sharing voice mail and other functions. Because the USB audio frequency information production in calculates the outside the aircraft, thus reduced the electron noise disturbance sound quality opportunity, thus enables the audio frequency system to have a higher fidelity.

    1 USB connection chip AN2131Q 

        At present in the market the USB connection chip are many, what uses is more widespread is Crypress Corporation’s AN2131 series USB connection chip AN2131Q. AN2131Q has the following merit:

        (1) based on RAM “soft” system solution (SOFT, RAMBASED), does not need ROM or other solidification memory, but only uses internal procedure/data RAM. The way which downloads through the main engine disposes the USB connection, thus causes interface system’s revision and the promotion becomes very simple, causes the peripheral device hardware’s renewal and the promotion becomes more convenient.

        (2) data volume of goods handled meets the USB agreement requirements completely, may provide the enough port, the buffer and the transmission speed to the user; Provides the USB agreement request the complete four transmission mode (control transmission, interrupt transmission, batch transmission and synchronized transmission), may satisfy the user to various types type number according to the transmission demand.

        (3) piece on serial interface processor (SIE) completes the majority of USB agreement operation, enables the user to be possible to get rid of the complex agreement detail, simplified the user disposition code, sped up the performance history.

        in (4) inlays the enlargement mode 8051 processors, compatible 8051 command system; An instruction cycle only needs four clock cycles, may provide the standard 80,513 time of above handling abilities; Double data indicator, convenient block data removal; Uses internal RAM to take the data/program memory, the non-multiplying data/address bus, causes the program execution speed to be quicker, and it is simpler with the exterior component’s connection.

        (5) dormancy pattern may reduce the system power loss, lengthens component’s service life.

    AN2131Q function diagram as shown in Figure 1.

    The USB transceiver and the PC machine connection has four wires: 5V, GND, D , D-. Data by 12Mb/s full speed signal or by 1.5Mb/s low speed signal in D and on D holding wire difference transmission. The transceiver solidifies on the chip, does not need the exterior electric circuit, most only needs to use for to choose full speed or low speed on pulls the resistance.

    Serial interface engine (SIE) through a package of sorting, the signal has and the examination, CRC has and the verification, the NRZI data coding, the position packing as well as a package of marking produces and function blocks and so on decoding processes the USB communication protocol, and guaranteed that transmits to the USB electric cable’s on data byte by the LSB opening.

        AN2131Q uses on the general 8051 micro controllers and the piece RAM, its programming language is 51 series monolithic integrated circuit’s general purpose languages, the easy to operate.

    2 TMS320C54XX DSP and AN2131Q connection chip hardware connection 

        TMS320C54XX the DSP chip selects TI Corporation’s TMS320VC5409, TMS320VC5409 is the fixed-point DSP chip, it uses the improvement the Harvard structure, 8 level of stream line operations, the maximum speed may achieve 166MIPS.

        Chip use FIFO in an2131Q chip and TMS320C54XX between the DSP (First In First Out SRAM) the chip connection, may cause between the USB connection chip and the DSP maximum data exchange speed surpasses the USB main line’s speed, causes it not to become the data transmission the bottleneck, thus causes data transmission speed between DSP and main engine’s only receives the USB agreement limit.

         Because in an2131Q chip inlays 8 8051 processors, therefore uses two piece of 8 FIFO chips to realize between the USB connection and the DSP two-way communication. FIFO selects has 1K×9bit memory IDT72V02. First preserves from AN2131Q or the DSP transmission’s data in FIFO, then again reads by DSP or AN2131Q, thus causes the data the transmission not to be able to have the jamming situation, its hardware connection diagram as shown in Figure 2.

        Because selects FIFO only then the double-end data bus and the status signal, do not have the address bus, therefore DSP selects the I/O decoding method to visit FIFO. The FIFO status signal has free time (EF), half-full (HF) and full (FF), they are low effective. Uses these three signals to be possible reasonably to enhance FIFO very effectively the read-write efficiency. For example using HF, if its invalid, indicated that in the FIFO data has not achieved half-full, this time does not need to inquire FF to be possible to read in together the data to FIFO, so long as the block data size is equal to or is smaller than FIFO capacity half, FIFO will definitely not flood. This may enhance FIFO greatly the writing speed.

    3 TMS320C54XX DSP chip and AN2131Q chip software connection 

        AN2131Q chip and TMS320C54XX between DSP chip software connection including four parts: AN2131Q writes, AN2131Q to FIF01 to read, DSP to FIF02 to read, DSP to FIF01 to FIF02 writing. In order to describe conveniently, is known as the FIF01 three condition letter it is: EF1, HFl and FF1, are called the FIF02 status signal EF2, HF2 and FF2.

    3.1 AN2131Q writes FIF01 

        When on the USB main line has the data must transmit to DSP, AN2131Q inquires HFl. If HFl is invalid, AN2131Q one time reads in a data packet to FIF01. Wraps the size to be smaller than or be equal to the FIF01 capacity half, write when each byte cannot inquire FFl again.

    3.2 DSP reads FIF01 

        DSP each time reads a person data packet from FIF01. Reads a byte before every time, DSP needs to inquire EFl, only then, when EFl invalid (FIF01 not spatial), DSP only then possibly carries on reads the operation.

    3.3 DSP writes FIF02 

        When DSP has the data must transmit to the main engine, DSP the data pack, each time to FIF02 in reads in a package of data. The method writes FIF01 with AN2131Q, but the DSP inquiry’s signal is HF2. After finishing a package, DSP sent a signal of stop to AN2131Q, DSP when wrote down a package of data must wait for AN2131Q the reply. An2131Q reply’s method is interrupts DSP using DSP external interrupt INTl.

    3.4 AN2131Q reads FIF02 

        AN2131Q receives the signal of stop which DSP sends out, after replying DSP, reads a person package of data from FIF02, does not need to inquire EF2 again.

    3.5 data packet form 

    Each data packet by Baotou and the data two parts of constitutions, as shown in Figure 3. Baotou length is a byte, indicates by the byte (does not contain Baotou) for a unit package of data the length. In package’s data must be short in or is equal to 64 bytes, namely the maximum package total length is 65 bytes.

    Baotou

    Data 

    Figure 3 data packet form

    3.6 DSP interrupts AN2131Q the method 

    Sends a negative pulse through the operation control word to AN2131Q, drops along effectively, succession request as shown in Figure 4.

    3.7 DSP reads the FIFO condition 

        The method one is DSP through reads I/0 address OXXX X010b to be possible to obtain status signal EFl and HF2. The method two are DSP through sets at TMS320VC5409 in the condition register STl XF position, from the BIO pin gain status signal. When XF sets at 1, the BIO pin reflects HF2 the level, when XF sets at 0 reflects EFl the level.

    4 AN2131Q chip driver realization 

        A AN2131Q chip’s characteristic is can defer to individual need to adopt “downloading” and “enumerates again” dynamic changes the equipment performance. An2131Q chip interior will have unmodifiable memory cell depositing unique proxy number (VID) and product number (PID), VID/PID will bind in main engine’s some device driver, but this driver’s only duty will be to an2131Q downloading procedure code.

        The user need compiles three procedures to realize the USB equipment’s use. - is responsible for the USB connection calling program, uses in PC machine the recognition USB equipment; Another is installs USB the information file, uses to USB equipment’s some explanations; Third is an2131Q use procedure, uses to the data transmission. Below gives some simple explanations separately to these three procedures.

    4.1 are responsible for the USB connection calling program 

        Cypress provided has manufactured this procedure the template. First, 16 enters the KEIL51 translation production the system file conversion for to be possible to read in USB RAM the binary file. Then beats this binary file in the person template, transfers DDK (Device Driver Kit), carries on the translation under the DDK environment to the template, the production driver system file. USB (General Purpose Driver) realizes the upper formation software and the USB correspondence through GPD. GPD provides one kind of user pattern the contact surface, completes the USB equipment’s request and the data transmission. In the Cypress development tool bag provided it to develop kneading board’s source program, but it developed kneading board’s design is based on GPD. This causes the exploiter under the example procedure direction, can compile the application software which fast uses in corresponding. The GPD design concept is serves the common user, its connection function has the versatility. Connection function prototype which provides through GPD, may realize each kind of USB operation. Including realizes is responsible for the USB equipment’s request (i.e. turn on the USB equipment); Is responsible for USB the I/O mouth control; Through changes IOCTL (I/O Control Code) to realize each kind of operation.

    4.2 install USB the information file 

        Installs the document the duty is binds the driver document to specific VID/PID. Mainly explained that which document is responsible for the USB connection calling program, which document is the document which AN2131Q needs to download. Crypress Corporation provided standard USB to install the information file. However the user also needs to the USB equipment’s description (including information and so on explanation, edition number, date, producer) to add to installs in the information file.

    4.3 AN2131Q use procedure 

        An2131Q use’s procedure is after PC machine found the USB equipment downloaded to an2131Q chip in the procedure, this procedure realized AN2131Q to FIFO and the USB connection monitoring and the read-write data. Because this document involves to the lower level hardware’s connection, is impossible to provide the general template, needs user to compile.

    Share/Save/Bookmark

    Thursday, November 13th, 2008 at 08:09
No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

TOP
Copyright © 51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Powered by WordPress | Theme by mg12 | Valid XHTML 1.1 and CSS 3