From: Vladimir A. Gurevich (
Date: Thu May 04 2000 - 06:50:06 EDT

Hello Peter,

I tried to do a pretty similar thing. On a custom board I had 68EZ328,
cs8900 and a special DSP chip that could either do compression or could
just send out uLaw or ALaw-encoded data at 8KHz rate.

The chip was connected to 68EZ328 via SPI plus a couple of other GPIO
pins. For a transaction we had to:
      1) Assert "chip select" GPIO pin
      2) Assert or de-assert R/W GPIO pin
      3) Perform SPI exchange for 2 bytes (it was actually a 1-way
         transaction, i.e. either our data will go to the chip or
         we'll get data from the chip).
      4) Wait for ACK pin from the chip to become asserted
      5) De-assert "chip select" GPIO.

Additionally, for each 140 bytes we had to perform 3 more 16-bit exchanges.

The result: we could get PCM data from the chip only if system would
do nothing else. As soon as we tried to ship data out (at least, using
the standard TCP/IP stack), we would loose PCM data. Buffer size was
just determining how often we would loose it. On the other hand, when
chip was spitting out compressed data, we had no problems at all.

Your mileage may vary, since your chip might have more efficient interface,
or you might even try to send out data directly (e.g. bypass the driver and
copy 2 bytes as they arrive directly into the Ethernet chip buffer (don't
forget to form a simple UDP header there beforehand, of course)).

Happy hacking,

"Peter E. Thomas" wrote:

> I have a question about how the ucsimm will handle a realtime task. My
> setup is basically this:
> 1. PC running Windows NT, with an ethernet card
> 2. ucsimm connected to PC via ethernet
> 3. a "decoder" card connected to the SPI port on ucsimm.
> What I want to do is send a packet to the ucsimm containing coded speech.
> The data from this packet will be taken out and sent out the SPI port.
> Now, it needs to be sent out the SPI port in a special fashion. Every 125
> micro seconds, I need to send 2 bytes. I figure that when I send the TCP
> packet to the ucsimm, I will give it about 1000 bytes to work with.
> The same thing needs to work in reverse. The decoder card will be sending
> 2 bytes 8000 times a second through the SPI to the ucsimm. I need the
> ucsimm to buffer some ammount (I don't know how much...) and then send the
> packet to the Windows NT box.
> It seems this is going to be VERY tight, maybe not possible. How long
> should I bufffer data in the ucsimm when it is reciveing from the decoder?
> How long does it take to send a 1000 bytes packet? a 100 byte packet?
> Anyone ever tried anything liek this? Would I be better off using a
> codefire board?
> Thanks for your time!
> Peter
> This message resent by the list server

                   |      |          |      |
                   |     :|:        :|:     | phone         408-525-9707
Vladimir Gurevich  |    :|||:      :|||:    | fax           408-527-1713
Software Engineer  | .:|||||||:..:|||||||:. |
    NUBU/DIAL      |      CiscoSystems      | e-mail
                   |                        | location SJ-7-2 Cube D1-12
                   |  |
This message resent by the list server

This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:35 EST