Microchip (TM) PICKit 2 USB Driver, HID attachment?

Hunting for resources to program PIC embedded microcontrollers on macs, ran into microchip's way cheap PICKit 2 USB programmer:
http://microchip.com/stellent/idcplg?IdcService=SSGETPAGE&nodeId=1406&dDocName=en023805

They publish the source and Xcode project for an unsupported Mac tool that drives the PICkit 1 usb programmer from userland
http://www.aeria.net/pub/PICkit2dev.zip
however, after building it, changing the usbProduct #define to reflect the new device and tracing the output I'm finding that all writes to the device fail becuase something else claimed the programmer endpoints in exclusive mode usb
usb io trace follows (can provide buckets of debugging on request):
Timestamp Lvl Message
--------- --- --------------------------------------
3.822 [1] [0x2e15c00]::start - USB HID Interface #0 of device PICkit 2 Microcontroller Programmer @ 2 (0x19100000)
3.837 [1] IOUSBInterface[0x1a25100]::handleOpen failing because super::handleOpen failed (someone already has it open)
3.837 [1] IOUSBInterface[0x1a25100]::open super::open failed (0x0)



The Questions:
Has someone allready done this? For this device? Which device does it work on?
Why did microchip call a chip programmer a HID device?
Why did the apple HID framework attach the device when it has no HID compliant controls?
Can I get the Apple HID controls to release the programmer or not to attach at all?
(or) I have to write a kext/driver stack to match the vendor/product/model exactly to force the point?


Background:
This project would enable high visibility robotics and educational applications that permit interfacing robotics and telematics with high level programming. (RE: build your own robot to enter a contest or collect your socks). The programmer downloads machine code to little embedded computers (PIC chips) that you can then instruct it to perform neat things that may earn you sex appeal or peer acclaim in the correct circles.

Many Macs Mac OS X (10.4.3)

Posted on Dec 1, 2005 12:43 PM

Reply
1 reply

Jan 6, 2006 7:28 PM in response to ashfixit

The Questions:
Has someone allready done this? For this device? Which device does it work on?

I don't know.

Why did microchip call a chip programmer a HID device?

It is one of the easiest ways to implement a simple USB device. Whether it has buttons, wheels or indicators on it is irrelevant. It can be something other than a mouse or keyboard.

Why did the apple HID framework attach the device when it has no HID compliant controls?

The device presumably declares itself to be a HID class device. Therefore it gets the HID driver.

Can I get the Apple HID controls to release the programmer or not to attach at all?
(or) I have to write a kext/driver stack to match the vendor/product/model exactly to force the point?

Yes. You need a "codeless kext" to match vid/pid of the device. The basic idea is to make a "driver" with no executable, so the system's kernel HID driver doesn't match against the device. This gives your userland driver a chance.

See lists.apple.com and search the USB development list for more.

hope this helps, Stuart

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Microchip (TM) PICKit 2 USB Driver, HID attachment?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.