[iyonix-support] Re: Iyonix driving K8055 board via USB - very slow?

  • From: Thomas Milius <Thomas-Milius@xxxxxxxxxxx>
  • To: iyonix-support@xxxxxxxxxxxxx
  • Date: Tue, 04 Aug 2009 21:12:36 +0200

In message <F686CD5871FB49FDA43B591919201812@DADXP>
          "Neil F" <faz@xxxxxxxxxxxxx> wrote:

> That should be Velleman K8055, of course, not Kellerman.
> 
> -----Original Message-----
> From: iyonix-support-bounce@xxxxxxxxxxxxx
> [mailto:iyonix-support-bounce@xxxxxxxxxxxxx] On Behalf Of Neil F
> Sent: 03 August 09 11:09
> To: iyonix-support@xxxxxxxxxxxxx
> Subject: [iyonix-support] Iyonix driving K8055 board via USB - very
> slow?
> 
> 
> Anyone fully familiar with the USB standard re sending bytes to a USB
> 1.1 device?
> 
> I'm using a heavily cut down, single-tasking version of Dave Higton's
> USB prog for driving the Kellerman K8055 USB experimenter's board (as
> sold by Maplin etc). I've been using it to drive stepper motors on an
> old 8-bit robot arm but find there's an absolute upper limit to the
> step speed that I can get the board to output, which seems to be
> around 100Hz or 10ms per pulse.
> 
> This of course is too slow to get the arm moving at more than a crawl
> - at least twice that pulse speed would be preferable. I have to
> introduce delays in the coding to stop the Iyonix overrunning the card
> ATM so clearly the hold up is not in the coding or processor speed.
> 
> I've seen references to the USB standard having a minimum update rate
> of 10ms, which would account for the slow timing I'm getting. I
> presume this means that while large packets of data can be sent to a
> USB device at high speed (e.g. file transfers) there's an unavoidable
> minimum overhead of 10ms for each packet. So if you want to send a
> series of one-byte transfers (as I do) then the fastest transfer rate
> possible is 100Hz.
> 
> Can anyone confirm this is the case, so I can stop trying to achieve
> the impossible and start looking for other solutions?
> 

In general USB runs with a frame rate of 1000 frames/s. Within this
frames various transfers can be done but only one per pipe (at bulk several
blocks can be transferred in one go). An Interrupt transfer can run
every 1ms (at full speed) and every 10ms at low speed connection. I don't
know whether the Vellemann board is fulll speed or low speed (examine with
!USBInfo).

So overall and due to unpredictable delays in the USB concept you won't be
lucky with this when triggering a stepper motor.

For myself I am using a Cypress AN2131 Mikrocontroller fitted on a small
board from Braintechnology. The Cypress AN2131 is an 8051 compatible
mikrocontroller with integrated USB interface. I ported as31-Assembler to
RISC OS to program it and wrote a small data loader.

Of course ARM-based boards would have been nicer but as I bought the board a
couple of years ago I didn't found such a thing. Meanwhile such interesting
things seems to be available.

Another alternative are in general the chips from FTDI. However I made bad
experience with it on the Iyonix and its USB stack until now even the last
attempt with RISC OS 5.14 seemed a bit promising. The FTDI chips are USB to
serial/parallel converters which can be programmed to work either in this or
that mode. My problem still is that such a chip is fitted to an
ODB-diagnostic interface which I bought myself and produces bulk transfers
with short package length as reply. I didn't manage it to get these short
packages on the RISC OS 5 USB-stack. But overall the FTDI chips are providing
what you want:

You can program the parallel lines as I/O quite easy (No assembler with more
or minor esoteric address/interupt handling required) and AFAIR you can
transfer 64 Bytes in one go which are buffered and clocked to the pins at a
given frame rate which gives you a better and stress free control of the
pins.

I always wanted to write a general driver for these chips but due to the USB
stack trouble I had no success until now. The FTDI settings are no
documentated porperly but I carried a couple of information together from
FTDI and UNIX/LINUX which I could pass you onwards to you.

Best Regards

Thomas Milius
---
To alter your preferences or leave the group, 
visit //www.freelists.org/list/iyonix-support
Other info via //www.freelists.org/webpage/iyonix-support

Other related posts: