This article introduced that uses the low cost PIC micro controller to connect USB through the USB2.0 full speed bridge chip to dodge saves of design method the plate, it focuses on the PIC micro controller and VNC1L intelligence USB the Host bridge chip the embedded connection hardware design, as well as explained how to carry on the procedure development in the PIC micro controller, causes the universal existence USB to dodge saves the plate to be able to take the dismantle-like storage media in the widespread embedded application.
Background synopsis
The USB installment nearly is today omnipresent, in the market condition floods all kinds of USB to dodge saves the plate and each kind of USB peripheral unit, because these installments mostly belong to USB Slave, the application domain also limits in the PC market. Recently USB dodges saves plate’s price to fall fast, does the stimulation new thingses’ application, how use USB on the original product to dodge saves the plate to become many company’s difficulties. The wish increased USB Host in 8 and 16 micro controllers the function, the design process, the cost and the power loss has then become the important consideration factor. The partial reason comes from this kind of system use embedded controller, at present still lacked the suitable connection, the resources, as well as the efficiency links USB the Host controller.
In this application model, will do take Vinculum VNC1L intelligence USB Host bridge IC as an example, explained how to increase USB for central controller PIC16F688 2.0 full speed to link the port. Enables this system to link USB to dodge saves the plate, and can in consume under the least design time and the resources completes the design.
VNC1L synopsis
VNC1L is the Vinculum family’s first chip. This intelligence USB the Host bridge uses the guest makes the processor, and matches two acceleration data transmission the direct memory to deposit and withdraw the (DMA) engine and a 32 figure value coordination processor, achieves the highest file operation efficiency -, and complete conformity in built-in 64Kbyteflash, as well as 4Kbyte in internal data SRAM sole chip. The Vinculum family locks the embedded USB controller market, this kind of product only needs the few exterior support module. One of Vinculum family core’s main features, is its procedure word length obvious realizes this function code length short in the common micro controller, but after reducing the kernel program code the resources, might enable multi-purpose to be able the info clerk to the chip internal e-Flash memory. VNC1L may process the entire USB agreement and in constructs 12MHz to the 48MHz clock. These characteristics form by chance with the PIC embedded system supplementary. Figure construction of the 1 system explained for this reason that it links a small PIC16F688 micro controller and USB Type using VNC1L “A” the connector, then may connect USB to dodge saves the plate.
Design notes
This PIC16F688 is the central controller, by its general I/O pin (on 9, 10, 11 pin’s RC1, RC0, RA2) obtains the sensor or other origin data, and transforms the data format, and will string together the class formatted data to read in USB to dodge saves in plate’s document, the instruction and the data are (6 pins) transmit through TXD to VNC1L RXD (32 pins). VNC1L may process the FAT 12/16/32 filing system and store up in USB dodges saves plate’s data. VNC1L dodges through 28th needle foot’s USB2DP and 29th needle foot’s USB2DM and USB saves the plate to carry on the communication. Through the same pin, the data can dodge from USB saves takes inventory to take, and (31 pins) transmits from VNC1L TXD to PIC RXD (5 pins), supplies the PIC procedure use.
On the PIC16F688 programmed control overall system, in addition, the command control which sends out by PIC16F688 its and between the VNC1L transmission work. The VNC1L standard program will explain and carries out from the PIC16F688 instruction. The above is only systematic introduced simply, if wants to complete entire design also need more resources, but these modules must the power source, control clock’s quartz crystal as well as the programming.
In utilization PIC 2nd with the 3rd needle foot’s 20 MHz crystal, enables the UART connection to achieve compared to 115200 bit/s higher baudrates (baud rate), is opposite in uses the internal 8MHz oscillator to be highest can only achieve 9600 bit/s, therefore its can the lift system efficiency. The PIC procedure pin simulates RC2 and RC3 the I/O RTS/CTS to come and the VNC1L UART connection connection.
This time, the system needs 5 volt/250mA the fixed power sources, “A” the connector provides the 200mA electric current regarding USB, and is VNC1L provides the 25mA electric current, another 25mA electric current uses to supply power PIC16F688. VNC1L requests 3.3 volts voltages by 3.3v LDO manostat supply, still had the compatible 5 volt IO mouth, can cause its connection to PIC, but does not need the electric potential cut.
In view of low power loss application, VNC1L when does not use can cut to the 2mA dormancy pattern. If wants to awaken this module, then may detect the (RI) pin through the UART connection bell (38 pins) to achieve; If its has connected to the RXD line, like in the chart shows, then may awaken this module through the connection pseudo-instruction.
This design contains a bi-color condition LED indicating lamp similarly, it supplies power by 16 and 18 pins. When succeeds registers USB dodges saves the plate and the deposit filing system, the system will then propose the demonstration.
VNC1L procedure
The VNC1L internal solidification has the standard procedure, named VDAP (Vinculum Disk and Peripheral), this procedure can explain the instruction which transmits from PIC. These instruction similar DOS instruction, like DIR, RD, as well as WR and so on. The set of instructions also supports the sole byte the hex instruction, suits by the microprocessor carries on the control.
But includes in PIC in the procedure the VDAP instruction may use for to control USB to dodge saves plate’s deposit work. The typical instruction order to establish the document, to read/writes the data to the document, afterward close file.
VNC1L and PIC procedure development
This design includes two fever to record the procedure the attachment, each attachment supports the development environment which separately the component needs. In the product design environment, each component may before welding the printed wiring board to burn in advance the record, therefore cannot attach and jumpers.
In the normal operation pattern, J1 and J2 receive on, other jumpers should for the opening condition. VNC1L when the fever records needs detachment J1 and J2 jumpers, isolates VNC1L UART the input end and the PIC out-port. Afterward shuts off 5 volts power sources first, then links the TTL-232R-3V3 line to H2. Through already the VPROG procedure tool which installs, links PC line’s USB end, afterward joins J4 jumper, directs the angle VNCL1A PROG# to pull lowly, lets J3 short-circuit temporarily by supposes the component again, and cuts to the fever records the pattern. After completing the fever record, and please jumpers hypothesis reply to operation pattern.
The PIC fever records the attachment to link to component’s RA0, RA1, as well as the MCLR# pin, 5 volts fever record the voltage/power source through the attachment transmission to the module. After treating shuts off 5 volts power sources, again to the PIC micro controller carries on burns the record. The attachment should link to like standard PIC development environments and so on PICKit2, in order to using Microchip debugging with downloading tool.
FTDI (http://www.vinculum.com/projects/SampleCsource.zip) has provided a PIC model procedure in the website. In this C model procedure, PIC will wait for that USB dodges saves the plate to detect, then opens named hello.txt the file. “Hello World” the string of character as well as will line feed the instruction-code and line the feed character will be read in the document, after treating the close file, USB will dodge saves the plate then to be possible the detachment.
Conclusion
FTDI Vinculum VNC1L is intelligence USB which easy to use easily, to design the Host bridge, causes the low cost micro controller to be possible to increase USB easily 2.0 low/full speed USB connections. In the power source aspect, Vinculum VNC1L only increases in the USB connection is short in 10% consumptions. The similar DOS set of instructions, enables the transmission the data to carry on the compilation in the micro controller environment with to debug easily, follows the simple hardware peripheral greatly to lighten engineer’s burden, provides a USB master control end design proposal for the embedded system no longer is a difficult work. This causes the low cost, high popular rate USB to dodge saves the plate to be able to take system’s storage media, and can provide function of the field upgrade software. In this article discusses outside the scope, what as soon as is worth supplementing raises, besides the high-capacity storage device, VNC1L can also use for to link many other USB peripheral unit.
Document of the VDAP procedure and the description complete set of instructions, please download (http://www.vinculum.com) by the FTDI Vinculum website.
