Hardware overview

From Spectrum
Revision as of 18:19, 15 November 2008 by Winston (talk | contribs) (→‎Installing the hardware)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Installing the hardware

Like most Spectrum peripherals, turn the Spectrum off, and plug it in to the Spectrum's edge connector. If you have a later Spectrum +2 or a Spectrum +3, you will need to put a jumper on J3 (see diagram below for the location). You can then plug the ethernet cable into the ethernet jack, that is on the left hand side of the Spectranet board. Assuming all is well, when you power on the Spectrum, after a couple of seconds the LINK light (third LED from the left) will illuminate. The board is now ready to go.

As is normal with electronics, take care to avoid static electricity. Handle the board by its edges, and avoid contact with IC pins or the through port.

Spectranet PCB

The three LEDs show the state of the network. The TX/RX lights will blink on send and receive. Additionally, the LINK light blinks when there is network activity.

Power consumption

A normal Spectrum in good working order has no trouble powering the Spectranet. However, the ethernet PHY will draw from 138mA to 183mA - so it is possible for the Spectranet to draw on the order of 200mA. If other peripherals are also being used, this must be borne in mind.

Jumper and header functions

The development/prototype board is 'no frills' and doesn't come with an enclosure. Here are the uses for the various pin headers on the board. Note that the jumpers are all oriented 'north/south' - if you consider the Spectrum edge connector the southmost part of the board, and the through port northmost, then all the jumpers will go north to south, never east to west. All the jumpers are 2 pin.

The JTAG header is oriented east/west.

For normal users, you will only need to be concerned with J1, J2, J3 and S1. Here are their functions:

  • J1 - RST 8 inhibit. If you put a jumper across the jumper, the BASIC error handler routine will no longer be trapped.
  • J2 - Inhibit all traps. This is used when an empty flash ROM is attached to the board, or to recover from a bad ROM image which prevents the Spectrum from starting up. You must cycle power on the Spectrum to make this jumper take effect if you've already crashed due to a bad ROM image. NOTE: Due to a layout fault, this jumper does not work correctly - see below.
  • J3 - Spectrum +3 jumper - jumper this when using a +3 or later model +2. Make sure it is not jumpered for other models.
  • S1 - The NMI switch. Momentarily short the two pins to trigger an NMI. This will bring up the NMI menu.

The issue 1 development board has a layout fault which causes J2 to not function properly. As a consequence, a pin header is not fitted to J2 on that release of the board. To use this jumper, insert a wire into the southmost pin hole, and hold it firmly against the hole. Then, hold the other end of the wire against the tab of the voltage regulator (ground) and cycle power on the Spectrum. Having three hands is useful at this stage.

Through port

This allows other peripherals to also be attached. The Spectranet has a mechanism whereby you can use some peripherals that also contain a ROM, so long as it's connected to the through port. It prevents ROM conflicts by controlling the A15 address line, inhibiting a peripheral's ROM on the through port whenever the Spectranet ROM is paged in, by holding the A15 line at logic 1. The through port contains all of the digital signals (the complete address, data and control buses), but omits a few lines due to PCB routing constraints - such as the +12v and -5v lines, and the video signals. The through port otherwise works as a 48K edge connector, even on a +3.

The JTAG connector

You only need to know about this if you want to modify the CPLD. Very few users will want to do this. Skip ahead if you're not going to be doing this.

The JTAG header is used for modifying the configuration of the CPLD. It's designed for a JTAG cable with 'flying leads' that can be slipped onto the pin header. It is recommended that a buffered JTAG lead is used, and it must be able to work from 3.3 volts - which these days should mean any JTAG cable. The pin designations are printed on the Spectranet board. From left to right, they are:

  • TDI
  • TMS
  • TCK
  • TDO
  • Ground
  • +3.3v

If you are reconfiguring the CPLD, it is best to hold the Spectrum's reset button while programming is taking place. Programming occasionally fails (during verification) if the Spectrum is not held in the reset state. You can usually get away with programming it without holding it in the reset state, which is the only option for users of a rubber key Spectrum. The Spectrum will often crash during programming/verification.

You will need the Xilinx ISE development kit from Xilinx if you want to work on the CPLD. This software can be obtained free of charge from the Xilinx web site.

Technical guide to the board

The Spectranet has the following components, pointed out on the diagram above:

  • CPLD - This is the modern day version of a ULA. Unlike the ULA in the Spectrum or peripherals from 'back in the day' which were only mask programmable in a factory, a CPLD is field programmable, and can be repeatedly reprogrammed. The CPLD takes care of functions such as deciding when to page in the Spectranet ROM into the lower 16K of the Spectrum's address space, controlling which parts of memory are paged in where, responding to the NMI switch and triggering an NMI on the Z80 CPU, and it also controls the A15 line on the through port.
  • 128K Flash ROM - This contains the Spectranet's socket library, utility functions, BASIC extensions, and the current network settings. It can be programmed by the Spectrum. Most of the flash ROM is available for programmers to use - only the first 16K and the last 256 bytes are reserved by the Spectranet. See Using flash memory to find out how to make use of the free space.
  • 128K Static RAM - This adds extra RAM to the Spectrum. Some of this memory is reserved by the Spectranet socket library - a little under 2K of the 128K available. See Using paged RAM on how to make use of this.
  • W5100 ethernet IC - A combined MAC and PHY (Media Access Control and physical layer) IC which provides the ethernet interface. Also integrated with this IC is 16K of buffer space, and a TCP/IP offload engine. The W5100 is designed for 8 bit embedded systems and is therefore ideal for the Spectrum. The chip itself can manage a throughput of up to 25 megabits/second, which is a little higher than the Spectrum's memory bus bandwidth!
  • 3.3v voltage regulator. The Spectranet has three voltages on board - 5v, supplied directly by the Spectrum, which powers the static RAM and flash ROM (and the 74HCT245 bidirectional buffer, near the voltage regulator). The CPLD and the W5100 both use 3.3 volts. The W5100 also generates a 1.8 volt supply which is only distributed to a few other pins on the W5100.
  • Ethernet magjack - The network requires magnetics for impedance matching and isolation. The RJ-45 jack on the Spectranet has the jack and the magnetics combined into one unit.