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

Search found 13 matches
CCS Forum Index
Author Message
  Topic: Select adc channel pic18f2458
andreahmed

Replies: 2
Views: 14625

PostForum: General CCS C Discussion   Posted: Thu Dec 10, 2020 5:16 pm   Subject: Select adc channel pic18f2458
Hello,
I configured PIC18F2458 as analog input from A0 to A9 which is

#define AN0_TO_AN9 0x05 // A0 A1 A2 A3 A5 B2 B3
How do I select channel B2, B3 ?
  Topic: USB Joystick PIC18F2458
andreahmed

Replies: 16
Views: 55268

PostForum: General CCS C Discussion   Posted: Thu Dec 10, 2020 5:09 pm   Subject: USB Joystick PIC18F2458
I finally DID IT,
MANY THANKS

const char USB_CLASS_SPECIFIC_DESC[] = {
0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
0x15, 0x00, // Logical Mi ...
  Topic: USB Joystick PIC18F2458
andreahmed

Replies: 16
Views: 55268

PostForum: General CCS C Discussion   Posted: Thu Dec 10, 2020 4:57 pm   Subject: USB Joystick PIC18F2458
I have made very good progress.

Now I can make two throttles, but once when I add X, Y axis, the USB is not recognized at all:

0x05, 0x01, // Usage Page (Generic Desktop Ctrls&# ...
  Topic: USB Joystick PIC18F2458
andreahmed

Replies: 16
Views: 55268

PostForum: General CCS C Discussion   Posted: Thu Dec 10, 2020 2:41 pm   Subject: USB Joystick PIC18F2458
here is full code

const char USB_CLASS_SPECIFIC_DESC[] =
{
0x05, // 0
0x01, // USAGE_PAGE (Generic Desktop) ,1
0x15, ...
  Topic: USB Joystick PIC18F2458
andreahmed

Replies: 16
Views: 55268

PostForum: General CCS C Discussion   Posted: Thu Dec 10, 2020 2:19 pm   Subject: USB Joystick PIC18F2458
I made this descriptor

0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x09, 0x04, // USAGE (Joystick)
0xA1, 0x01, // COLLEC ...
  Topic: USB Joystick PIC18F2458
andreahmed

Replies: 16
Views: 55268

PostForum: General CCS C Discussion   Posted: Thu Dec 10, 2020 11:50 am   Subject: USB Joystick PIC18F2458
I used the tool, I showed you a descriptor that I want to use.
I fed up with this actually :(
  Topic: USB Joystick PIC18F2458
andreahmed

Replies: 16
Views: 55268

PostForum: General CCS C Discussion   Posted: Thu Dec 10, 2020 9:07 am   Subject: USB Joystick PIC18F2458
I'm getting crazy, I tried EVERYTHING to make it recognize as joystick, it never does. please help Embarassed
  Topic: USB Joystick PIC18F2458
andreahmed

Replies: 16
Views: 55268

PostForum: General CCS C Discussion   Posted: Thu Dec 10, 2020 8:41 am   Subject: USB Joystick PIC18F2458
here is modified descriptor as your suggestions
still doesn't work as joystick



const char USB_CLASS_SPECIFIC_DESC[] =
{
0x05, 0x01, // USAGE_PAGE &# ...
  Topic: USB Joystick PIC18F2458
andreahmed

Replies: 16
Views: 55268

PostForum: General CCS C Discussion   Posted: Thu Dec 10, 2020 8:33 am   Subject: USB Joystick PIC18F2458
char ReportDescriptor[38] = {
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x09, 0x04, // USAG ...
  Topic: USB Joystick PIC18F2458
andreahmed

Replies: 16
Views: 55268

PostForum: General CCS C Discussion   Posted: Thu Dec 10, 2020 8:31 am   Subject: USB Joystick PIC18F2458
I stayed two days 18 hours, please help Smile
  Topic: USB Joystick PIC18F2458
andreahmed

Replies: 16
Views: 55268

PostForum: General CCS C Discussion   Posted: Thu Dec 10, 2020 6:22 am   Subject: USB Joystick PIC18F2458
Thanks so much for your help!

Here is the changes:

#include "C:\Users\xgame\Desktop\New folder\main.h"
#include <pic18_usb.h>
#include <usb_desc_hid.h> //USB Config ...
  Topic: USB Joystick PIC18F2458
andreahmed

Replies: 16
Views: 55268

PostForum: General CCS C Discussion   Posted: Thu Dec 10, 2020 3:10 am   Subject: USB Joystick PIC18F2458
please help :(
  Topic: USB Joystick PIC18F2458
andreahmed

Replies: 16
Views: 55268

PostForum: General CCS C Discussion   Posted: Wed Dec 09, 2020 2:46 pm   Subject: USB Joystick PIC18F2458
Hello,

I'm trying to write a USB Descriptor for Joystick with throttle and X,Y Axis.

But it never gets recognized as USB Joystick.

Please help Smile



const char USB_CLASS_SPECIFIC_DESC& ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group