This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC2468 USB_EndPoint1 settings for Sending 50 Bytes to Host(PC)

Dear friends/Sir

I Am working for Card Reader Using USB. My Card reading Progarm is comleted. Now Data cllected from the Card. I want to send this data to PC.
I Have Modified to HIDUSB example from Keil .

My modified report Descriptor is as

usbdesc.c

/* HID Report Descriptor */
const BYTE HID_ReportDescriptor[] = {
  HID_UsagePageVendor(0x00),
  HID_Usage(0x01),
  HID_Collection(HID_Application),
    HID_Usage(0x01),
    HID_LogicalMin(0),
    HID_LogicalMax(1),
    HID_ReportCount(50),
    HID_ReportSize(8),
    HID_Input(HID_Data | HID_Variable | HID_Absolute),
    HID_EndCollection,
};

max Packet size i have changed to

 WBVAL(0x000A),                     /* wMaxPacketSize */
  0x0A,          /* 16ms */          /* bInterval */

Now for data Transfer test i have modified USB_EndPoint1() like this

declared in

 usbuser.c

void USB_EndPoint1 (DWORD event) {
  BYTE tmp[10]={'C','A','R','D','T','A','1','2','3','4'}
  switch (event) {
    case USB_EVT_IN:
      USB_WriteEP(0x81,tmp, sizeof(tmp));
      break;
  }
}

but on reading i am not getting data in PC.
but if it is single byte transfer i getting it properly.

This data transaction i am monitoring using a software

Device Monitoring Studio

so i want to know wheather i have done correct modifications or any other modification is required in microcontroller Program.

Thanks
SCP

0