Microchip PICkit 2 MCU programmer is a low cost USB full speed
programmer for Microchip MCUs. Thanks to the open firmware
we have developed libusb based application (one C based and one
Python based using BitPim libusb wrapper) to control it under
Linux. It has dual configuration (HID and vendor specific).

There is still a problem with hotplugging PICkit 2. Often we need to
plug and unplug it several times in order to get it appeared in lsusb.

Regards,
Xiaofan Chen
http://groups.google.com/group/pickit-devel/


[EMAIL PROTECTED]:/etc/hotplug/usb$ uname -a
Linux ubuntu 2.6.10-5-k7 #1 Tue Apr 5 12:56:05 UTC 2005 i686 GNU/Linux

[EMAIL PROTECTED]:/etc/hotplug/usb$ dmesg
...
hiddev96: USB HID v0.01 Device [Microchip Technology Inc. PICkit 2
Microcontroller Programmer] on usb-0000:00:02.1-2
hiddev96: USB HID v0.01 Device [Microchip Technology Inc. PICkit 2
Microcontroller Programmer] on usb-0000:00:02.1-2
usb 2-2: USB disconnect, address 3
ohci_hcd 0000:00:02.1: wakeup
usb 2-2: new full speed USB device using ohci_hcd and address 4
usb 2-2: device descriptor read/64, error -110
usb 2-2: device descriptor read/64, error -110
usb 2-2: new full speed USB device using ohci_hcd and address 5
usb 2-2: device descriptor read/64, error -110
usb 2-2: device descriptor read/64, error -110
ohci_hcd 0000:00:02.1: wakeup
usb 2-2: new full speed USB device using ohci_hcd and address 6
usb 2-2: device descriptor read/64, error -110
usb 2-2: device descriptor read/64, error -110
usb 2-2: new full speed USB device using ohci_hcd and address 7
usb 2-2: device descriptor read/64, error -110
usb 2-2: device descriptor read/64, error -110
ohci_hcd 0000:00:02.1: wakeup
usb 2-2: new full speed USB device using ohci_hcd and address 8
usb 2-2: configuration #1 chosen from 2 choices
hiddev96: USB HID v0.01 Device [Microchip Technology Inc. PICkit 2
Microcontroller Programmer] on usb-0000:00:02.1-2
usb 2-2: usbfs: interface 0 claimed while 'pyk' sets config #1

[EMAIL PROTECTED]:/etc/hotplug/usb$ lsusb -vvv
...
Bus 002 Device 008: ID 04d8:0033 Microchip Technology, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x04d8 Microchip Technology, Inc.
  idProduct          0x0033
  bcdDevice            0.01
  iManufacturer           1 Microchip Technology Inc.
  iProduct                2 PICkit 2 Microcontroller Programmer
  iSerial                 3 PIC18F2550
  bNumConfigurations      2
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          2 PICkit 2 Microcontroller Programmer
    bmAttributes         0x80
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Devices
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               0.01
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      29
          Report Descriptor: (length is 29)
            Item(Global): Usage Page, data= [ 0x00 0xff ] 65280
                            (null)
            Item(Local ): Usage, data= [ 0x01 ] 1
                            (null)
            Item(Main  ): Collection, data= [ 0x01 ] 1
                            Application
            Item(Local ): Usage Minimum, data= [ 0x01 ] 1
                            (null)
            Item(Local ): Usage Maximum, data= [ 0x40 ] 64
                            (null)
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x40 ] 64
            Item(Main  ): Input, data= [ 0x02 ] 2
                            Data Variable Absolute No_Wrap Linear
                            Preferred_State No_Null_Position
Non_Volatile Bitfield
            Item(Local ): Usage Minimum, data= [ 0x01 ] 1
                            (null)
            Item(Local ): Usage Maximum, data= [ 0x40 ] 64
                            (null)
            Item(Main  ): Output, data= [ 0x02 ] 2
                            Data Variable Absolute No_Wrap Linear
                            Preferred_State No_Null_Position
Non_Volatile Bitfield
            Item(Main  ): End Collection, data=none
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     2
    iConfiguration          2 PICkit 2 Microcontroller Programmer
    bmAttributes         0x80
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to