S100 Computers

HomeS-100 Boards HistoryNew BoardsSoftwareBoards For Sale
ForumOther Web Sites NewsIndex  

The Intel Edison S100 Bus CPU Board.
  











Edison Final V1.21 Board

The Intel® Edison is an ultra small computing platform that was first announced in March 2014 and after some changes produced in September 2014. The Edison packs a huge amount of tech goodies into a tiny package while still providing the same robust strength of your go-to single board computer. It is driven by the Intel® Atom™ SoC dual-core CPU and includes an integrated Wi-Fi, Bluetooth LE, and a 70-pin connector to attach a veritable slew of shield-like “Blocks” made by the likes of SparkFun which can be stacked one on top of the other.
  
 

Edison Module
  
The Intel® Edison packs a robust set of features into its small size, delivering great performance, durability, and a broad spectrum of I/O and software support.  The board's main "system on a Chip (Soc)"  is an Intel Atom "Tangier" (a Z34XX) that includes two Atom Silvermont cores running at 500 MHz and one Intel Quark core at 100 MHz. The latter runs the ViperOS Real Time Operating System (RTOS)). The unit has 1 GB of RAM integrated in the package. There is also 4 GB eMMC flash on board, Wi-Fi, Bluetooth 4 and two USB controllers. The board has a special Hirose "DF40", 70-pin dense connector with USB, SD, UARTs and many GPIOs pins.  In its default mode it runs Yocto Linux. Intel supplies development support for the Arduino IDE, Eclipse (for C, C++, and Python). 

However the above Hirose 70 pin connector is simply not practical to hand solder on a printed circuit board. The pin spacing requires a special machine to do so.  Fortunately Intel supplies a special "breakout board" that brings the relevant GPIO pins out to a 4X14 array of jumpers spaced 0.1" apart.   This is the Edison CPU board will work with here.  BTW, they also supply an Arduino style motherboard. However that board is large and has functions we do not require here.

Before working with the Edison module you should read about its many features.  Both Intel (see here) and SparkFun (see here) provide excellent write-ups. There is also a decent book "Programming the Intel Edison" by Donald Norris (Mc Graw Hill) worth reading.  However by far the best information can be obtained (here) in a series of articles by Harry Fairhead.  Later for questions,  you can use the Intel Edison Forum.

Introduction to the Atom CPU
The Intel Atom released in 2008, was the brand name for a line of ultra-low-voltage IA-32 and x86-64 CPUs, originally designed in 45 nm CMOS and later using a 32 nm process.  The Intel Atom today is mainly used in netbooks, nettops and embedded applications. 

All Atom processors implement the x86 (IA-32) instruction set and except for very early versions they support the Intel 64 instruction set as well. However the are issues with some versions supporting the 64-bit versions of Microsoft Windows and Ubuntu or Debian GNU/Linux.

The performance of a single-core Atom is about half that of a Pentium M of the same clock rate.
  
  Intel Atom CPU

One obvious feature of the Intel Atom is how small it is.


The Edison CPU Board as an S100 Bus Slave.
As with all our previous Intel CPU boards the normal S100 bus configuration will be where we boot up with the master S100 bus Z80 board and then transfer control over to the Edison Atom CPU.  However in this case unlike for example our 80386 and 80486 boards, we cannot directly connect the (64 bit)  Atom data bus to our simple 8/16 S100 bus. Fortunately the twin Atom core is running at 500 MHz so that we can "get away with" using Linux C programming to control the (slow) S100 bus address, data, status and control lines.  We will use the GPIO pins of the Edison Breakout board to do this.  Because there are more S100 bus lines that need to be controlled than the are Edison GPIO pins we will use a Atmel 1508 CPLD to latch and/or multiplex the required signals.  Because we have total and complete control of the S100 bus, in theory, we can control any S100 board.   

One really nice feature of the Edison board is that it has it's own Wi-Fi circuit.  As we will see, you can write the S100 bus controlling software on your PC (or Mac), in C, compile it upload it to the  Edison and directly run it in your S100 system -- all with only a few mouse clicks.  Intel supplies the required IDE windows interface.  It's part of their new IoT effort.

The Edison CPU Board Hardware
Lets first look at the hardware.  Here is a picture of the S100 Bus Edison board layout.
  
  Board layout

As you can see it's a relatively simple board. Certainly way simpler than our recent 80386 and 80486 boards.   The one complication we have when interfacing with the Edison Breakout board is that ALL input and output to the Edison can NEVER be greater than 1.8 volts.  Both onboard CPU's run at this voltage. Even a brief exposure to 5 volts will "burn out" that connection and perhaps the chips in general.  We use the common Ti TXB0108 8-bit Bidirectional Voltage-Level Translator to bridge the interface.    Unfortunately these chips these days only come in a SMD format.  While not difficult to solder, for convenience for most users, we will use these chips in a 20 pin "adaptor" DIP format.  Again these are common, for example on here.


Running Edison Linux  Software.
Intel utilized a brand of Linux called Yocto to run this board.  Yocto originated in 2010 from a Linux Foundation workgroup whose goal is to produce tools and processes that will enable the creation of Linux distributions for embedded software that are independent of the underlying architecture of the embedded software itself.   While not on the original chips the recent Edison boards come with Linux already installed.

When you obtain your Edison you can bring up the board as described below from your PC (or Mac) via a USB/serial link.  It is a fairly straightforward process.  You first need to provide power to the Edison breakout board.  Power can be supplied as 7-15 volts to J21 on the actual breakout board (be careful, note the polarity), or (more safely), via J16 from a PC USB serial port.  

J16 is a fully USB compatible, "micro AB", OTG (power “on the go”) port. If you plug a micro A cable into this port, the Intel® Edison module will connect to a PC as the host; if you plug a micro B cable into this port, the Intel® Edison module will connect to the PC as a device. USB micro-A style connectors are not too common. I use a USB micro-B style connector in J16 to just supply power.   You can use any typical USB port phone charger etc.  We will use the other USB port, J3, that uses a micro-B style socket/connector to communicate over a serial link with the PC as described below.

