0
\$\begingroup\$

I have interfaced a HID bar-code scanner with LPC2468 using interrupt transfer. The polling interval which i receive(from bar-code) in the Endpoint Descriptor is 10 ms. What will happen if i increase or decrease this polling interval.

\$\endgroup\$
  • \$\begingroup\$ Apparently (according to this datasheet) it can scan up to 330 times per second. \$\endgroup\$ – Oli Glaser Jan 18 '13 at 11:07
  • \$\begingroup\$ @PeterJ: Some scanners are good at picking up moving objects. There would be some applications where one might want to catch the barcodes of objects that are zooming by on a conveyor or transport, and some conveyors/transports may have things zooming along at pretty incredible speeds. (though to be sure, I wouldn't normally expect a handheld device to be humanly-held near such a high-speed conveyor running at speed). \$\endgroup\$ – supercat Jan 18 '13 at 17:47
  • \$\begingroup\$ If one has a scanner which is permanently mounted to watch a high-speed conveyor, using a 10ms polling interval rather than 1ms will add a random delay of up to 9ms before an object can be reported. That wouldn't be an issue if one were hand-pointing the scanner at barcodes for purposes of logging them, but could be a problem if the barcodes were being used in "real time" to e.g. route objects on a conveyor. Even if the conveyor only handles one object per 100ms, a diverter may need to be triggered within a 20ms window. An extra 9ms timing uncertainty won't help. \$\endgroup\$ – supercat Jan 18 '13 at 18:03
1
\$\begingroup\$

If you poll if more/less frequently, assuming it is ready to send data, then it will simply be a case of receiving data more or less frequently.

I'm not sure if you have read this programming manual, but if you haven't then you should. It appears (at a glance) that it is configured using the barcodes themselves (as opposed to a message from the PC.
All the configuration barcodes are there, and there is a section on changing the inter-message delay. I would try using these (set delay to 0 between messages), poll at your desired speed (up to 1 / 330 = ~3ms polling interval) and let us know how it goes.

Here is a clip of some relevant settings in the "General Configuration" section (note the "start of configuration" and "end of configuration" barcodes):

Delay Configuration

\$\endgroup\$
  • \$\begingroup\$ Can some data get lost due to overwriting or other reason if i increase polling interval \$\endgroup\$ – Sarao Jan 18 '13 at 12:01
  • \$\begingroup\$ Not at the USB level, no - the device should just respond with a NAK to tell the PC to wait if it is not ready to send more data yet. \$\endgroup\$ – Oli Glaser Jan 18 '13 at 13:30
  • \$\begingroup\$ +1, "not sure if you have read this programming manual" \$\endgroup\$ – Anindo Ghosh Jan 19 '13 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.