Jan,
Great site!
We have successfully used your sample design and derived devices that do INs and OUTs and are able to connect with the generic HID driver:
pic_usb_device_hid_generic_10.zip
Generic_HID Firmware for Microchip 18F USB Chips
Using Microchip MCHPFSUSB Framework v2.5a
I'm trying to create a similar device in a CY7C64343 and I can't get OUTs to work.
The thing that doesn't make sense to me, in your Microchip code, it appears to use Endpoint 1 for both IN and OUT, which I didn't think was possible.
#define HID_EP 1
void USBCBInitEP(void)
{
//enable the HID endpoint
USBEnableEndpoint(HID_EP,
/* Endpoint Descriptor */
0x07,/*sizeof(USB_EP_DSC)*/
USB_DESCRIPTOR_ENDPOINT, //Endpoint Descriptor
HID_EP | _EP_IN, //EndpointAddress
_INTERRUPT, //Attributes
0x40,0x00, //size
0x01, //Interval
/* Endpoint Descriptor */
0x07,/*sizeof(USB_EP_DSC)*/
USB_DESCRIPTOR_ENDPOINT, //Endpoint Descriptor
HID_EP | _EP_OUT, //EndpointAddress
_INTERRUPT, //Attributes
0x40,0x00, //size
0x01 //Interval
What I expect to see is something more like in your EZUSB HID, where Endpoints 1 and 2 are used.
EpO2Dscr:
db EpO2DscrEnd-EpO2Dscr ;; Descriptor length
db DSCR_ENDPNT ;; Descriptor type
db 00000010b ;; Endpoint number, and direction
db ET_INT ;; Endpoint type
db 40H ;; Maximun packet size (LSB)
db 00H ;; Max packect size (MSB)
db 100 ;; Polling interval
EpO2DscrEnd:
EpI1Dscr:
db EpI1DscrEnd-EpI1Dscr ;; Descriptor length
db DSCR_ENDPNT ;; Descriptor type
db 10000001b ;; Endpoint number, and direction
db ET_INT ;; Endpoint type
db 40H ;; Maximun packet size (LSB)
db 00H ;; Max packect size (MSB)
db 100 ;; Polling interval
EpI1DscrEnd:
Is there something magic that makes this work in the Microchip?
Thanks,
Mike