Hardware Interface Specs

Hardware boards connect to one of the 16-pin I/O ports on the controller board. Here is the pinout of the expansion port:

   GND  1 [*]  *  16  Vdd
   R/W  2  *   *  15  A3
    A2  3  *   *  14  A1
    A0  4  *   *  13  /select
    D1  5  *   *  12  D2
    D3  6  *   *  11  D4
    D5  7  *   *  10  D6
    D7  8  *   *   9  D0

R/W is high for a read cycle and low for a write cycle. /select is low when the controller is talking to your board. There is a four bit address bus and an eight bit bi-directional data bus. Although there is a Vdd connection provided, it is recommended that you get your +5V from another source (the power port board) unless you plan on drawing very little current. Here is a timing diagram of some sort:

 /select  ______          _________
                |________|

  data   ----------< VALID >-------

Note that data is valid on the rising edge of /select, so /select can be used as a clock signal in many cases. As always, make sure that you drive the data bus only when /select is low and R/W is high. Hardware that barfs all over the data bus will not be tolerated.

When the controller board resets, CokeOS writes a zero byte to address zero of every I/O port. Your board can use this for initialization.

Here is the pinout of the misc. IO port. Note that this port is backwards from the others on the board -- it's been rotated 180 degrees, and pin 1 is in the opposite corner. Also note that Vdd is in a different place.

   GND  1 [*]  *  16  TIC3
  TIC2  2  *   *  15  TIC1
  TOC5  3  *   *  14  TOC4
  TOC3  4  *   *  13  TOC2
  TOC1  5  *   *  12  Vrl
   Vrh  6  *   *  11  An0
   An1  7  *   *  10  An2
   IRQ  8  *   *   9  Vdd