CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

HidLibrary.dll problem for C# and PIC18F4550 usb interface

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
akhter900



Joined: 07 Jun 2009
Posts: 8

View user's profile Send private message Yahoo Messenger

HidLibrary.dll problem for C# and PIC18F4550 usb interface
PostPosted: Wed Jul 08, 2009 3:24 am     Reply with quote

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
akhter900



Joined: 07 Jun 2009
Posts: 8

View user's profile Send private message Yahoo Messenger

PostPosted: Wed Jul 08, 2009 9:17 pm     Reply with quote

No one is here to help me !!!!!

Just give me some idea to do the job please.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jul 09, 2009 12:13 am     Reply with quote

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.
akhter900



Joined: 07 Jun 2009
Posts: 8

View user's profile Send private message Yahoo Messenger

PostPosted: Thu Jul 09, 2009 9:45 pm     Reply with quote

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
Atif_Mehmood



Joined: 02 Jun 2012
Posts: 1

View user's profile Send private message

PostPosted: Sat Jun 02, 2012 6:52 am     Reply with quote

Hi,
Could you please share with me the code for pic and VB.
akhter900



Joined: 07 Jun 2009
Posts: 8

View user's profile Send private message Yahoo Messenger

PostPosted: Fri Jun 29, 2012 8:13 am     Reply with quote

Hello,

Actually I was using c#.net. Please be specific if you are facing any problem.

Thanks.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group