How to add peripherals to ETRAX 100LX


1. Introduction

We have received great feedback from customers who think the ETRAX is a brilliant platform to start their development on but it still was missing some small feature. This feature can for instance be a tiny LCD or Keyboard interface. But hey folks, don't give up just because of this. There is a way for you to get exactly what you are looking for!

The purpose of this document is to give an overview of the different methods that can be used in order to connect peripherals to the ETRAX chip. With the word peripheral I basically mean different controller circuits, e.g. SVGA controllers, Ethernet controllers. But the same theory is applicable if you'd like to add for example a PCMCIA interface etc.

2. Peripheral connectivity

There are three different ways to connect a peripheral devices to the ETRAX CPU.

2.1 Software generated protocol

There are 62 pins on the ETRAX chip that can be controlled entirely from software. 34 of these are bi-directional, that is data can be transported in both directions. The rest of the pins are either pure inputs or outputs. This means that since these bits can be toggled from software any way you like, you can simulate numerous of different interfaces. This method is best applicable on low speed devices since the CPU will busy simulating the interface and thus time to perform other tasks will be reduced. The major advantage is that this kind of interface can be completely glueless and this has of course a positive effect of the final cost.

2.2 On chip protocol

There are several interfaces that are included in the ETRAX 100LX architecture. Any controller or device that falls under these protocol specifications can be used.

These interfaces are described further in the ETRAX 100LX datasheet.

2.3 System bus interface

If an interface requires high bandwidth and it doesn't exist on the ETRAX chip it can be efficiently added anyway. A device can be mapped just like a memory module. There are a couple of address areas available which can be used for this purpose.

Address Area Chip select
0x90000000-0x93FFFFFF CSP0
0x94000000-0x97FFFFFF CSP1
0x98000000-0x9BFFFFFF CSP2
0x9C000000-0x9FFFFFFF CSP3
0xA0000000-0xA3FFFFFF CSP4
0xA4000000-0xA7FFFFFF CSP5
0xA8000000-0xABFFFFFF CSP6
0xAC000000-0xAFFFFFFF CSP7
Note: The chip select signals CSP1-3 and CSP5-7 are multiplexed with general port PB in the I/O block.
Also note that these accesses are uncached.

The different chip select signals are internally decoded. The tricky part using this method is to get the timing correct. This often requires some sort of external logic and/or state machines. Some external interfaces are synchronous and therefor requires a clock that works synchronously with the CPU transactions. This kind of interface is extra tricky since the ETRAX data interface is asynchronous by nature. It is however possible to deal with these situations as well.

Transactions to and from the peripheral device can be done by simply performing read and writes in the address area where the device is located. An alternative and very powerful method is to use external DMA. External DMA allows data transactions from peripheral devices to memory and vice verse. The major advantage of external DMA is that the CPU can handle other things while a DMA transactions take place. External DMA is documented in Designer's Reference chapter 7.

3. Examples

3.1 2:nd Ethernet

The ETRAX 100LX has one on chip Ethernet controller. Adding a second Ethernet controller can be accomplished by using one of the following methods.

System bus interface
An Ethernet controller can be connected directly to the system bus, allowing data transactions at high speed.
PCMCIA
Several PCMCIA card has a 10/100 Mbit Ethernet interface. Once the PCMCIA interface is implemented you can add almost any interface you like.
Compact Flash
As with PCMCIA there are Compact Flash cards that has Ethernet.
USB
USB to Ethernet bridges are available. Plug one end into the ETRAX USB interface and in the other end you get an Ethernet connection.

3.2 PCMCIA (PC Card)

PCMCIA is an interface primary used to connect expansion cards to portable computers. Almost all kinds of devices exist with PCMCIA interface (network cards, disks, memories etc).

The PCMCIA interface can be implemented using at least two different approaches.

Software generated protocol
We have with pretty good result implemented the PCMCIA interface in software. It depends completely on the speed and complexibility of the device if this will be successful or not. It is possible to patch an Etrax 100LX developer board to test the PCMCIA interface.
System bus interface
Using the system bus is a more difficult approach, but on the other hand necessary if the PCMCIA device requires higher bandwidth. The PCMCIA interface is pretty compatible with the Etrax system bus interface. The external DMA handling is one thing that must be implemented in external logic in order to get the wanted performance.

3.3 Compact Flash

Compact Flash is a very small removable mass storage device. They provide complete PCMCIA-ATA functionality and compatibility plus TrueIDE functionality compatible with ATA/ATAPI-4. Compared to a 68-pin PCMCIA card, a CF card has 50 pins but still conforms to PCMCIA ATA specs. CF I/O cards are available as modems, Ethernet, serial, digital phone cards, laser scanners, Bluetooth wireless, etc. Since ATA is an ETRAX 100LX on chip interface, a CF card supporting ATA transactions should be easy to add.

3.4 Bluetooth

Most of today's Bluetooth controllers has either an asynchronous serial interface or USB interface. Both these interfaces are available on ETRAX 100LX and thus Bluetooth is an interface very easy to connect.


$Date: 2001/11/06 12:57:19 $
$Revision: 1.1 $

Axis Communications, Technology Division