Dear Vloki
Thank you very much for the code LPC_FSUSB-HID-X-r2(v2014_07_22,) and It works for me well.
I could able to exchange data to HOST PC via USB.
One challenge I face here is, I am unable to configure PORTD as
input while using this USB Stack . I need to read 4 switches connected on PORTD . I checked the PORTD input
functionality through separate code and works fine but not working with USB STACK.
Do I need to set/reset any register apart from TRISD?.Please find below my initialization code I called in main
Is there any relation between PORTD input configuration with USB STACK function?
I am not using SPP and hence SPPEN set to 0
Thank you very much in advance for the supports
void InitApp(void) {
SPPEN=0;
LATD =0x00;
PORTD=0x00;
TRISA = 0x00; // bits 0..3 data, bit 4 = R/W, bit 5 = RS
TRISB = 0xFF; // Temp switch
TRISC = 0xFE; // not used set as input
TRISD = 0x1F; // bits 4..7 = LEDs, bits 0..3 = switch inputs
TRISE = 0xFE; // bit 0 = LCD Ena, remainder not used set as input
ADCON1 = ADCON1 | 0x0F;
}
MAIN_RETURN main(void)
{
SYSTEM_Initialize(SYSTEM_STATE_USB_START);
USBDeviceInit(); //usb_device.c
#if defined(USB_INTERRUPT)
USBDeviceAttach(); //usb_device.c
#endif
/* Configure the oscillator for the device */
ConfigureOscillator();
/* Initialize I/O and Peripherals for application */
portb_change_int_en();
InitApp();
lcd_init();
on_change=PORTB;
pos=0x00;