Besides the Intel breakout board which we use here, you can also bring up the Edison in the Intel Arduino motherboard. This is also described on the Edison web site.
    
  Serial3
 
So in summary, the J16 USB port is used to supply power to the unit and to update the onboard software (see below).  The J3 port is only used for a serial connection to your PC (power being supplied with J21 or J16).

Using the Linux command line.
As I said above, the Edison comes with  Linux Yocto, ready to run on this board You use the J3 USB COM port to connect directly to Linux on the Edison from your PC.  Because Windows 10 does not include a Telnet program you have to download one.  We have use telnet here a number of times -- for example with the SBC-Z80 board.  There are many programs. I like "Absolute Telnet" but the free PuTTY one is also excellent. PuTTY is actually a very useful program here as it not only works as a serial terminal but as a Telnet and SSH console (see below). It is worth getting to know. Just download it and run the .exe file. There is no installation.  To use it to connect to the Edison simply run it and select serial connection. Enter the port that corresponds to the USB serial connection described above and set the speed to
115200, no parity,8 data  bits, 1 stop bit.  Here is a picture of the configuration popup.  You normally (and definitely for WiFi, see below) , run PuTTY "as an Administrator" (right click on desktop icon).
      
  PuTTY

Disconnect and reconnect power to your Edison breakout board making sure your USB serial connection is in place on J3. Wait about 20 seconds, then hit CR twice.  You should then see the Linux login with a username "root".
  
  Signon
 
The unit will then ask you for a password. For now,  just enter a CR (no password). 
After you login as "root", you can for example see the main disk directories by typing "df -h".  (Note the space between df and the -h).
       
  Directory Tree

BTW, under Windows a blank new drive window will appear EACH time during the initialization process if you log on via a micro-A type USB/serial connection. (Not so with WiFi, see below).   Ignore/close this empty drive if it appears, (its use only to force Linux updates). 

To save time later, save this PuTTY configuration as a file in the Saved Sessions section. Your username will normally be root.

While the Edison comes with  Linux Yocto, ready to run on this board you will need to configure the board to run with your home WiFi settings as well as a few other things.
When the board first came out you had to do a number of configuration steps by hand using various Linux commands over the serial line to configure it for WiFi and other configuration options. Intel now supplies a Web based interface that does the setup for you with limited user interaction.  It also upgrades your unit to the most current versions of the software components.  Download and run the program from the Edison download web site.  Here are some pictures of the major steps. 

It is very important you do not connect either Edison USB port to your PC before you run this "flashing" software.  Only connect USB port J16 when the program asks.  One of the disadvantages of working with the Edison (at least the breakout board), is that "flashing" it is somewhat temperamental.  I found that sometimes the "Next" button after you connect the unit to your PC never gets highlighted within the flashing process.   However without fail, if the are no external USB units connected to my PC and the Edison is the first,  the flashing process always works.  I think some other USB port drivers may be interfering with the process.

On the same web site Intel supplies a "manual" approach to flashing the Edison.  This has got to be an exercise in frustration.  Convoluted/unclear instructions, long file paths, multiple downloads -- never got it to work. 
 
  Flashing 1
  Flashing 2
  
You can from now on, disconnect the USB connection and use WiFi to communicate with the unit using PuTTY (as an administrator). 
We use the SSH option in PuTTY.  Be sure to run PuTTY in administrator mode.
 
  PuTTY-WiFi

To save time later, save this configuration as a file in the Saved Sessions section.

Once you get this far you are well on your way to having your Edison board setup. Carefully write down and store the above static IP address.  It will normally never change and is used a lot in the software below.

Before we dig into programming on the Edison there are a few other "nice to have" items we would like to install.

One very useful program is WinSCP.  This windows program allows you (amongst many other things), to drag files back and forth between Windows and your Edison Linux.  It can be downloaded from
hereAs a last resort, you may download (what may be an outdated copy) from the bottom of this page.  For the first time you will need to enter the Wi-Fi IP address.  Here is what the program looks like. You need to configure it to the IP address of your Edison board. Here is a picture:
  
  WinSCP_1
    
Its use/options are fairly self explanatory. However it rapidly becomes your best friend because it has no trouble communicating via WiFi to your Edison when other software (e.g. Eclipse --- see below), hangs. This allows you to "cleanup" your unit.
     
  WinSCP
    
If you are a novice Linux user (like me), you may find some of the Linux commands somewhat strange. While they are well documented on the web, personally I like to use some of the old DOS and CPM commands instead.    Fortunately Linux provides an "Alias" command to do the translation.  You just write a type of batch file that is loaded at boot time to then use the DOS commands you come to know and love.  The file must be named .profile and must reside in the directory /home/root.  Here is a starting point file:-

alias dir='ls -gh'
alias dirs='ls -ABFgh'
alias copy='cp -i -r'
alias stat='df -H'
alias del='rm -r'
alias delete='rm -r'
alias erase='rm -r'
alias ren='mv'
alias rename='mv'
alias current='pwd'
alias type='more'

