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 CCS Technical Support

USB HID PIC18F4550

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



Joined: 25 Aug 2013
Posts: 28

View user's profile Send private message

USB HID PIC18F4550
PostPosted: Tue Nov 11, 2014 2:37 pm     Reply with quote

I want to use ccs to make an HID circuit, in which I can turn on/off a led by sending 1 or 0. I already have this circuit working, but through serial port, now I want to make it HID, and I want it to work under windows and linux.
Please let me know if this is possible and please give me some code, because I'm a beginner and I don't know where to start.
Thanks!

I want to know if It's possible to code an application in ccs, that uses the com port, and sends a 1 to turn on a led and a 0 to turn it off, and that it also works on linux?
Please give me some code.
Thanks!
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Nov 11, 2014 2:45 pm     Reply with quote

Try using the 'search' feature of this forum !!
You will find code others have created both in this forum and the 'code library'.
As well, CCS does supply several USB examples, located in the 'examples' folder.
note: Hopefully you know the difference between a binary '0' and an ASCII '0'.


hth
jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Wed Nov 12, 2014 2:19 am     Reply with quote

Seriously just use the serial port code.

This works well under Linux, and Windows, so why try to go HID if you don't have to?.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Nov 12, 2014 1:09 pm     Reply with quote

nando88,
You have a huge thread in the forum archives which is all about turning
an LED on/off with USB. Here it is (this is a 4-page thread):
http://www.ccsinfo.com/forum/viewtopic.php?t=52722
That's about CDC.

I see you want HID. This post has a walkthrough of CCS's ex_usb_hid.c
demo program:
http://www.ccsinfo.com/forum/viewtopic.php?t=38897
The hiddemo.exe program (and other files required for it) used to be
freely downloadable on the CCS website. I don't know why they took it
off. But you can find it with a web search.
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Wed Nov 12, 2014 5:48 pm     Reply with quote

Hi,

If you are familiar with Visual Basic, I have a demo program I wrote to exercise the HID USB interface. You could use it as a starting point for the PC side of things.

I'm traveling now, however, and won't be back in the office until Monday.

John
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