Building a REX
Introduction
Building a REX from scratch, using the files and info released by Stephen Adolph.
Brian K. White - bw.aljex@gmail.com
Files Used
Pictures
Parts/Materials
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 and Verical.
- When you press "order it" you get 3 boards.
- This cart is pre-loaded with quantities to build 3 REX boards.
- Order 1 flash chip per REX. (so, 3 chips if you want to build 3 boards)
- Pick any version of the chip which matches this pattern:
- AM29F800BB-##E*
- Where:
- ## = Speed: 90 or lower (90 or faster)
- E = Package: Must be "E" (TSOP)
- * = Temperature range: Any
- Example (what I got):
- AM29F800BB-70EK
Non-electronic materials:
- 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.
Tools
- 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 to grind down the edges of the board until the through-holes are half gone, leaving "castellated" board edge terminals.
- Soldering pen. Do not necessarily need anything fancy. I used this one:
- Solder, fine pitch, rosin core. I used this
- https://www.radioshack.com/products/radioshack-1oz-silver-sdr015
- Notice 0.015" Diameter. You don't have to use quite that fine, I just like it for this.
- As long as I'm posting links from MicroCenter...
- http://www.microcenter.com/product/448396/No-Clean_Flux_Core_Solder_Sn63-Pb37_-_2_Ounce_Spool
- It doesn't say so on the MicroCenter site, but the manufacturer site shows that part number is .020 diameter. Perfect. Not silver bearing, but the 63/37 mix is ideal.
- Flux. Almost anything will get the job done for a one-off project. I used:
- Or the strongest reading glasses you can get at the local Walgreens, maybe add a headband led light.
- Getting into the really optional stuff here... just for cleaning the flux residue off later. And theoretically both the flux pen and the flux in the solder above (not the Radio Shack one) claim to be cleanable with only warm water, or not need to be cleaned at all if you don't want. But I like to use 99.9% alcohol so the part dries completely immediately.
What am I forgetting...
- test hook (to clip on to the jtag vcc pin)
- piece of wire to go from the test hook to R3 during programming.
- 6 pins snapped from a single-row male pin header.
- http://www.microcenter.com/product/426789/10_01_40_Single_Row_Headers
- 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 (or more likely, the usb-serial adapter on the modern pc).
- 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.
Assembly
Shape the PCB
Place a sheet of medium grit sand paper on a cutting board and sand the long edges of the pcb down until the holes are about half gone. Use the white marker lines in the corners. Sand until the edge of the board is almost to the lines, but the lines are still there.
Electronic Components
Install these parts:
- AM29F800BB (pin 1 marker dot is hard to see because it's copper not silkscreen, but it's there)
- XCR3064XL
- LP2980
- 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
- 3/8" Ribbon
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.
Flash the Firmware
There are two things to flash;
- The .jed, which configures the blank CPLD into a functional circuit or device. You must flash the .jed first.
- The firmware, which (I think?) runs on the device created by the .jed ?, and (this part is certain) includes an option-rom image loaded in one of the 32k blocks of flash, which contains REXMGR.
.jed
- 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 has a good chance to scramble the ram in the M100, so back up any files you want on the M100 first.
- Another option is just 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.
- 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.
firmware
Follow the directions for the 4.9 update.
This happens to also serve as a way to do a first-time flash of the firmware and REXMGR software.
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.