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 from Jan Axelson's websit

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



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

USB from Jan Axelson's websit
PostPosted: Wed Jan 12, 2005 10:36 am     Reply with quote

I used the following example for usb development

http://www.lvr.com/hidpage.htm#MyExampleCode
Host
[quote]
Visual C++ 6 code for communicating with custom HIDs, Version 2
Usbhidioc2 is an improved version of my usbhidioc code for Visual C++ (below). The biggest change is that the code uses overlapped I/O to read from the device. If the device isn't responding, the application can regain control and try again or close communications with the device. Tested on Windows 98 SE, Windows 2000, and Windows XP. Other enhancements and minor corrections too.
[\quote]

Fireware
Quote:

HID code for the PIC16C745
Firmware for the PIC16C745/765 to enable using my hidvb and usbhidioc software. From Microchip. For more PIC advice, see USB Device Development Notes from Alan Macek and USBDemo.
I program the 16f745 using the downloaded Jademo.hex file

and used a 24Mhz crystal, with connection circuit similiar to
http://www.alanmacek.com/usb/index.html

but my host window showed the following message
Quote:

***HID Test report***
Device not detected
SetupDiDestroyDeviceInfoListThe Operation completed successfully


what caused the problem, did I follow the direction wrong?

Thank you
Guest








PostPosted: Wed Jan 12, 2005 12:34 pm     Reply with quote

When I plug the usb into the host, the following error msg occured, How to solve this problem?
Quote:

An error occurred during the installation of the device.
The installation failed because a function drive was not specified for this device instance.
hillcraft



Joined: 22 Sep 2003
Posts: 101
Location: Cape Town (South africa)

View user's profile Send private message Send e-mail Visit poster's website

Wrong crystal
PostPosted: Thu Jan 13, 2005 12:31 am     Reply with quote

You must use a 6MHz crystal - The chip multiplies it to 24MHz.

Take a close look at the circuit diagram on Alan Macek's website
young



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

PostPosted: Thu Jan 13, 2005 7:49 am     Reply with quote

thank you hillcraft:

When I load the Jademo.hex into programmer, the fuse area (OSCILLATOR) is HS with 4x pll, I could not understand what this means, When I check the datasheet of 16c745, it said HS-crystal/resonator (24 MHz), for a 6 Mhz crystal, it is define as E4 or H4, so I think I should use 24Mhz instead of 6Mhz, would you please explain this definition of the four oscilator EC, E4, HS, H4 and what kind of crystal should I use?


Thank you
young



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

PostPosted: Thu Jan 13, 2005 9:30 am     Reply with quote

Iused another program which is ex_usb_hid.c from the CCS example file, this one use HS as the oscilator fuse. and I used a 24Mhz oscilator, on the serial monitor, I can see it continuously send data through usb port, but when I run the usbhidioc.exe program, the same msg ocured, as not device detected. ex_usb_hid send two bytes and receives two bytes as usbhidioc is doing but I could not see anything happeded in the software, why it can not detect the HID I build?


help please.
young



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

PostPosted: Thu Jan 13, 2005 9:50 am     Reply with quote

I think may be I need to change Vendor ID and product ID, but, how can I know my chip's ID if I am using ex_usb_hid.c
Guest








PostPosted: Thu Jan 13, 2005 5:10 pm     Reply with quote

How message and package are defined?
hillcraft



Joined: 22 Sep 2003
Posts: 101
Location: Cape Town (South africa)

View user's profile Send private message Send e-mail Visit poster's website

Vendor and product ID
PostPosted: Sat Jan 15, 2005 1:04 pm     Reply with quote

I found that if your descriptor tables etc. were set up incorrectly, and Windows enummerated the device, that it remembered the setup. The effect of this is that you may end up wasting a huge amount of time fiddling with the code, and possible correcting it, but Windows does not realize that it should recreate or reload the driver. The only way around it is to either kill the information from the registry, or to continually change the ID. I spent many many wasted hours until I figured this one out... Embarassed
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