Electron User
1st December 1986
Author: Mike Cook
Publisher: ACP/Pres
Machine: Acorn Electron
Published in Electron User 4.03
I have always viewed the Electron as a BBC Micro with all the nice parts removed, because my main interest is in interfacing all sorts of gadgets to computers. This is made particularly easy on the BBC Micro and particularly difficult on the Electron.
Now, however, the AP5 interface from Advanced Computer Products at a stroke gives the Electron those ports that are so useful on its big brother.
It occurred to the editor that some of you might not be familiar with the ways a BBC Micro can be attached to all sorts of equipment. So he has asked me to take a break from my usual role on The Micro User to explain what this remarkable device can do.
It must be emphasised that this is not a review of the product but rather a taster of some of the exciting projects you can undertake with its help.
In The Micro User I write a monthly column on interfacing and hardware projects called The Beeb Bodybuilding Course. Although some slight modifications to the driving software might be needed, most projects I have done should now run on the Electron with the AP5.
The articles have covered a wide range of interfacing so let's see what use can be made from the user port, 1MHz bus and Tube provided by the AP5.
The user port is perhaps the most useful port. On the BBC Micro this is mapped into addresses &FE60 to &FE6F whereas the AP5 has it at &FCB0 to &FCBF. This means that the software will have to be changed to reflect the new position of the port - an almost trivial task which should not prevent operation of any project.
A user port consists of eight data lines that can be programmed to be input or output. In addition there are two control lines that can be used to handshake the data lines.
Handshaking is the protocol involved in data transfer, and it normally consists of a signal indicating that fresh data is on the lines and that the receiving station is ready to receive it.
Most digital devices can be interfaced to the Electron using this port. It enables you to sense the state of switches or turn things on or off.
For instance, in the July 1983 issue of The Micro User, I produced a transition board and cable (Body Build Packs 1 & 2) to allow simple screw connection to the port. Then I showed how you could make a simple "steady hands" game using this and an old coat hanger.
In the following August and September issues I showed how you could use the outputs to control small relays and even mains devices.
Motor control can also be achieved using the user port and in the May 1984 issue of The Micro User, I showed how to control stepping motors, and DC motors were covered in the November 1985 issue.
As well as control, some interesting devices may be made to fit the port. One example for those interested in monitoring weather information was the anemometer (wind speed) in the June 1985 issue and the weather vane (wind direction) in October 1986.
For those interested in precise measurement the 4.5 digit DVM (digital voltmeter) can give a reading in volts from -1.9999 to +1.9999. This was featured in the April 1985 issue.
If you want to synthesis sounds, the digital to analog converter in the October and November 1984 issues lets you create any sound waveform you like.
If you need more than eight bits of data on the user port this can be expanded to 32 inputs and 32 outputs using a multiplexer board featured in the December 1985 issue.
The 1MHz bus (pronounced one MegaHertz) is a memory mapped area of the computer's memory for attaching devices that require more than the simple single sight bits provided by the user port.
Using this bus you can attach devices that require several address locations to drive them. The bus has room for 512 bytes of space divided into two 256 byte pages.
The AP5 board has some space in these pages that you can't use. These are in page &FC but all page &FD is free.
In the Bodybuilding course, I have used this to add extra user ports to the computer. The user port extension board in the August 1984 issue adds two chips to the bus to give you in effect four more user ports. It allows the computer to control several devices at the same time.
The board uses a block of 16 addresses in page &FC and the AP5 interface does not have a usable block that long. However, the solution is quite simple - move the user port expansion board to page &FD. This involves cutting a track and making a link on the Body Build project.
Another project that uses the 1MHz bus was the very successful sound sampler featured in January, February and March 1986. This enables you to digitise any sound and read it into the computer. Once in there you can manipulate and mangle the sound before sending it out. This allows you to produce stutter effects currently in vogue in pop music.
In addition you can get real time echo and frequency shifts as well as being able to produce music derived from the sampled sound.
This project should fit on to the AP5 without any modification. However some of the software will have to be changed slightly to work with the Electron's different architecture.
Also, the AP5 does not have an input to the audio amplifier like the BBC Micro's 1MHz port, so you will have to feed the output of the sound sampler into an amplifier.
The final port on the AP5 board is the Tube, which allows you to connect a second processor to your Electron. There are several different types of second processor on the market, each having its own strengths.
Generally a second processor gives more memory and speed by moving the computational aspect of your programs out of the Electron. It handles the number crunching while the Electron handles the input from the keyboard and the output to the screen. This division of labour results in much faster running of programs.
The second processor takes over the personality of the Electron and it will feel like you are driving a new computer. However, there are certain types that do act remarkably similarly to the Electron.
Looking at the AP5 shows it to be constructed to a high standard, it looks solid and robust.
So the AP5 interface opens up the Electron for a whole new type of computing...and you thought you were just getting your Electron mastered!