Building a REX: Difference between revisions

From Tandy Tech
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
[[File:diy_rex_1.jpg|800px]]
[[File:20190730 232012.jpg|800px]]
=Introduction=
=Introduction=
Building Steven Adolf's REX from scratch.<br>
Building a REX, BKW version.<br>
Brian K. White - bw.aljex@gmail.com
This is essentially a REX1 with a modified pcb layout from Steven Adolph's original.<br>
Electronically identical.<br>
Software identical.<br>
PCB shaped to snap into a 3d-printed carrier, and provide connections for power and PORT_EN for programming the CPLD.


:[https://drive.google.com/open?id=0Bys6eLbSbYyhV3NEdjhvWFlYMDg Files Used]
==Parts & Materials==
<!-- Build 254 obsoletes the build 162 -->
*[https://oshpark.com/shared_projects/DKF7eN1c PCB]
<!-- :[http://bitchin100.com/wiki/index.php?title=REX_Release_4.9 Steven advises to use 4.9 Build 162] -->
*[http://www.digikey.com/short/qtqhcf Electronic Components] (or [http://www.digikey.ca/short/qtqr90 In Canada])
:[https://goo.gl/photos/7wRjuTUDv6cojpjU9 A few pictures from the build process]
 
==Parts/Materials==
Bill of Materials. Order each of these.<br>
These are parts to build 3 REX boards, because you will get 3 boards from OSHPark. If you only want to build one or two boards, reduce the quantities of the parts from DigiKey before checking out.
 
<!-- *[https://oshpark.com/shared_projects/vFF7oXfw Printed Circuit Board] (Earlier version, possibly usable for NEC?) -->
<!-- *[https://oshpark.com/shared_projects/o3YL0OEB Printed Circuit Board] (dead link) -->
*ONE of these: [https://oshpark.com/shared_projects/05Wk0mj8 PCB] OR [https://oshpark.com/shared_projects/5R4KDv8D Pre-castellated PCB]
 
*[http://www.digikey.com/short/qtqhcf Electronic Components, US] or [http://www.digikey.ca/short/qtqr90 Electronic Components, Canada]
: If the flash memory chip is on backorder: [[REX:flash|How to Identify a Compatible Flash Chip from Elsewhere]]
: If the flash memory chip is on backorder: [[REX:flash|How to Identify a Compatible Flash Chip from Elsewhere]]
 
*[http://shpws.me/RngB Carrier]
*[https://www.target.com/p/offray-174-grosgrain-ribbon-3-8-x-21ft-white/-/A-51687907 3/8" to 9/16" wide, strong, flat, fabric ribbon]
 
*[https://www.target.com/p/scotch-double-sided-tape-1-2in-x-450in/-/A-14045762 1/2" wide permanent double sided tape]
 
*Card stock, such as from a cereal box. 2 pieces 1/2" x 1-1/2" per REX.
<!-- info that matters, but also clutters up the page
 
:The tape and card stock are for building up a spacer on the bottom of the REX, to prevent either edge of the REX from dropping deep enough into the socket for the socket pins to snap out over the top surface of the REX. If this is allowed to happen, then you risk damaging the socket when you try to get the REX back out. This means that neither the tape nor any other part of the spacer can be spongy or compressible, so no double-sided foam tape, and no cork or corrugated cardboard or foam board for the spacer material.
-->


==Tools==
==Tools==
* Xilinx "Platform USB" programmer.
*Xilinx "Platform USB" programmer. A $25 Chinese clone is fine.
:I used this actual ebay item: http://ebay.com/itm/112073269777
:https://www.ebay.com/sch/i.html?_nkw=xilinx+usb&_sop=15
:
:Look for model DLC9G preferrably. DLC9LP next. DLC9 least. DLC10 is even newer and better and would work too, but is more expensive and not neccessary for this.
: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.
:Get one that includes a "flying leads" cable.
: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.
:Don't put "DLC9G" or "DLC9LP" in the search, you will only get the overpriced ones. Search "xilinx usb" and then look at the pictures, and pick one that shows DLC9G on the label and includes a flying leads cable.
:So, go on ebay and search exactly "xilinx usb", then sort by "price+shipping, lowest first, and filter by buy-it-now.
:[[File:DLC9G Clone.jpg|thumb]]
: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 with at least one usb port, and a COM port or usb-serial adapter.
*PC with at least one usb port, and a COM port or usb-serial adapter.
:To run the Xilinx software to program the CPLD, and to run a TPDD server to complete the programming process, and to get software onto the M100.
:"Modern", only in comparison to the Model 100. I used a 12 year old atom-powered netbook, running Ubuntu 16.04. The point is it is possible to do the entire job with very little special requirements, IE even a dirt cheap netbook running only free software and OS is enough. It did require several gigs of hard drive space for the Xilinx software though, and 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 [[https://drive.google.com/folderview?id=0Bys6eLbSbYyhVFBQSW1pclpjaWM Here]] if you want to use Linux. (TODO: Windows directions, MAC directions)


*Sandpaper, medium grit (120 or so)
*Sandpaper, medium grit (120 or so), and a flat surface like a cutting board.
:This is just to clean up and smooth the edges of the PCB a little.


*[http://www.microcenter.com/product/391332/12_Watt_Miniature_Corded_Soldering_Iron Soldering Iron]
*[http://www.microcenter.com/product/391332/12_Watt_Miniature_Corded_Soldering_Iron Soldering Iron]
:Do not necessarily need anything fancy. I actually used this exact one.
:Do not necessarily need anything fancy. I actually used this exact one to build a few REXs, although now I use a Hakko FX-888D.


*[http://www.microcenter.com/product/448396/No-Clean_Flux_Core_Solder_Sn63-Pb37_-_2_Ounce_Spool Solder, fine pitch, 63/37, no-clean flux or rosin core]
*[http://www.microcenter.com/product/448396/No-Clean_Flux_Core_Solder_Sn63-Pb37_-_2_Ounce_Spool Solder, fine pitch, 63/37, no-clean flux or rosin core]
Line 58: Line 35:


*[http://www.microcenter.com/product/458849/Three_Lens_Multi-Magnifier Magnifying Glasses]
*[http://www.microcenter.com/product/458849/Three_Lens_Multi-Magnifier Magnifying Glasses]
:Or the strongest reading glasses you can get at the local drug store.
:Or the strongest reading glasses you can get at the local drug store. 3.00x or more if you can find them.


*[http://www.microcenter.com/product/451968/Technical_Grade_Isopropyl_Alcohol_999_-_32oz Alcohol for cleaning up]
*[http://www.microcenter.com/product/451968/Technical_Grade_Isopropyl_Alcohol_999_-_32oz Alcohol for cleaning up]
Line 65: Line 42:
*[http://www.microcenter.com/product/411268/Ultra_Fine_Point_Slanted_Tweezers__-_Black Tweezers]
*[http://www.microcenter.com/product/411268/Ultra_Fine_Point_Slanted_Tweezers__-_Black Tweezers]


*[http://ebay.com/itm/262802420892 Test Hook] to jump between the jtag vcc pin and PORT_EN (R3) to program the CPLD.
*[http://www.microcenter.com/product/426789/10_01_40_Single_Row_Headers Single-Row pin header]
:You only need 10 pins. Break off a section of 6 pins, and a section of 4 pins.
 
*A Tandy Model 100, 102, or 200.
 
*A [[Model_100_102_200_600_Serial_Cable|9F-25M-Null-Modem Serial Cable]]
 
=Prep the PCB=


*[http://www.microcenter.com/product/426789/10_01_40_Single_Row_Headers Single-Row pin header]
Lay a piece of medium grit (100-200) sandpaper face up on a hard flat surface like a cutting board.
:Just need a little section of 6 pins snapped off of one stick. The rest are not needed, but you almost can't buy them in any smaller quantity.


*A Model 100, 102, or 200.
Sand the edges of the PCB on the sandpaper just enough to clean off the panelization break-away points.


*[[Model_100_102_200_600_Serial_Cable|Serial Cable]]
Use magnification to look closely at the castellated edge contacts for copper or gold "flags" hanging on the edge of most contacts. Scrape them off with and xacto knife.


=Assembly=
=Assembly=


==Electronic Components==
==Electronic Components==
Install these parts:
Solder these parts onto the matching labeled locations on the pcb.
 
:29F800 (on the back side)
:29F800 (on the back side)
:XCR3064XL
:XCR3064XL
:LP2980
:LP2980
:R1 = 0 ohm
:R1 = 10K ohm
:R3 = 10K ohm
:C1 = 1.0 uF
:C4 = 1.0 uF
 
All other locations left empty.
 
Orientation of the chips:
:[[file:rex_chips_orientation.jpg|320px]][[file:rex_chips_orientation_zoom.jpg|320px]]
 
How to solder the chips without special tools: [https://youtu.be/erb6-i54tbo DRAG TECHNIQUE] , another example: https://youtu.be/09qb0KY_IF4
 
Pay extreme attention to the flash chip on the back. Use magnification to inspect those legs after soldering. Bridges are very easy to get and very hard to see on legs that small.
 
==Spacer & Extractor==
:1/2" double sided tape
:Cereal box
:Cloth Ribbon, 3/8" to 9/16" width.


Cut a length of ribbon about 2 1/2" long, and melt the cut edges with the soldering pen to keep them from fraying.
Don't be afraid of those tiny legs on that TSOP-48 nand flash memory chip. Just use magnifying glasses, lots of flux, and the [https://youtu.be/erb6-i54tbo DRAG TECHNIQUE]. Another example: https://youtu.be/09qb0KY_IF4
Use a lot of flux, and little solder.


Apply double sided tape to bottom of REX (The side with the flash chip, not the Xilinx).
Pay extreme attention to the flash chip. Use magnification to inspect those legs after soldering. Bridges are easy to get and hard to see on legs that small.


Stick the ribbon to the tape on the REX, in the center of the ribbon, aligned lengthwise.
==Clean==
Even "No-Clean" flux should still be removed as much as possible after soldering. But without an ultrasonic cleaner, it is just about impossible to get the flux cleaned out from under the chips. So, using no-clean just means the flux that inevitably isn't removed, won't be too harmful. Use 99% isopropyl alcohol and a small paint brush to wash the flux off.


Add another piece of double sided tape on top of the ribbon, only as long as the REX is.
==Carrier==
 
Just snap the assembled pcb into the carrier. Place the end of the PCB without the big hole in the carrier first, then lower the other end down over the pin on the carrier. Flex the end of the carrier open a little and snap the PCB in.
Cut a piece of cereal box about 1/2" x 1-1/4", and stick that to the tape, aligned lengthwise, centered on the REX.


=Programming=
=Programming=


==Program the CPLD with the .jed==
==Program the CPLD==
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.
Now we need to flash the CPLD (Xilinx) with the '''.jed''' file. This configures the blank CPLD into a functional circuit that actually does something.
 
* Get the .jed file from [http://www.club100.org/memfiles/index.php?&direction=0&order=&directory=Steve%20Adolph/REX/info here].


* Install LabTools 14.7 from Xilinx
*Get the .jed file from [http://www.club100.org/memfiles/index.php?&direction=0&order=&directory=Steve%20Adolph/REX/info here].
:[https://drive.google.com/folderview?id=0Bys6eLbSbYyhVFBQSW1pclpjaWM Linux]
:[[Xilinx:Windows|Windows]]


* Supply +5vdc to pin 1 of the board edge, and gnd to pin 14.
*Install Xilinx "ISE 14.7 Lab Tools"
: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 (tells the M100 not to turn itself off when idle). The ram in the M100 would probably get scrambled along the way, so back up any files you want on the M100 first.
:[https://drive.google.com/folderview?id=0Bys6eLbSbYyhVFBQSW1pclpjaWM Directions for Ubuntu Linux]
: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 a single row male-male double-sided pin header.
*Connect the "platform usb" programmer to the 6-pin staggered row jtag header with a 1x6 single row male pin header.
:The staggered offset of the holes, while the pins in the header are in a straight line, creates the tension so the pin header stays in place and all pins make good electrical contact without needing an actual socket. It takes some wiggling to get the pins inserted, but that is how it works.
:The LED on the usb programmer should turn green, indicating that the programmer is detecting the correct/expected 3.3vdc on the board.
:[[file:rex_jtag_pins.png]][[file:rex_programmer_hookup.jpg|320px]]


* Get the iMPACT program up and running.
*Connect 5v and PORT_EN jumper to the 4-pin staggered row header in between TP1 & TP2 with a 1x4 single row male pin header.
:FILL IN - what menu items to click on to load the .jed file, something like "Assign Configuration something..." also "verify chain" ?


* Temporarily pull PORT_EN high on the CPLD (the Xilinx chip) by jumping from the jtag vcc pin (labeled 3V3), to R3, on the side of R3 closer to the Xilinx chip. (Be careful to 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.) Lift the programmer vcc wire slightly up the jtag vcc pin, and clip a J-hook test/jumper lead to the jtag vcc pin. Then manually hold the other end of the jumper lead to touch the side of R3, and hold it there carefully.
*Launch iMPACT
:[[file:rex_port_en.jpg|320px]][[file:rex_port_en_zoom.jpg|320px]]
:https://drive.google.com/open?id=1K7ySqfbmNTNUpB0WJCxkQRjMr9pZL4MRcM0e8tpEJhc


* While holding the PORT_EN jumper in place, use iMPACT to program the .jed file.
*Program the .jed file.
: FILL IN - what actual menu options / steps?
:[[file:rex_jed_before.png|320px]][[file:rex_jed_after.png|320px]]


==Flash the Firmware==
==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.
<!--
<!--
  Build 254 rf149.co has a bug in it's tpdd routines.
  Build 254 rf149.co has a bug in it's tpdd routines.
Line 155: Line 109:
  However, the T200 version of build 254 rf249.co, seems to be ok anyway. (it worked for me)
  However, the T200 version of build 254 rf249.co, seems to be ok anyway. (it worked for me)
-->
-->
[http://bitchin100.com/wiki/index.php?title=REX_Release_4.9 4.9 update directions]
Follow the [http://bitchin100.com/wiki/index.php?title=REX_Release_4.9 4.9 update directions] to load the firmware.


<!--
<!--
Line 161: Line 115:
-->
-->


The directions for the 4.9 update state that you use any tpdd device to serve the 3 files to the M100/T102/T200, but in fact at least at present, it does not work with actual tpdd1 or tpdd2 drives at all, and is not reliable with any other tpdd server/emulator either, except [http://bitchin100.com/wiki/index.php?title=LaddieCon#LaddieAlpha LaddieAlpha].
The directions for the 4.9 update state that you use any tpdd device to serve the 3 files to the M100/T102/T200, but in fact at least at present, it does not work with actual tpdd1 or tpdd2 drives at all, and is not reliable with just any tpdd server either. You must use specifically [http://bitchin100.com/wiki/index.php?title=LaddieCon#LaddieAlpha LaddieAlpha].


TODO: Document this part better. This is a bullet list, but there are more details involved for each item to actually do it.
TODO: Document this part better. This is a bullet list, but there are more details involved for each item in order to actually do them.


*Install any dos on the M100/T102/T200: teeny, floppy, ts-dos.
*Get a proper [[Model_100_102_200_600_Serial_Cable|serial cable]]
:This will generally require a special [[Model_100_102_200_600_Serial_Cable|serial cable]].
*Install any TPDD client on the M100/T102/T200: teeny, floppy, ts-dos. If you don't have anything already, then get the "dlplus" package and run the teeny installer that comes with it.
*Get LaddieAlpha onto a modern host machine.
*Get LaddieAlpha onto a PC.
*Get the 3 update files, and share them with LaddieAlpha.
*Get the 3 update files.
*Use whatever dos you installed on the M100 to copy rf149.co to the M100.
*Run LaddieAlpha in the dir with the 3 update files.
*Use whatever TPDD client you installed on the M100 to copy rf149.co to the M100.
*Run rf149.co on the M100.
*Run rf149.co on the M100.


This was the last step. You're done! Consult the [http://bitchin100.com/wiki/index.php?title=Special%3ASearch&search=rex&fulltext=Search REX docs] to start using it!
That was the last step. You're done! Consult the [http://bitchin100.com/wiki/index.php?title=Special%3ASearch&search=rex&fulltext=Search REX docs] to start using it!


=References=
=References=
Line 180: Line 135:
[http://www.club100.org/memfiles/index.php?PHPSESSID=0iltg2un40287et7flm4m54387&direction=0&order=&directory=Steve%20Adolph Original sources and support files]
[http://www.club100.org/memfiles/index.php?PHPSESSID=0iltg2un40287et7flm4m54387&direction=0&order=&directory=Steve%20Adolph Original sources and support files]


[https://oshpark.com/shared_projects/vFF7oXfw PCB] (This is now a dead link)
<!-- [https://oshpark.com/shared_projects/vFF7oXfw PCB] (This is now a dead link) -->
 
[https://drive.google.com/open?id=0Bys6eLbSbYyhV3NEdjhvWFlYMDg Copies of some of the sources and support files, and new sources for modified from the originals]


[https://oshpark.com/shared_projects/05Wk0mj8 PCB] (This version is probably good, although it's a salvaged earlier version of the rex.brd file that has messier silk screen)
[https://drive.google.com/open?id=0Bys6eLbSbYyhV3NEdjhvWFlYMDg Copies of some of the sources and support files, and new sources for some things modified from the originals]


[https://oshpark.com/shared_projects/5R4KDv8D Printed Circuit Board, pre-castellated] (this version is converted from the original EagleCAD 5 or lower .brd file, loaded in EagleCAD 6.6 and saved as new xml format EagleCad 6.x .brd file, then imported into KiCAD 4.07 pcbnew, then the edge cut lines edited, and saved as .kicad_pcb)
<!-- [https://oshpark.com/shared_projects/5R4KDv8D Printed Circuit Board, pre-castellated] (this version is converted from the original EagleCAD 5 or lower .brd file, loaded in EagleCAD 6.6 and saved as new xml format EagleCad 6.x .brd file, then imported into KiCAD 4.07 pcbnew, then the edge cut lines edited, and saved as .kicad_pcb) -->


[https://github.com/aljex/REX1 pcb on github]
<!-- [https://github.com/aljex/REX1 pcb on github] -->

Revision as of 11:51, 2 August 2019

Introduction

Building a REX, BKW version.
This is essentially a REX1 with a modified pcb layout from Steven Adolph's original.
Electronically identical.
Software identical.
PCB shaped to snap into a 3d-printed carrier, and provide connections for power and PORT_EN for programming the CPLD.

Parts & Materials

If the flash memory chip is on backorder: How to Identify a Compatible Flash Chip from Elsewhere

Tools

  • Xilinx "Platform USB" programmer. A $25 Chinese clone is fine.
https://www.ebay.com/sch/i.html?_nkw=xilinx+usb&_sop=15
Look for model DLC9G preferrably. DLC9LP next. DLC9 least. DLC10 is even newer and better and would work too, but is more expensive and not neccessary for this.
Get one that includes a "flying leads" cable.
Don't put "DLC9G" or "DLC9LP" in the search, you will only get the overpriced ones. Search "xilinx usb" and then look at the pictures, and pick one that shows DLC9G on the label and includes a flying leads cable.
  • PC with at least one usb port, and a COM port or usb-serial adapter.
  • Sandpaper, medium grit (120 or so), and a flat surface like a cutting board.
Do not necessarily need anything fancy. I actually used this exact one to build a few REXs, although now I use a Hakko FX-888D.
Or the strongest reading glasses you can get at the local drug store. 3.00x or more if you can find them.
Don't really need this. The "no-clean" flux above can be left on, or cleaned with warm water.
You only need 10 pins. Break off a section of 6 pins, and a section of 4 pins.
  • A Tandy Model 100, 102, or 200.

Prep the PCB

Lay a piece of medium grit (100-200) sandpaper face up on a hard flat surface like a cutting board.

Sand the edges of the PCB on the sandpaper just enough to clean off the panelization break-away points.

Use magnification to look closely at the castellated edge contacts for copper or gold "flags" hanging on the edge of most contacts. Scrape them off with and xacto knife.

Assembly

Electronic Components

Solder these parts onto the matching labeled locations on the pcb.

29F800 (on the back side)
XCR3064XL
LP2980
R1 = 10K ohm
C1 = 1.0 uF

Don't be afraid of those tiny legs on that TSOP-48 nand flash memory chip. Just use magnifying glasses, lots of flux, and the DRAG TECHNIQUE. Another example: https://youtu.be/09qb0KY_IF4 Use a lot of flux, and little solder.

Pay extreme attention to the flash chip. Use magnification to inspect those legs after soldering. Bridges are easy to get and hard to see on legs that small.

Clean

Even "No-Clean" flux should still be removed as much as possible after soldering. But without an ultrasonic cleaner, it is just about impossible to get the flux cleaned out from under the chips. So, using no-clean just means the flux that inevitably isn't removed, won't be too harmful. Use 99% isopropyl alcohol and a small paint brush to wash the flux off.

Carrier

Just snap the assembled pcb into the carrier. Place the end of the PCB without the big hole in the carrier first, then lower the other end down over the pin on the carrier. Flex the end of the carrier open a little and snap the PCB in.

Programming

Program the CPLD

Now we need to flash the CPLD (Xilinx) with the .jed file. This configures the blank CPLD into a functional circuit that actually does something.

  • Get the .jed file from here.
  • Install Xilinx "ISE 14.7 Lab Tools"
Directions for Ubuntu Linux
  • Connect the "platform usb" programmer to the 6-pin staggered row jtag header with a 1x6 single row male pin header.
  • Connect 5v and PORT_EN jumper to the 4-pin staggered row header in between TP1 & TP2 with a 1x4 single row male pin header.
  • Launch iMPACT
https://drive.google.com/open?id=1K7ySqfbmNTNUpB0WJCxkQRjMr9pZL4MRcM0e8tpEJhc
  • Program the .jed file.

Flash the Firmware

Follow the 4.9 update directions to load the firmware.


The directions for the 4.9 update state that you use any tpdd device to serve the 3 files to the M100/T102/T200, but in fact at least at present, it does not work with actual tpdd1 or tpdd2 drives at all, and is not reliable with just any tpdd server either. You must use specifically LaddieAlpha.

TODO: Document this part better. This is a bullet list, but there are more details involved for each item in order to actually do them.

  • Get a proper serial cable
  • Install any TPDD client on the M100/T102/T200: teeny, floppy, ts-dos. If you don't have anything already, then get the "dlplus" package and run the teeny installer that comes with it.
  • Get LaddieAlpha onto a PC.
  • Get the 3 update files.
  • Run LaddieAlpha in the dir with the 3 update files.
  • Use whatever TPDD client you installed on the M100 to copy rf149.co to the M100.
  • Run rf149.co on the M100.

That was the last step. You're done! Consult the REX docs to start using it!

References

User Manual

Original sources and support files


Copies of some of the sources and support files, and new sources for some things modified from the originals