Communication protocol between 2 ARM chips

Hi,

I was hoping to get some ideas on what protocol I should use to talk between two ARMs. Specifically I’m trying to capture data from an ADC attached to an ARM7 (LPC2368) to capture data from 6 sensors at 5000Hz each (for oversampling). The ADC I’m usuing is a Linear LTC1859 which handles this but I don’t think the UART is the best platform to trasmit this much data.

USB won’t work since the LPC2368 can’t act as a USB host AFAIK. I was thinking CAN or Ethernet but was hoping to get some advice.

Thanks.

Data Rate

Range.

Rate, you indicate, is 6 times 5000 samples/sec. If a sample is 10 bits, then without compression, that’s 30Kbps.

If distance is inches, SPI would be good.

If distance is 300 ft. I’d suggest 802.15.4 using plug and play XBee or XBee Pro modules (sold by SFE) and the serial port extension protocol, though you’ll need a logic level UART port on the microprocessor, or try to big-bang it.

Ethernet is, of course, unlimited in range. You can use SPI to a WizNet Wiz811MJ module. $20. All protocols are on-the-module. Your interface could be SPI @ 4Mbps.

I’m going to use SPI for mine between a LPC2368 and a LPC2103

Thanks for the reply guys. I see that the LPC2368 has two SSP interfaces (Sync. Serial Ports). How are these different from a regular SPI port?

How well can I multiplex devices on an SPI port?

I’m out of SPI ports unless I can multiplex the ADC and DAC on the same SPI port.

mooreaa:
Thanks for the reply guys. I see that the LPC2368 has two SSP interfaces (Sync. Serial Ports). How are these different from a regular SPI port?

From the user manual, ``` The SSP is a Synchronous Serial Port (SSP) controller capable of operation on a SPI, 4-wire SSI, or Microwire bus. It can interact with multiple masters and slaves on the bus. Only a single master and a single slave can communicate on the bus during a given data transfer. Data transfers are in principle full duplex, with frames of 4 to 16 bits of data flowing from the master to the slave and from the slave to the master. In practice it is often the case that only one of these data flows carries meaningful data. ``` In plain English, SSP is SPI on steroids. In the LPC2xxx series of chips, the SSP ports can usually send data faster than the SPI ports. You also have the ability to use a larger number of modes (for compatibility with other devices), and more flexibility in the number of bits per transmission.

mooreaa:
How well can I multiplex devices on an SPI port?

Given your requirements, you will be sending 6 sensors * 5000 samples/second * 16 bits = 480 kbits/second. This is easily within the range of the SPI ports on the LPC2000 chips. IIRC, the SSP port on the LPC2148 can go up to around 30 Mbits/second, so you have several orders of magnitude of headroom.

mooreaa:
I’m out of SPI ports unless I can multiplex the ADC and DAC on the same SPI port.

You didn’t mention a DAC in your original post, so I’m not sure what you mean here. However, if all the data is going out of the LPC2368, then you should have plenty of headroom to send DAC data (unless you are trying to send a horrendous amount of data). If you are reading the DAC data into the LPC2368, the SPI bus is full-duplex, so this isn’t a problem, either.

You should be able to use a regular port pin as the chip select for each chip.

Andy

with SPI, one has to be master, the other, slave, e.g., the data source is the master.

I’m not familiar with SSP; how does peering work with it?

Thanks for the info guys.

The primary board is a data acquistion board that collects data from sensors at relatively high speeds. I recently started looking at upgrading the board with an ARM7 (previously HCS08) and with improved sampling speeds I know that the UART (which I was using before) wouldn’t be sufficient.

I’ve been looking at the SPI interface and I’m trying to see if its good for sending continus streams of data. The problem with this is I would need to do bi-directional communication so neither side is really a slave or master. The primary board will send data, but it also needs to respond to commands from the other board. Also as you mentioned SPI doesn’t work well over longer distances so that is slightly a concern.

I’m also looking at an ethernet solution because I know it has the bandwidth and flexibility. The only issue with the ethernet interface is I don’t have any experience with the software so I’m just starting to look at uIP as a possible solution. This would work great because I could directly interface this to the other IC’s ethernet port and performce UDP without a lot of the TCPIP overhead. I also see thatt the ethernet port has DMA so it should work well for my high speed needs. I’m just a little concerned about the complexity.

I’m still trying to pick an IDE for the ARM system so I have time to keep exploring connection ideas.

Thanks for the input.

Also I didn’t bring this up before but what about RS422? I’ve only worked with RS232 but I imagine the underlying UART code would be the same so I could transition to RS422 pretty seamlessly with a hardware change.

Also I’ve been looking at UIP to implement the ethernet stack but was wondering if it can be used to implement a telnet server. I just want to send commands and data back and forth and don’t need a webserver. I imagine that this wouldn’t be a problem but I haven’t see much in terms of sample code to implement this.

Thanks