Author Topic: USB and VB6  (Read 18797 times)

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB and VB6
« Reply #15 on: April 17, 2013, 11:06:06 am »
Size * count = number of bits per report:

0x75, 8,          // Report size = 8 (bits)
      0x95, USB_CONFIG_HID_TX_SIZE,        // Report count = 16 bits (2 bytes) USB_CONFIG_HID_TX_SIZE=64

0x75, 8,          // Report size = 8 (bits)
      0x95, USB_CONFIG_HID_RX_SIZE,        // Report count = 16 bits (2 bytes) USB_CONFIG_HID_RX_SIZE=64

The host PC and device should send all data in 2-byte reports.

Fougeron

  • Member
  • ***
  • Posts: 10
Re: USB and VB6
« Reply #16 on: April 17, 2013, 11:31:43 am »
And why it sometimes work correct (no delay to read the PIC data) and sometimes not (No read at all) ?
What do I have to modify ?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB and VB6
« Reply #17 on: April 17, 2013, 12:01:58 pm »
A hardware protocol analyzer will show what is happening on the bus. If you don't have one, use whatever debugging tools you have to isolate the problem. Is the device receiving IN token packets? Is the IN endpoint armed so it will send data on receiving an IN packet?

Fougeron

  • Member
  • ***
  • Posts: 10
Re: USB and VB6
« Reply #18 on: April 19, 2013, 09:00:27 am »
Could my issue due to a bad configuration of clock ?

I have
Code: [Select]
#FUSES HSPLL,PLL5,VREGEN,USBDIV,CPUDIV1
#use delay(clock=40000000)
and my resonnator is 20MHz murata

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB and VB6
« Reply #19 on: April 19, 2013, 10:55:27 am »
No, look at the USB communications.