|
From: Ray S. <ra...@bl...> - 2006-09-12 21:18:14
|
Hi Xiaofan, At 06:14 PM 9/11/2006, you wrote: >I've posted the binary packages in Microchip Forum. >http://forum.microchip.com/tm.aspx?m=110205 >Check out the pyk-0.4 binary. ... You probably need to build your own wrapper >depending on your tools. OK; I just used the .4 binary, and v0.10 of libusb_win32 >> >2) PyUSB >> >http://pyusb.berlios.de/ >> >> It mostly works for me, but for some odd bulkread data drop/error. > >The author (Wander Lairson) is very helpful, you can always contact >him about the error. Lat time I found a minor bug and he helped to solve it. Yes, he is quite helpful, he's testing pyusb .34 with libusb_win32 v0.12 (he indicated) >You can also use DebugView with and turn on debug option for libusb-win32. Nice, I've re-installed .34/0.10 with debug on My original code tells the device that it wants 2**8*64 samples fh.controlMsg(HOST2DEVICE, request=int(0x04), buffer=struct.pack("L",256), index=INTERFACE) and data always comes up an odd number short as I loop over ans += bulkRead(ADS1271EVMBULKIN, usbBlocks*64) The device thinks it's done, and I haven't gotten 16384 samples.... I tried your pyk-0.4 version of usb.py, but I haven't figured out how to do a usb_control_msg properly with it to send the device firmware its commands. I also have some pyrex based libusb code from the firmware author to look at now, so I'll keep trying. Thanks for the input! Ray |