Hi, I have multiple questions:
1) How do I set every field in a HID descriptor to a different size. For example, let's say I want one field to be 1 bit, and a second field to be 7 bits?
2) The 64kB/s, is that per pipe, each way, total? Lets say that I have 2 pipes, 2 sets of endpoints, just like AN 82072. Does each endpoint go up to 64kB/s? Could I have (is it 16 endpoints or 16 pipes?) each with 64kB/s? So in theory I could make 16(?) pipes, each moving 64kB/s??? How would I set up multiple IN or OUT pipes, from the PC side?
That leads me to my next question:
3) As I understand it, each IN endpoint, again looking back at AN82072, is polled from the PC at whatever timer interval you have set, up to 1000 times per second. Ok, so then the maximum data rate for that endpoint is 64bytes per poll, and that is where we get the 64kB/s. But the OUT endpoint, and I've been having trouble with one in my own code, do I need to put that on a timer?
I guess this comes to the report descriptor, is the whole AN82072 pg. 16 fig. 20, passed back and forth every time, or are the two (IN and OUT) sent/received separately?
PC -> OUT -> uC
PC -> prompt -> uC
<- IN <-
PC -> IN/OUT -> uC
PC <- IN/OUT <- uC
I think I'm missing some piece of what's going on here. I thought that the report was like a sheet of paper, a form, getting passed back and forth. The values in the fields getting changed. But is it two pieces of paper, one IN, one OUT, being passed independently?
4) That leads me to my more immediate question. I'm having problems with a project, in which I pass a string from a keypad to the PC, and a string from the PC to the uC. I'm having problems with the PC->uC. The uC receives up to 5 bytes, so "hello". But if I send to it "1234567890" it receives "1234500000". I've tried a 1 byte OUT report, and that didn't work, so I went back to the AN82072 examples 8 bytes, just in case I made a mistake in my HID descriptor, but that doesn't seem to be the problem. Again, in both cases I'm sending 1 byte at a time(only using the first field). I've then used the second field in the OUT descriptor to add packet numbers, and the numbers do the same thing as the letters. My first thought is that, because I am sending the bytes, on the PC side, one at a time in a foreach loop, that it is outpacing the uC, and that I should be using a timer - mimicking the IN timer? The once per millisecond applies to the IN and OUT pipes? update: It seems to work when I slow down the rate I am sending to the uC, am I correct in understanding why?
Why would it receive the last byte multiple times? Even if it is a rate thing, it should miss bytes entirely, yes? Not get the same byte multiple times???