You might think all you then have to do is drag the above text file (written with Notepad++) across to the Linux root directory.  Unfortunately there is one complication. Linux will get confused with a normal Notepad text file because it contains CR/LF's instead of just LF's.  You must first remove the CR at the end of each line.  Fortunately Notepad++ allows you to do this.  (Notepad++ is GPL licensed, free, (much) enhanced, version of the windows Notepad program). It can be downloaded from here As a last resort, you may download (what may be an outdated copy) from the bottom of this page.  (Fortunately the Linux GCC C-compiler accepts CR\LF's in it text).
 
 
   
Profile
   
You then drag the CR free text file across to the Edison/Linux side of WinSCP.  There is one further minor complication, the "." in front of the .profile file name in Linux makes the file invisible in a normal directory DIR, (ls -gh) display.  It is there however, you will see it listed as copied on the bottom of the WinSCP window.  If you like you can remove the '.' and have it visible in directory listings. 

If you are a Linux fan of course you can use the Linux
vi editor to directly create and place the above .profile file in the root directory.

At this point you are done.  Reboot your system and open up your PuTTY using a serial of WiFi connection. Typing "DIRS" will give you:-
       
  Dir.jpg
   
You can use DIR
, DIRS,COPY, STAT, DEL, REN etc.

One annoying thing with this standard Edison setup is you will find yourself entering a password many times. The default Edison Linux minimum number is 8.  Since security is not normally an issue here, you can change it.  It's probably easiest to do this with the Linux internal editor
vi. Its a strange editor you will need to learn a few basics. Start here.

Open the
configure_edison file by running the command: vi /usr/bin/configure_edison
Search for the function
setEdisonPassword()
The limits are set in the line
276, in the if statement. You only have to modify the numbers. I replaced the number 8 by the number 3. Optionally, you can modify the print statement as well to be consistent with the new limits.
Save the file.
Run the command
configure_edison --password. This time you should be able to enter a password of 3 (or more) characters.
I tested it by entering 000 and it worked fine.


Programming in C on the Edison
We will be writing a C program that initializes the hardware pins on the Edison to communicate with the S100 bus.  This is a somewhat tricky process because as we shall see, we want the program to run on power up every time without any user logon/interaction.  In Linux lingo it must run as a "service".  It took me numerous Edison forum questions to get it working. 

First let's start with a simple example.  I will call this file test.c:-

#include <stdio.h>
#include "mraa.h"
#include <unistd.h>

main()
{
printf(">>>>>>>>>>>>> Test Program Initialized <<<<<<<<<<<<<\n");
}

Place it in your Edison root directory with WINscp using a serial or WiFi hookup with PuTTY.
Next we need to compile, link and run it from the same directory:-
gcc test.c -o test
Remember case matters in Linux commands. Lower case "test" for example.

We can immediately run it from our current directory (
/home/root) by typing
./test
You should see:-
>>>>>>>>>>>>> Test Program Initialized <<<<<<<<<<<<<

Eclipse -- Running the Intel IoT IDE Development Software.
While you can take the traditional approach of writing C code, compiling it in a Linux environment and running the program as described above, these days we use a self contained "IDE" interface to write, edit, compile and run a program in a self contained program.  In the past we used Microsoft's Visual C. Intel supplies an equivalent IDE program for the Edison called
Eclipse Actually it's way overkill being somewhat frustrating with its numerous configuration options and libraries etc.  However once configured, it allows you to build a program on your PC, download it to the Edison via WiFi and run it remotely from your PC.  You quickly become spoiled with how easy the process is.  The IoT IDE "Eclipse" interface can be downloaded from here https://software.intel.com/en-us/installing-the-intel-system-studio-iot-edition.
       
      IoT Download1
    
The download has multiple download components and is somewhat confusing/frustrating to setup.
The "New" programs we will be using are best created form here (Menu: Files/New):-
 
  New Project

Just splice in your C code (see below), into an "Empty C project".   This is what a running application will look like:-
 
  IDE Picture
  
It is within this interface you will do all your Edison software development to control the S100 bus. While the C code is quite verbose, because the Edison Atom CPU is so fast and powerful it has no problem communicating and keeping up with the S100 bus signals.  I supply below, (in C code), an "Edison Z80 Monitor" example. There area many ways to speed up the C code in this example -- particularly for writing and reading a port (see here for example), but even with this basic C code,  the Edison board acts at a speed of about a 5 MHz Z80 in the S100 bus.

The Hardware
The interface of the Edison with the S100 bus is via an Atmel 1580 CPLD.  There is one hardware complication however, as I said above, all the input/output pins of the Edison are 1.8 Volts max.  In fact if you input a voltage greater than that you will burn out that gate/buffer on the Edison.  One has to take great care that the Edison breakout board never sees a voltage greater than 1.8 volts. The unit in most unforgiving in this respect. (Been there, done that!).  Since the S100 bus drivers and the CPLD require 5 volts we use a "level shifter" to bridge the two voltage levels.  There are a number of possible choices. I decided upon the common Ti TXB0108 8-bit Bidirectional Voltage-Level Translator to bridge the interface.    Unfortunately these chips these days only come in a SMD format.  While not difficult to solder, for convenience for most users, we will use these chips in a 20 pin "adaptor" DIP format.  Again these are common, for example on here. Note the 20 pin SMD adaptors like those here SparkFun cannot be used because of the unusual pinout of the TXB0108 chips. Under the SMD adaptors I have pads/traces so that one can solder the SMD TXB1018 chips directly to the board if you like, as shown here.   
 
  TBX_SMD
   
One nice thing about the TXB0108 is it is truly bidirectional. There is no data "direction pin". This makes for a totally transparent interface. However in earlier versions I found that switching U18 to an onboard bi-directional data bus did not work reliably.   I ended up with separate Data In & Out Data lines. This also lead to a faster system (because the direction of the buffers did not change).   A simplified diagram of the board is shown here:-
   
  Board Diagram

Unfortunately the are not enough general purpose input/output lines on the Edison Breakout board to directly interface the S100 bus IEEE-696 24 Address lines. We set an S100  address with TBX0108-A (8 bits) by latching three 8 bit bytes into three 74LS373's with TBX0108-B (U23).  Because the Edison is so fast and only one 74LS373 buffer is involved there is little bus delay.  Data (8 bit), from the S100 bus lines travels to the Edison via the level shifter TBX0108-C (U18).  Data (8 bit), to the S100 bus lines travels from the Edison via the level shifter TBX0108-C (U18). This is the same shifter that is used for the address lines, only this time the data is latched with a signal from the CPLD. The real heart of the board is TB0108-D.  This chip transfers the main Edison bus control signals to the CPLD.  Within the CPLD the S100 bus status and control signals are synthesized.  Here is the core WinCUPL code within the 1508 CPLD. Signals in yellow originate from the Edison.

LATCH_ADD1 =
ADDRESS_PULSE1 & !XFERII;     /* Latch U8 address data A0-A7 on high */

LATCH_ADD2 =
ADDRESS_PULSE2 & !XFERII;     /* Latch U9 address data A8-A15 on high */
LATCH_ADD3 =
ADDRESS_PULSE3 & !XFERII;     /* Latch U2 address data A16-A23 data on high */

!S100_DATA_OUT = !
DATA_WR & !XFERII;       /* Data OUT via U4 OE = LOW */
IO_RAM_WR = !bMEM_WR # !bsOUT;             /* Raise pin 11 of U4 to latch data. Note, pin is active HIGH */

S100_DATA_IN = !
DATA_RD & !XFERII;         /* Data IN via U5 OE = LOW */
IO_RAM_RD = !bMEM_RD # !bsINP;             /* Raise pin 11 of U5 to latch data. Note, pin is active HIGH */

bpSYNC = !
E_pSYNC & !XFERII;
!bpSTVAL = bpSYNC & !XFERII;               /* Pulse S100 bpSTVAL line, LOW */

!bsOUT = !
E_sOUT & !XFERII;                /* sOUT status signal to S100 bus, HIGH, inverted by U16 */

!bsINP = !
E_sINP & !XFERII;                /* sINP status signal to S100 bus, LOW here , but inverted by U16 to HIGH */

!bMEM_WR = !
E_MEMW & !XFERII;              /* MWRT status signal to S100 bus, LOW here , but inverted by U16 to HIGH */

!bMEM_RD = !
E_MEMR & !XFERII;              /* sMEMR status signal to S100 bus, LOW here , but inverted by U16 to HIGH */

bpDBIN = !
DATA_RD & !RW_PULSE & !XFERII;    /* Command to pulse S100 bpDBIN line, HIGH */

!bpWR = !DATA_WR & !RW_PULSE & !XFERII;     /* Command to pulse S100 bus bpWR* line, LOW */


!SLAVE_RESET = !E_RESET_CMD & BOARD_ACTIVE;  /* Return control back to S100 master (Z80) */

S100_INT =
INT_REQ & !XFERII;                /* Interrupt from S100 bus to Edison */

All of the above 1508 CPLD internal code is in fact quite simple.  The 1508 is really only there because the Edison does not really have enough GPIO pins to directly control the S100 bus. In fact you could probably get away with one or two GALs.  However the advantage of using the 1508 CPLD is we can use the extra pins to add other circuitry to the board.

There are a number of "spare" jumper pins on the board connected to the Edison level shifters, the CPLD and LED bar that can be used for additional circuitry in the patch area.  Please remember however that all the Edison "spare" pins are not GPIO pins and these pins are really for specialized functions.   It took me a long time to appreciate that all the Edison pins are not created equal -- at least in the default Linux Yocto mode.  Please also remember that absolutely no connection to the Edison pins can exceed 1.8V. Always keep the +5V side of the level shifters.

Finally I should point out the Edison does supply a 1.8V outlet (JP19 pin 2).  This can in fact be used to drive the level shifters by jumpering K2 1-2.  However to be safe and not have an overload in the patch area I decided to add a LD1117V18 regulator. With this regulator the 1.8V line comes from K2 2-3.

Finally you will see the board utilizes our old "GAL0"  GAL (U14).  We have used this design on all our S100 bus slave boards.  Inputting from Port ED from the Z80 monitor will activate the Edison (When LED D4, Edison ready, is on).  If you use our V3 SMB board you don't actually need this GAL, Just lower one of the four TMA lines as described for that board.

Step By Step Building the Edison Board
The build instructions are fairly simple for this board but because it is a complex board building it should not be rushed.  As always, first examine the bare board carefully for scratches or damaged traces, use a magnifying glass if need be.  A broken trace is almost impossible to detect by eye on a completed board.

Build the board up in functional steps. Avoid the temptation of adding everything at once and popping it into your S-100 box. Step by step is faster in the end -- trust me.  We will set the board up as a true S100 bus slave.  By programming the CPLD and with the additional circuitry on the board it can in fact run as a bus master.  I will leave this arrangement to our more experienced users (hint, pins 12, 45, 41 & 44 of the CPLD).
   
Solder in all the required IC sockets, resistors, resistor arrays, capacitors, jumpers, and the 5V and 1.8V voltage regulators.  The LD1117V18 does not need a heat sink. Do not add the LED's yet. Be sure you put the resistor arrays in with the correct orientation of pin 1. Check their values before soldering (they are difficult to remove).  Insert all jumper arrays. Be sure and have pin 1 of the CPLD socket on the LHS.
  
For prototype boards I generally use "double swipe" IC sockets. For a critical board like this I prefer to use "Machine Tooled" IC sockets.  However they are more expensive and you have to be particularly careful not to bend the IC pins.  The two clock oscillators can have their own special sockets (e.g. Jameco #133006) but actually I find the "Machine Tooled" IC sockets make a better connection.  I in fact solder the 2MHz oscillator (P7) directly to the board since it will never be changed.
 
Place the board in the bus. Check the voltage to sockets on the board is about 5V by placing the board in your S-100 system using an extender board. With no load you will typically get 5.00V  (+/- 0.2V).  BTW, your system should boot and run correctly with its Z80 master CPU board. If not, you have a serious solder bridge somewhere on the board.  Before you do anything else with a magnifying glass go over every socket on the board and examine for proper solder joints. I like to "reheat" each joint just to be on the safe side. The silk screen/varnish on these boards us quite thick. It's easy not to have a good solder joint for the ground pins.  Double check.   Extra time here will save you hours later, (Been there, done that! ). 

Check you are getting +1.8V from the  LD1117V18  regulator (1.8V on pin 3 of K2.)

Next insert all 5 LED's. Before soldering them in place ground one at a time pins 3,5,7,9 & 11 of U13 to be sure they are OK.    (I always use a blue LED for D7 "Board Active"  in my systems).  Add the LED BAR and check the LED's light up correctly (wiggle them around to test by raising the appropriate U7 socket pin high before soldering it in place). You can also socket the LED bar if you like.

There is one major construction decision you need to make with this board right at the start.   The Edison unit sits quite high on the board.  If you use 0.1" sockets to house it  the board will prevent the next S100 bus slot from being used.  If you solder the Edison directly to the board this is not a problem.   The only issue with the latter is that the breakout board is a little expensive and very difficult to remove if you damage it. Fortunately the more expensive Edison "chip" itself is easy to remove from the breakout board itself, but if anything is going to be "blown" it will probably be on the breakout board.   You will also need to clip the J1 and J2 jumper pins.  J2 is unused here. J1 should be shorted.  The 8V power to the board (J21) also needs to be bent at right angles.   Here is a picture of the mini-breakout board.
  
  Mini Breakout board

The five TXB0108 adaptors can also be soldered directly to the S100 board.  They will in fact allow the board to fit next to an adjacent S100 board in the bus, but the spacing is very tight.  You can use the Jameco # 103191 10 pin connectors. You can also cut (the center section) of 40 pin Low profile Sockets (Jameco #526272). These will have a lower profile. I prefer to solder them directly to the S100 board and cut off the extra pin lengths at the back with a clippers.   The lowest profile sockets I could fine for the breakout board are Jameco #70827 (female 40 pins which have to be cut to 28 pins and male #2168211 headers)).
 
Before you do any else you need to insert the 1508 CPLD (U6) and program it.  If you are using a new CPLD you could do it later, but if you are reprogramming an old one depending on the code there may be direction/pin conflicts.  Program the CPLD with the code supplied at the bottom of this page.  
          
Next you need to program the GAL (U14) again with the code at the bottom of this page.
Add the P12 (16MHz Oscillator) and P7 (2MH Oscillator).  Add U14, U17 & U21. Jumper P8 1-2, K1 2-3. 
With the Z80 "O'" command active the S100 bus TMA0 line.  P8 1-2 should go from High to Low and back to High after each "O" command.
Add U24, U13, U19 and U11 & U12 (TBX108's). Jumper K4 2-3, Jumper P9, P28 1-2. Add the Edison board. Be sure you have all the pins lined up correctly.   Jumper K2 2-3.
Please remember that for 3 or more pin jumpers, pin 1 is always the square pad. It is not necessarily the one on the top, or LHS.

Add U11 and U12 a TBX0108s , and U3.  Power up the system. After ~30 seconds the "Edison Ready" LED D4 should light up.  When it does then use the  Z80 "O" command  and show that the "Edison Active" D7 (blue) LED lights up.  Here is a picture of the board at this stage.
    
  Build1
   
Note the two surface LED's on the Edison board also light up. Do not go further until you get the above test to work.  If need be,  modify your CPLD code to light up the "Diagnostic LED2" (D5)  to step through the initialization code. You can also use the Edison Eclipse IDE to pass back a handshake signal on say (P24 to The Led Bar P31). This test is the heart of the board. It must work for everything below to work.  You actually don't need the U14 GAL if you switch via our V3 SMB.

As described above,  launch the Intel Eclipse IDE. Connect to your Edison unit over WiFi. Edit the S100_Edison.c code so
TEST1 = TRUE. Compile and run.
(I realize we have a chicken and egg issue here. You should read this section and the software section below before going further. The build process requires you thoroughly understand how to load and run the S100_Edison.c code on your Edison board during the build process).

This will activate the following test code within the program (after initializing everything):-

while(TEST1)                                                  // <--- DIGNOSTIC TEST (Loops forever if active)
    {
    mraa_gpio_write(pin[EDISON_READY],LOW);                   // LOW from Edison board -> LED D4
    sleep(1);
    mraa_gpio_write(pin[EDISON_READY],HIGH);                  // HIGH from Edison board -> LED D4
    sleep(1);
    printf("S100_Edison running. LED D4 should Flash On/Off\n");
    }

The LED D4 should flash on and off every second. Do not go further until you get this to work. 
          
Next add U8, U9, U2, U15, and U16. Jumper JP5 & JP4.
Add U18, U20 and U23,  (TBX108's).

Edit the S100_Edison.c code so only
TEST2 = TRUE. Compile and run.
If you have the SMB you should see the address lines in your system increase from 0 to FFFFFH over time.
Here is the relevant code within S100_Edison.c.

while(TEST2)                                  // <--- DIGNOSTIC TEST (Loops forever if active)
    {
    printf("The S100 bus address lines should increase from 0H to FFFFFH\n");
    for(i=0;i < 0xFFFFF;i++)
        {
        SetRAMAddress((long)i);               // Set the S100 bus address lines
        Send_sMEMR();                         // Send pSync and raise sMEMR status line on S100 bus (will stay up).
        Send_pDBIN();                         // Send pDBIN pulse to S100 bus
        EndBusCycle();                        // Also Clear the S100 Bus Status Line
//      printf("Address = %x\n",i);           // Display current address within the Eclipse console
        usleep(10000);
        }
    }

 Here is a picture of the board at this stage:-
       
  Build2
        
Next add U5, U4, U7 and U10.
Edit the S100_Edison.c code so only
TEST3 = TRUE. Compile and run.
You should see a continuous stream of the number "3" on you console.  Here is the relevant code:-

while(TEST3)                                    // <--- DIGNOSTIC TEST (Loops forever if active)
    {
    printf("The S100 bus console should continuously display '3'\n");
    while(TRUE)
        {
        WritePort(CON_OUT_PORT, 0x33);          // Write a 3's to CON_OUT_PORT continuously
        usleep(1000);
        }
    }

Edit the S100_Edison.c code so only TEST4 = TRUE. Compile and run.
Any keyboard character you type should appear on your console. Here is the relevant code:-

while(TEST4) // <--- DIGNOSTIC TEST (Loops forever if active)
    {
    char c;
    printf("Read a keyboard character and print it on screen\n");
    while(TRUE)
        {
        while(!GetStatus());                      // Check if a character is available
        c = ReadPort(CON_IN_PORT);                // If so get the character
        WritePort(CON_OUT_PORT, c);               // Write a 3's to CON_OUT_PORT
        }
    }


Do not go further until you get these routines to work.  Once you have these working you are well on your way to having a completely functional system

If the above is OK, add the rest of the items to the board.   Jumper JP6 and JP23.
Within Eclipse/S100_Edison set
TEST1,2,3 & 4 to FALSE. Compile and Run. 
With the Z80 "O" command now the complete Edison monitor should sign on. See below for details.
Here is a summary Video demo.


The Edison Software
Total control of the S100 bus is obtained by programming the Edison in C code.  The C code is actually quite large with many repeatedly utilized routines.  These routines totally synthesize ALL the S100 bus signals.  As far as any other S100 bus board knows, there is just another temporary master running the S100 bus -- just like for example, our  6502, 8086 or 68K  CPU's.  You can display RAM, query a port, output to a printer or speech synthesizer  etc.  It's very important to appreciate that we have two Atom Silvermont cores running at 500 MHz and one Intel Quark core at 100 MHz driving the bus.  This is like placing a Lamborghini engine in a Honda Civic.  Even though our Edison C code appears verbose,  the chip still spends most of its time waiting for the S100 bus to respond.  Simple (no-optimized C code) to display RAM for example behaves about as fast as a 5MHz Z80.

One somewhat confusing aspect of working with the Edison is that there are a few ways the Edison breakout boards 56 pins are named and numbered.  Both the GCC and Eclipse compilers use the
"mraa.h" library for pin designations.  Its absolutely critical you use the correct pin name when programming the Edison breakout board.  They are well illustrated in the board schematic (see below) but here is a summary picture.
   
  Edison Pinouts   Edison Pin Numbers

Remember every pin MUST go through a TBX0108 voltage level shifter before it is connected to the rest of the components on the board. If you decide to attach the Edison breakout board to the S100 bus board via sockets (as opposed to soldering it directly to the S100 board), you will have to make your own sockets.  I used 20X2 Jameco sockets (#111705) and cut both to 14X2 in length with a small saw.  The TBX0108 adaptors use 10X1 sockets (Jameco #103191).

Before digging deep into this fairly tricky process having the Edison control the S100 bus pins, lets start with a simple example.  We will write (in Eclipse) a simple program to flash the "diagnostic LED1" (D4), on our S100 board.  We will have it do this all the time once the Edison powers up without any user logon/interaction.

As mentioned above,  you need to program the 1508  CPLD U6 with the Edison CPLD code provide at the bottom of this page.  This code will not change in all the discussions below -- just be sure it is correct. In this example only one line of the CPLD code is relevant:-

!EDISON_READY_LED = !EDISON_READY;

If the input pin 24 of the 1508 CPLD goes low then lower its pin 4. 

Next we program the Edison. Here is the Eclipse C code -- called 
S100test1.c

#include "mraa.h"
#include <stdio.h>
#include <unistd.h>

#define FALSE 0
#define TRUE 1
#define LOW 0
#define HIGH 1
#define EDISON_READY 23

int main()
{
    mraa_gpio_context LED_pin;
    LED_pin = mraa_gpio_init(EDISON_READY);
    mraa_gpio_dir(LED_pin, MRAA_GPIO_OUT);

    while(TRUE)
        {
        mraa_gpio_write(LED_pin,LOW);
        usleep(100000);
        mraa_gpio_write(LED_pin,HIGH);
        usleep(100000);
        }
}

All we want the Edison to ever do in this case is flash the LED D4 on the board.  We first compile and run the program within Eclipse using WiFi to transfer the runtime code to the Edison. You can actually insert printf statements in the code to send progress back to the Eclipse IDE console at this stage if you like. (I usually use the debug mode  option for the compile).  The compiled code will be in the windows folder
username\workspace_iot\S100test1\Debug

Next with WINSCP copy the file
S100test1 across to your Edison directory /home/root.
With WINSCP change it's file properties from
rw-r--r--,644 to rwxr-xr-x, 755. 

Reboot your S100 system. With PuTTY login to root. Then type:-
./S100test1   

Remember case is important in Linux names.  The LED D4 should pulse continuously.  If this does not work check if you are getting a pulse on U11 pin 13.  If not check your hardware.  This output goes to pin 24 of the CPLD U6.  If there is no pulse on pin 4 of U13 check your CPLD code.

Good progress!  Now we need to convert our little program to a
service so that it starts up every time without user login.
In Linux we write the following service text file named
S100Run.service:-

[Unit]
Description=S100Run Program Activated <------
After=pulseaudio.service
[Service]
ExecStart=/home/root/S100test1
[Install]
WantedBy=basic.target

This file must be placed in the special Linux directory
/lib/systemd/system. Again use WINSCP to do so.  We will name it S100Run.service
Finally in Linux we need to "activate" this service by typing (from the
/home/root
directory).
systemctl enable S100Run.service

Then reboot your S100 computer.  If you have your PuTTY serial link hooked up you will see amongst the stream of Linux initialization messages the following:-     
 
Test1Service.jpg

A little later the D4 LED will start flashing continuously. Note,  there is no need for the above serial connection for this to happen.
At this point you are well on your way to then upload the main
Edison monitor program.

Running S100_Edison.c
We are now ready to run the main Edison board software that will control the S100 bus.   As I said above, this program is fairly large and should be studied carefully to understand what is going on.  The C code is simple in itself with no "fancy" C coding tricks. Essentially the program initializes all the Edison pins as to their input/out modes. It also sets up a few pins to interrupt the Edison while it is running.  It then goes into a continuous loop reading the S100 bus console keyboard commands passing the back as S100 bus signals.   Here is how the process works.

The Edison takes about 20 seconds to initialize on rebooting. Once it is ready (S100_Edison is running as a service), it will lower its
EDISON_READY mraa pin 40 (GP82). This pin goes to the CPLD U6 pin 28.  This allows a bus master (Z80) to pass control to the Edison board via the CPLD by returning ACTIVATE_EDISON (CPLD pin 27) to the Edison mraa pin 25 (GP129).   The Edison then goes into an endless loop reading the keyboard monitor input and carrying out menu commands.  The 'Z' command brakes the Edison out of this loop, and yields the S100 bus back to the bus master.  It then waits for the next (if any) ACTIVATE_EDISON signal.  This is all the Edison ever does in this mode.  That said,  programming the phases and timing of the S100 bus signals are critical.   There is ample room to fine tune the code. 

Please note the Edison takes about 20 seconds to setup Linux (and the above service). It will not respond to a Z80 monitor 'O' command until this is done.  The Diagnostic LED D4 is programmed to light up when the Edison is ready. Nothing will happen if you use the Z80 Master 'O' command until this LED is on.

To run all this we will first create and run the code within Eclipse uploading it to the Edison via WiFi.  The Edison monitor code is called
S100_Edison.c.  It can be downloaded from the bottom of this page.

Before we start however we need to inactivate the above
S100test1. service 
Delete if from the /lib/systemd/system directory with WINSCP or type
systemctl disable S100test1.service
Then reboot your S100 system.  Select your Edison unit within the Eclipse IDE. Compile and run the program.  
The Eclipse Console will display

Waiting for Activate command.
Waiting for Activate command.
Waiting for Activate command.

.....
until you hit the Z80 ROM 'O' command.  This activates the Edison/S100 linkage. The Eclipse Console will display
S100_Edison running

Then the Edison Menu will appear on your S100 system.  We will go into this menu in a moment.  For now however we have to get free of the Eclipse requirement to launch the software each time.  We must run S100_Edison as a
service!
The compiled code will be in the windows folder
workspace_iot\S100_Edison\Debug

Next with WINSCP copy the file
S100_Edison across to your Edison directory /home/root.
With WINSCP again change it's file properties from
rw-r--r--,644 to rwxr-xr-x, 755 

Reboot your S100 system. With PuTTY login to root. Then type:-
./S100_Edison

Reboot your system and hit the Z80 ROM 'O' command.  This again activates the Edison/S100 linkage. The Edison Menu will appear on your S100 system.
We are almost there! All we need to do now is run S100_Edison as a service.
Now we need to run S100Edison as a service, we can just modify the S100Run.service file in /lib/systemd/system :-

[Unit]
Description=S100_Edison Program Activated <------
After=pulseaudio.service
[Service]
ExecStart=/home/root/
S100_Edison
[Install]
WantedBy=basic.target


This file must be in the special Linux directory
/lib/systemd/system and your S100_Edison file in /home/root.  Both must have rwxr-xr-x, 755  properties. 
Check the actual text is correct in the S100Run.service file. (If something goes wrong,  Linux clears the file text).
For some reason you also have to reactivate the service. So type:-
systemctl enable S100Run.service

Then reboot your S100 computer and type the Z80 monitor 'O' command. 
The Edison Menu should show and behave as shown below.


What is this board good for.
There are numerous potential applications.  First because the board totally controls the S100 bus it can be use as a diagnostic tool to debug bus hardware problems.  I have written an "Edison Monitor" in C for the Edison which signs on as shown here to illustrate this:-
  
  
  Monitor 1

You can see that the Edison board signs on with monitor commands that you are familiar with for our Z80 and 8086 and 68K CPU boards.  
For example to display RAM here is a picture:-
      
  Monitor Dispaly RAM
 
Here is a "Memory Map" of my S100 system as seen by this Edison board:-
  
  Monitor memory map

The "G" command is special. It brings up a sub-menu of commands that allow you to directly control some of the important S100 bus signals.
Here is a list of the current commands:-
    
  Query Port
 
There are also a few higher level commands to test your hardware. For example the above picture shows an input from the SMB IOBYTE port. 
A useful debugging command is "H" this should display your address lines increasing from 0 FFFFFFH on the HEX display of your SMB.

Interrupts.
In the default configuration of the S100_Edison program interrupts are not enabled.  Remove the comments on these lines in
S100_Edison.c:-

case S100_INT:
              pin[S100_INT] = mraa_gpio_init(S100_INT);             // By Default S100 Interrupts are not turned on
              mraa_gpio_dir(pin[S100_INT], MRAA_GPIO_IN);
              mraa_gpio_isr(pin[S100_INT], MRAA_GPIO_EDGE_RISING, &InterruptRoutine,NULL);
              mraa_gpio_use_mmaped(pin[S100_INT],1);
              break;
 
The 'M' command listed above will trap an interrupt (with jumper P22 2-3) coming into the "mraa.h" library pin 36 of the Edison (U23 pin 13) .   It will jump to the routine "InterruptRoutine()" upon the rising edge of the signal. You write your own code within that routine in S100Edison.c.   You have a wide choice of how the interrupt arrives here. Within the CPLD you can recognize either the S100 bus INT* (S100 pin 73), NMI* (S100 pin 12) or any of the S100 Interrupt vector lines via P22.  Typically a P22 input would be processed within the CPLD passing the interrupt on to E_S100_INT on U23 and then on to the Edison.  If required within the CPLD you could send back a INTA* acknowledge (CPLD pin 70) to the S100 bus.   INT* is usually generated on a board such as our MSDOS support board via an 8259A. That signal comes into the CPLD (already pritorized etc.) via its pin 39.  It is up to the user to decide the route and process of interrupts with this board.

Note, when using the monitor remember all numeric values are in HEX (unless indicated otherwise). 
For any continuously running command hitting the ESC key will abort the process. The data entry format is as for our other CPU board ROM monitors.

There are a number of spare Edison GPIO pins that are brought out to the board "Patch Area". There are also a few CPLD pins unassigned and brought out to the patch area.  You can use these to develop other hardware for the board. The is also an unused 10 pin connector at the top of the board for external connections.

The second potential of the board is to use it as a self contained Linux computer system utilizing some of the S100 boards for I/O, printers, speech etc. There is no reason why you cannot setup a S100 bus/Linux based Internet connection using this board.  To do this you will need to follow and explore the numerous Edison articles and forums on the web.

Here is a short video showing the Edison board in action.
 
  
Please note this is a large file. You may have to allow your computer time to download the file.
  

Edison Board Jumper Table
There are less than the usual number jumpers on this CPU board compare to our earlier boards.  That said, they need to be set carefully.  To run the board as a bus slave (with a Z80 master) with a PHI bus speed of  8.0 MHz (16 MHz Oscillator).  Here is a typical jumper setup:-
         
 
Jumper   Function 
JP5 Normally closed. Generate the S100 bus MWRT signal on this board when it is active.
JP4Normally closed. Generate the S100 bus 2MHz Clock signal on this board when it is active.
JP23 Normally closed. Pulls SIXTN* high
P11, P12Normally not used. Used to pull-up NMI* & INT* if board is a bus master
JP7,JP8, JP9,JP10 Normally all open unless the board is a bus master.
JP13 Normally open. Used if board wants to utilize the S100 bus Phantom Line
P26 & P29 +5V and GND posts for board patch area
JP6 Normally closed. Allows code in CPLD to lower the S100 bus Reset line
JP1, JP2, JP3 IEEE-696 GND lines, normally open.
P37 Connector to attach ribbon cable for patch area if required
P28Normally 1-2, Defines how board utilizes the S100 bus Reset signal
K1 Normally 2-3, Reset the CPLD
K2Normally 2-3. Source of board 1.8V power supply.
P6 or P5CPLD JTAG programming socket. (For Rockfield Research 1508 programmer use P5. Pin 1 is bottom left).
P16,P21,P20 Jumpers for spare CPLD pins, normally unconnected.
P24,P17,P18,P19 Unused Edison pins (level shifted to 5V)
P8 S100 Bus TMA line to activate board. Normally 1-2 (or 3-4) closed.
P15 Jumpers to patch connections to extra S100 bus lines. Normally all unconnected
P22 Inputs from S100 bus Interrupt vectors. Normally all open.
SW1 This is a mini push button switch. Push once to stop the monitor action. Push again to restart. (Check orientation at R5)
Other Jumpers These jumpers are posts to connect experimental circuits in the patch area to other parts of the board.

Edison S100 Board Parts
The Edison unit can be obtained from a number of manufactures.  Mouser is an excellent source (Part # 607-EDI2ARDUIN.AL.K ) . SparkFun  provides excellent support for the unit with many helpful write-ups on it site. See here.  The 1508 CPLD can also be obtained from Mouser  (Part # 556-ATF-1508AS-10JU84). Most of the other components I obtained from Anchor Electronics and Jameco.   A BOM is provided below.


Edison CPU Board  Bugs & Notes.
Remember if you are using the onboard port EDH,  (with GAL0) to activate the board be sure you jumper P36 1-2 & 3-4.  This is because other boards may be expecting the TMA0* line to be low when this board is active.   The onboard port alone will not lower the TMA0* line. 
 

Also remember upon power up of your system the Edison requires about 30 seconds for the internal Linux OS to boot. Only then will the D4 LED light up and the board respond to your Z80 "O" command. An S100 bus reset will not reboot the Edison, it remains active all the time but does not control the bus unless control is passed to it.

No hardware errors/traces have been noted on the board to date.  However in both the schematic and silkscreen the TXB1020's are named "TBX1020's".  Also there is a plated through hole between the S100 bus connector pins 23 & 24 which should have been higher up.  It should not be a problem since the S100 bus connectors normally connect to the lower half of the gold pads (and not between the pads).  However check your system, if necessary cover the area with varnish/tape.

Please note, there is still something "not quite right" running  the S100_Edison program as a service.  The Edison powers up fine and runs the program
S100_Edison (as shown above).  However if you look at the serial linked PuTTY Linux initialization messages,  Linux does not return to the \Root prompt.  This is not the case for the S100test program.  I suspect it has something to do with where the service is placed in the startup queue I'm hoping some more experienced Linux users here can figure this out. If you need to get back to the \Root prompt on startup,  simply replace the "S100_Edison" text with the "S100test" text in the S100Run.service file in /lib/systemd/system using WinSCP.  BTW, Running S100_Edison from Eclipse is never a problem.

Please note the above step by step build bringing up the Edison (TEST1, etc.) assumes a virgin Edison unit.  If you are doing a second board first "clean up" the Edison unit by reflashing the chip. I have had some strange effects installing already programmed units (with the service running etc.) -- have not have time to find out why.

Finally the KiCAD schematic looks a little strange because I had to fool KiCAD into connecting the SMD TXB0108's to use the same pins as the adaptors.
The most current version of this board is V1.21
 

Realizing that a number of people might want to utilize a board like this together with a group of people on the  Google Groups S100Computers Forum,  a "group purchases" is now open.  Pleased "order" your board(s) there.

    
The links below will contain the most recent schematic of this board.
Note, it may change over time and some IC part or pin numbers may not correlate exactly with the text in the article above.

Intel Edison Linux Install Package to run from Windows (64 Bit)     ( v2016.1.002    5/25/2016)
WinSCP download for Windows (64 Bit)                        (v5.8.3  5/26/2016)
Notepad++ download for Windows         
                          (v6.9.2   6/6/2016)
Edison Board KiCAD Schematic Pdf file                       V .21  (3/16/2017)
Edison CPLD Code (Zip file)                                      V1.21a    (2/192017)

Edison CPLD Code (Pdf file)                                      V1.21a    (2/192017)
U14 GAL Code (GAL0)                                           (1/22/2017)
S100_Edison C Code (Zip file)                             
    V 1.21 (2/19/2017)
S100_Edison C Code (Pdf file)                                  V1.21  (2/19/2017)
S100test.zip   (Zip file)                                                   (1/22/2017)
Edison V1.21 Board BOM                                                        (2/24/2017    Supplied by Rick Bromagem)
Edison V1.21 Board KiCAD Folder
                                  V1.21  (2/19/2017)


Other pages describing my S-100 hardware and software.
Please click here to continue...

This page was last modified on 03/29/2017