View previous topic :: View next topic |
Author |
Message |
akhter900
Joined: 07 Jun 2009 Posts: 8
|
HidLibrary.dll problem for C# and PIC18F4550 usb interface |
Posted: Wed Jul 08, 2009 3:24 am |
|
|
Hi........
I am facing some problems to read data from PIC18F4550 through USB. I am using C# express edition and HidLibrary.dll. As for firmware I am using CCS compiler.
Anyone please help me to read USB packet using C#?
Also let me have a good documentation about this.
Here is my sample code.... (not working)
Code: |
HidDevice myDevice;
HidDeviceData myData;
public bool initialize();
public String read_data()
{
myData = myDevice.Read();
return myData.Data[0].ToString();
}
|
The program stopped at myDevice.Read(); and can not read.
I am eagerly expecting your help.
Akhter
Last edited by akhter900 on Thu Jul 09, 2009 9:41 pm; edited 1 time in total |
|
![](templates/subSilver/images/spacer.gif) |
akhter900
Joined: 07 Jun 2009 Posts: 8
|
|
Posted: Wed Jul 08, 2009 9:17 pm |
|
|
No one is here to help me !!!!!
Just give me some idea to do the job please. |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Jul 09, 2009 12:13 am |
|
|
Download the CCS USB software package here:
http://www.ccsinfo.com/compilerupdates.php
There's a button for it. You need to have a current maintenance
contract with CCS to be able to download it.
They have a Windows application that talks to their Ex_usb_hid.c
firmware for the 18F4550.
Here's the directory in the USB package:
- HIDDemo Source
It's written in Delphi, but you can study it and see how CCS talks
to their HID example firmware. |
|
![](templates/subSilver/images/spacer.gif) |
akhter900
Joined: 07 Jun 2009 Posts: 8
|
|
Posted: Thu Jul 09, 2009 9:45 pm |
|
|
hie..........
Thanks a lot.
I just did a silly mistake. offfff......... It was a pain of my [spam].
..........
#define USB_EP1_TX_SIZE 2 // I defined 1 except 2........oh!!
..........
usb_put_packet(1, out_data, 2,USB_DTS_TOGGLE);
..........
Any way.........
Its working so well.
Thanks GOD.
Good bye |
|
![](templates/subSilver/images/spacer.gif) |
Atif_Mehmood
Joined: 02 Jun 2012 Posts: 1
|
|
Posted: Sat Jun 02, 2012 6:52 am |
|
|
Hi,
Could you please share with me the code for pic and VB. |
|
![](templates/subSilver/images/spacer.gif) |
akhter900
Joined: 07 Jun 2009 Posts: 8
|
|
Posted: Fri Jun 29, 2012 8:13 am |
|
|
Hello,
Actually I was using c#.net. Please be specific if you are facing any problem.
Thanks. |
|
![](templates/subSilver/images/spacer.gif) |
|