Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] PIC 18f620 interfacing with usb

Status
Not open for further replies.

td micro

Member level 5
Joined
Jun 26, 2012
Messages
86
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,929
Hi,
in our project, we are using 18f4620 controller.some information is saved in external eprom connected to this controller. i want to connect one pendrive (usb) to my board for collecting those data saved. (later, pendrive is connected to pc for display)
for that i have to interface one usb female connector with my pic controller.
how can i interface usb with 18f4620 ?
please help
 

in our project, we are using 18f4620 controller.some information is saved in external eprom connected to this controller. i want to connect one pendrive (usb) to my board for collecting those data saved. (later, pendrive is connected to pc for display)
for that i have to interface one usb female connector with my pic controller.
how can i interface usb with 18f4620 ?

The short answer is: you cannot interface a USB Device/Slave Class directly to a microcontroller which does not offer a USB Host Class interface, at least not without additional interface controller logic.

There are third party devices available to accomplish the task:

Vinculum Embedded USB 2.0 Host Controller

VNC2 - Vinculum-II Programmable USB 2.0 Host



However, in the long run you maybe better off selecting a microcontroller which offers a USB Host Class Interface, such as some of the PIC24s, PIC32s or ARM Cortex-Mx series.

You might also consider writing your data to a flash card, which can be interfaced using the SPI interface already available on the PIC18 utilized in your design. The flash card can then be accessed by a PC with a flash card USB Reader/Writer interface.
 

thank you for reply
i will buy one third party ic
 

thank you ...
i found USB to Serial TTL Converter with CP2102 while browsing. but it has male connector.so i cant connect pendrive with this.

can i use cp2102 ic for interfacing controller and usb female connector?
 

No, the CP2102 is a USB Device Class Controller, you need a USB Host Class Controller.

Specifically, the CP2102 implements a USB Device CDC Class interface, a virtual serial COM port. The key terms are Device and Host, the CP2102, a USB Device, requires a USB Host to interface, such as a PC.

A USB flashdrive is a USB Device Class Interface, therefore you need a USB Host Class Interface to which the USB flashdrive connects.
 
thank you verymuch...
this was new to me.
i will buy one USB Host Class Interface.

thank you
 

On another note:

You could use the CP2102 or FT232R to effectively allow your design to become a USB Device which could then download data directly to the PC without any need of a transfer media like the USB flashdrive.

Although you still might be better off replacing the PIC18F4620 with a PIC18 which offers a USB Device Class Interface, it maybe more cost effective.

- - - Updated - - -

Pickup a copy of Jan Axelson's USB Complete: The Developer's Guide, 5th Edition

Actually, if you can find a used copy of the fourth edition it would certainly be helpful.

USB Complete Fourth Edition : The Developer's Guide
 

Hi,

instead of USB host and pendrive..

maybe you could use an SDcard. This is easy to connect with SPI bus to almost any microcontroller.
But your microcontroller needs to control the FAT.

Klaus
 

I also previously suggested that option, reply #2:

https://www.edaboard.com/threads/335925/#post1432937

You might also consider writing your data to a flash card, which can be interfaced using the SPI interface already available on the PIC18 utilized in your design. The flash card can then be accessed by a PC with a flash card USB Reader/Writer interface.
 

@bigdogguru

sorry, i missed this.


Klaus
 

@KlausST

No problem.

@td micro

I just came across FTDI updated version of the VDrive, the VDrive3, which is preprogrammed with the firmware for reading/writing of USB flash memory devices:

FTDI VDRIVE3

FTDI VDRIVE3 Datasheet

Comes in a nice enclosure, provide UART or SPI to the MCU and is reasonably priced at $22 USD.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top