I finally found the time to work on the Raspberry Pi Inmos Link Adapter again. After spending many hours debugging the previous version without any results, I abandoned that design.
This time I managed to bring up the patience to do some quick tests on a breadboard before committing it straight to a PCB. The tests on breadboard looked promising, although I used a C012 link adaptor chip for the breadboard tests instead of the C011 used in the PCB version.
This new version is based on the Microchip MCP23017 16-bit i2c GPIO interface instead of the two PCF8574’s in the previous version.
Using only one chip makes the software side a bit easier, but the main reason I chose the MCP23017 over the PCF8574 was that I did not really trust the quasi-bidirectional IO of the latter in my previous design. The MCP23017 feels more deterministic in that respect, giving the user control over each GPIO’s direction, its default value, etc. A pretty nice chip.
All IO is now running on 5 volt, as the i2c bus is active low and pulled up to 3.3 volt by the Raspberry Pi, the MCP23017 can safely run on 5 volt without damaging the Raspberry Pi’s GPIOs.
The Inmos link, a reset line and a 5 MHz clock are available as
buffered TTL signals, the link speed is selectable in software, of
course with the obligatory associated blinkenlights.
OutputInterrupt signals are OR-ed
trough to open-collector outputs to one of the Raspberry’s GPIO’s.
I planned these signals to be available through rs-422 line drivers as well. The rs-422 transceivers I picked from Eagle’s component library seem to be either made from unobtainium or from unaffordium, though. These need to be replace with something more commonly available. As the board outline interferes with the Raspberry Pi’s ugly USB connectors as well, a third version of the board may hopefully straighten out these last few glitches.
But…does it work this time? Well, yes, it seems so, although more testing still needs to be done.
To the right is the new link interface in all its glory booting a lowly T222 Transputer.
The Raspberry’s side of things is using a little Python module to abstract the MCP23017 and C011 link adaptor from programs.
With default i2c addresses and a 10 Mbit/s link, writing a byte to the link is a simple as:
import Inmos2 link = Inmos2.Link() link.write(0x42)
The T222 booting using the new link adaptor is shown below:
hessch@archimedes ~/src/rpilink $ ./tdetect.py Writing 23 bytes of boot code to Transputer: b1 d1 24 f2 21 fc 24 f2 21 f8 f0 60 5c 2a 2a 2a 4a ff 21 2f ff 02 00 Read result from Transputer: aa aa 16-bit Transputer found