Building a REX
Building Steven Adolf's REX from scratch.
Brian K. White - firstname.lastname@example.org
Bill of Materials. Order each of these.
These are parts to build 3 REX boards. You can't order fewer than 3 PCBs from OSHPark, but if you only want to build one or two boards, you can reduce the quantities of the parts from DigiKey.
- 3/8" wide fabric ribbon (Target, Walmart, Michaels, etc all have it)
- Card stock, such as from a cereal box. 2 pieces 1/2" x 1-1/2" per REX.
- 1/2" wide permanent double sided tape (Target, Walmart, Michaels, etc all have it)
- Don't use foam double sided tape, or anything compressible. Use thin tape and a hard spacer material. The tape and the card stock are for building up a couple mm thickness of spacer on the bottom of the REX, to prevent the REX from dropping too deeply into the socket, where the socket pins will snap in over top of the edge of the REX. You specifically want it to be solid material that does not compress.
- Xilinx "Platform USB" programmer.
- I used this actual ebay item: http://ebay.com/itm/112073269777
- But ebay links die after a while, so if/when the link above is dead, just search for "Xilinx Platform USB" on ebay or amazon etc.
- There are a lot of overpriced programmers, and I include the official Xilinx ones in that group. There is no reason I can see why a jtag programmer should cost $200.
- So, go on ebay and search exactly "xilinx usb", then sort by "price+shipping, lowest first, and filter by buy-it-now.
- Then skip the cables and adapters until you get to the actual programmers. You want one of the kits that has the programmer and several adapter cables, all for about $25.
- Then expand the item pictures and verify that it says DLC9G or DLC9LP, or DLC9. Prefer DLC9G most, then DLC9LP. DLC9 is oldest but would still work fine for this. DLC10 probably works too, if you feel like spending the money.
- Don't search for DLC9G or DLC9LP directly by name, you will only get the overpriced ones. Search "xilinx usb" and then look at the pics.
- "Modern" pc to run the Xilinx ISE software to run the programmer, and the also to run a TPDD server to server complete the programming process and get software onto the M100.
- Modern, only in comparison to the Model 100. I used a 12 year old laptop about equivalent to a $200 netbook, running a current Ubuntu 16.04. Point being it is possible to do the job with very little, ie a netbook, even one running linux instead of windows or osx. It did require several gigs of hd space for the Xilinx software though, and that was for the stripped down "LabTools" package, not even the full ISE. But the OS and all software are free. Getting the LabTools software installed and working, and getting the special usb drivers working DID require some non-trivial futzing around. But I described all that [Here] if you want to use Linux.
- Sandpaper medium grit (120 or so), and a cutting board or other hard flat surface to lay the sandpaper on.
- This is just to clean up and smooth the edges of the PCB a little.
- Do not necessarily need anything fancy. I actually used this exact one.
- Or the strongest reading glasses you can get at the local Walgreens, maybe add a headband led light.
- Don't really need this. The flux above can be left on, or cleaned with warm water.
What am I forgetting...
- Test Hook (to clip onto the jtag vcc pin)
- Piece of wire to go from the test hook to R3 while flashing the CPLD.
- Just a little 6 pin section snapped off of one stick. The rest are not needed, but you almost can't buy them in any smaller quantity.
Later, you also need
- A Model 100, 102, or 200. To provide +5vdc power to pins 1 & 14 to program the Xilinx, and also to flash the REX manager software.
- Monoprice 479 cable, for connecting the M100 to the modern pc to complete the software load. If you get exactly this cable, then you do not need any other gender-changer or null-modem adapters between the Model 100 and the modern pc's 9-pin com port or usb-serial adapter.
- Very likely need a usb-serial adapter too, since no modern pc has a serial port. Anything will do. Even the cheapest junkiest Prolific-based cable is good enough, and has the right 9 pin connector the match the cable above.
Install these parts:
- 29F800 (on the back side)
- R1 = 0 ohm
- R3 = 10K ohm
- C4 = 1.0 uF
All other locations left empty.
Simple Drag Technique to solder the chips with an ordinary solder pen and flux. No fancy professional soldering station needed.
Orientation of the chips:
Spacer & Extractor
- 1/2" double sided tape
- Cereal box
- Cloth Ribbon, 3/8" to 9/16" width.
Apply double sided tape to bottom of REX (The side with only the flash chip and no writing).
Cut a length of about 2 1/2" of ribbon, and melt the cut edges with the soldering pen to keep them from fraying. Stick the rex to the center of the ribbon, aligned lengthwise.
Turn the REX over and add another piece of double sided tape on top of the ribbon.
Cut a piece of cereal box about 1/2" x 1-1/4", and stick that to the tape.
Program the CPLD with the .jed
Now we need to flash the CPLD (Xilinx) with the .jed file. This configures the blank CPLD into a functional device or circuit that actually does something.
- Install LabTools 14.7 from Xilinx
- Supply +5vdc to pin 1 of the board edge, and gnd to pin 14.
- The simplest way to do this is just pop the REX into a Model 100 (or 102, or 200) with new batteries or a wall plug, turn it on, go into BASIC and issue a "POWER CONT" command. This will scramble the ram in the M100, so back up any files you want on the M100 first.
- Another option is take any 5v phone charger, cut off the usb plug, cut off 3 inches of the outer insulation so you have 2 separate wires, strip 1/4" of insulation off of those, and use rubber bands wrapped around the REX to hold the red wire on pin 1, and black or bare on pin 14.
- (TODO indicate where pin 1 and 14 are)
- Hook up the "platform usb" programmer to the jtag pins with the short section of single row pin header.
- (The staggered/offset holes makes tension on the straight row of pins, which holds them in place and makes a solid contact without any fancy spring loaded sockets or clips.)
- Temporarily pull PORT_EN high on the CPLD (the Xilinx chip) by temporarily jumping from the jtag vcc pin to R3, on the side closest to the center of the board. (Be careful and get this right. The other side of R3 is GND. If you short vcc to gnd you may burn out the LP2980 3.3vdc regulator on the REX.) Just clip a test clip to the jtag vcc pin and manually hold the other end touching the side of R3 for the few seconds it takes iMPACT to program.
- While holding the PORT_EN jumper/probe in place, use iMPACT to program the .jed file.
Flash the Firmware
The firmware gets written to the flash memory. This includes an option-rom image loaded in one of the 32k blocks of flash, which in turn contains REXMGR.
To do this, follow the directions for the 4.9 update. The "update" also works for first-time install.
4.9 update directions The latest advice from Steven Adolf is to use the Build 162 files, not higher.
TODO: This step needs you to run a tpdd server on a modern machine and install a dos on the M100. Should walk through the process of using teeny and dlplus.