The Godfather talking
Share your stuff or I will make you regret it.
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 20, 2024, 12:16:46 12:16


Login with username, password and session length


Pages: [1]
Print
Author Topic: USB Driver for PIC18F4550  (Read 26058 times)
0 Members and 1 Guest are viewing this topic.
xane
Newbie
*
Offline Offline

Posts: 9

Thank You
-Given: 6
-Receive: 2


« on: January 10, 2008, 09:25:43 09:25 »

Hi,

I am looking for some tutorials/help on writing USB device driver for PIC18F4550 based board.

The tools I prefer is VB6, C#, VB.net

If someone knows the links would be helpfull for me

regards

xane

Logged
lyk
Newbie
*
Offline Offline

Posts: 12

Thank You
-Given: 14
-Receive: 6


« Reply #1 on: January 10, 2008, 10:44:06 10:44 »

Look on http://www.microchip.com
Logged
memed500
Guest
« Reply #2 on: January 10, 2008, 11:58:36 11:58 »

http://www.create.ucsb.edu/~dano/CUI/
http://www.microchipc.com/sourcecode/
Logged
setoy
Newbie
*
Offline Offline

Posts: 20

Thank You
-Given: 10
-Receive: 11


« Reply #3 on: January 10, 2008, 12:03:40 12:03 »

IMHO, writing your driver (in VB!) if you haven't any experience with writing drivers is senseless and too heavy. On http://www.microchip.com you will find nothing, look on microsoft -> MSDN -> DDK. But better way, use someone of microchip otr CCS drivers or libusb (open source USB driver)
Logged
J1M
Guest
« Reply #4 on: January 10, 2008, 02:22:31 14:22 »

Hi there, here you have articles that I´ve published on my webpage:

- PicWinUSB: PIC18F2550 USB Example with CCS, VC#, WinUSB, Win Vista & XP (x64 and x86 versions)
http://www.hobbypic.com/index.php?option=com_content&task=view&id=31&Itemid=1&lang=en

- PicUSB: PIC18F2550 USB Example with CCS, VC#, MCHPUSBAPI, Win XP & 98
http://www.hobbypic.com/index.php?option=com_content&task=view&id=14&Itemid=27&lang=en

- PicUSBNut: PIC18F2550 USB Example with CCS, VC#, MCHPUSBAPI, Win XP & 98
http://www.hobbypic.com/index.php?option=com_content&task=view&id=23&Itemid=27&lang=en

- PicUSB Stuff: PIC18F2550 USB Example with CCS, VC++, VB, Delphi, Labview and Linux, MCHPUSBAPI
http://www.hobbypic.com/index.php?option=com_content&task=view&id=24&Itemid=1&lang=en


Best regards
Logged
xane
Newbie
*
Offline Offline

Posts: 9

Thank You
-Given: 6
-Receive: 2


« Reply #5 on: January 11, 2008, 05:48:52 05:48 »

IMHO, writing your driver (in VB!) if you haven't any experience with writing drivers is senseless and too heavy. On http://www.microchip.com you will find nothing, look on microsoft -> MSDN -> DDK. But better way, use someone of microchip otr CCS drivers or libusb (open source USB driver)
Hi I am not quite looking to write a driver (in vb or ..) from scratch, rather I am looking for generic (USB-Serial kind of) code/driver in which i can change PID/VID to identify my own device then use simple data transfer like serial port.
Logged
setoy
Newbie
*
Offline Offline

Posts: 20

Thank You
-Given: 10
-Receive: 11


« Reply #6 on: January 11, 2008, 12:56:14 12:56 »

It's different Smiley In this case I really  recommend you libusb. http://libusb.sourceforge.net/. It's simple, cross-platform and stable universal driver
Logged
shibuv
Newbie
*
Offline Offline

Posts: 30

Thank You
-Given: 0
-Receive: 7


WWW
« Reply #7 on: January 14, 2008, 09:28:37 09:28 »

See this one

http://electronicfr.com/index.php/Microcontrollers-and-USB/Part-1-How-to-build-a-USB-device-with-a-PIC-18F4550-or-18F2550.html
Logged
fb2007
Guest
« Reply #8 on: January 15, 2008, 11:14:11 11:14 »

Hi, after some "tries and errors" i used the following components to have a working USB-communication between a PIC18F4550 and my PC:
- MikroC for the PIC
- HIDLIBRARY.DLL from Mike Obrian
- Visual Studio 2005

i had to fight a little bit with the documentation... but in the end the following code did the trick:
- Exchange data with my USB device:

Private Sub ReadInternalADC()

        Dim InputData As HIDLibrary.HidDeviceData
        Dim i As Integer
        Dim OutputText As String
        Dim uInput As Integer


        '--> Enumerate the devices with the Vendor Id
        '--> and Product Id of the DDS Stuff
        HidDeviceList = HIDLibrary.HidDevices.Enumerate(&H1235, &H1)

        If HidDeviceList.Length > 0 Then

            HidDevice = HidDeviceList(0)

            '--> Check if connected...

            HidDevice.OpenDevice()

            Dim OutData As Byte()

            ReDim OutData(HidDevice.Capabilities.OutputReportByteLength - 1)


            '--> Send a report to Device (8888888 is command to PIC to answer with data..)

            OutData(1) = Asc("8")
            OutData(2) = Asc("8")
            OutData(3) = Asc("8")
            OutData(4) = Asc("8")
            OutData(5) = Asc("8")
            OutData(6) = Asc("8")
            OutData(7) = Asc("8")
            OutData(Cool = Asc("8")

            HidDevice.Write(OutData)
            InputData = HidDevice.Read
            OutputText = ""

            For i = 1 To 5
                OutputText = OutputText + Chr(InputData.Data(i))
            Next

            uInput = Int((Val(OutputText) * 4.7 / 1.024) + 0.5)    ' convert Text answer (ADC) to Voltage

        End If

    End Sub

have fun!
Logged
iphone
Active Member
***
Offline Offline

Posts: 168

Thank You
-Given: 115
-Receive: 10


« Reply #9 on: January 16, 2008, 04:00:58 16:00 »

can you share the complete code (schematic, mikroC source, hex and VC code )?

Thks
Logged
kathir
Junior Member
**
 Muted
Offline Offline

Posts: 35

Thank You
-Given: 1
-Receive: 7


« Reply #10 on: January 19, 2008, 01:02:06 01:02 »

Ihave developped with toools easyhid ,delphi
if u want mail me i will give all 
Logged
mnasabir
Junior Member
**
Offline Offline

Posts: 53

Thank You
-Given: 31
-Receive: 51


« Reply #11 on: January 19, 2008, 10:38:23 10:38 »

best source known to me , downloads master's conference 2007 CD from this site and read tutorial in it
Logged
iphone
Active Member
***
Offline Offline

Posts: 168

Thank You
-Given: 115
-Receive: 10


« Reply #12 on: January 21, 2008, 03:46:51 15:46 »

if u want mail me i will give all 

Yes, please share it over here, so anybody would be benefit !!! ... thanks for your kindness
my email ... [email protected].

Thanks mate.
Logged
incubus22
Newbie
*
Offline Offline

Posts: 25

Thank You
-Given: 23
-Receive: 4


« Reply #13 on: January 22, 2008, 04:49:55 04:49 »

Please also mail me your files. My email address: [email protected]

Thanks in advance!
Logged
BRANCA
Junior Member
**
Offline Offline

Posts: 84

Thank You
-Given: 127
-Receive: 68


« Reply #14 on: January 24, 2008, 10:51:00 10:51 »

Please also mail me your files. My email address:[email protected]
Thanks in advance!
Logged
actionstk
Guest
« Reply #15 on: January 26, 2008, 12:31:17 12:31 »

Thanks in advance!
Logged
strolch
Guest
« Reply #16 on: February 08, 2008, 04:43:10 16:43 »

I could send you the Source code of the PDFSUSB.exe. It a good bootloader and aplication Software from Microchip.
It's written in C++ 6.0 from Borland!

Greetings
Logged
mabd
Junior Member
**
Offline Offline

Posts: 71

Thank You
-Given: 13
-Receive: 16


« Reply #17 on: February 15, 2008, 04:45:51 16:45 »

microchip forum the usb section contains a lot of usefull material

Posted on: February 15, 2008, 08:40:08 08:40 - Automerged

here is the link

http://forum.microchip.com/tt.aspx?forumid=102

xiaofan and DarioG are good contributors
Logged
ata_tr
Inactive

Offline Offline

Posts: 6

Thank You
-Given: 28
-Receive: 2


« Reply #18 on: February 20, 2008, 10:30:38 10:30 »

I tried so much, but I could not manage to get my 18F2550 work properly.  Undecided
Logged
setoy
Newbie
*
Offline Offline

Posts: 20

Thank You
-Given: 10
-Receive: 11


« Reply #19 on: February 20, 2008, 03:42:12 15:42 »

... and what exactly tried??
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC