PORTS Forum

Ports and Interfaces => USB => Topic started by: mostafaewaiha on May 24, 2010, 02:03:45 pm

Title: USB mass storage
Post by: mostafaewaiha on May 24, 2010, 02:03:45 pm
Dear Mrs Jan

Now I wanna program the PIC18F4550 as USB slave mass storage , can I use C or C18 ?

--- I don't know C18

Thanks

Title: Re: USB mass storage
Post by: Jan Axelson on May 24, 2010, 02:17:47 pm
Microchip provides the MPLAB C18 compiler for the PIC18F4550. The Microchip Applications Library includes a mass-storage device example:

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en547784

Jan
Title: Re: USB mass storage
Post by: Lubna on May 27, 2010, 01:39:08 am
hy sir
cn u hlp me I wan that my controller 18F4550 send a string to my application that is bulit in VB .but i cnt undrstnd how i write particular code in Vb for the purpose mentioned above
plz plz plz
help me
thnx!!!
Title: Re: USB mass storage
Post by: Jan Axelson on May 27, 2010, 10:09:54 am
If your device is mass storage, use the File class to access it.

For HIDs, I have Visual Basic example code here:

http://www.janaxelson.com/hidpage.htm

and for WinUSB devices, here:

http://www.janaxelson.com/winusb.htm

For HIDs and WinUSB, accessing a device is more complicated than just reading and writing to port addresses. The application has to find the device, open a handle, and jump through a few hoops before it can start exchanging data. The other links on my pages can help in understanding how the code works.

Jan