Acorn Electron

Introduction

Released in 1983, the Acorn Electron from Acorn computers was intended to be a low cost version of their very popular BBC micro computer. It was a lot smaller (35x7x16 cm) than the BBC micro and required an add-on expansion box (Acorn Plus) to make the machine very useful but it at least had the essential connections. As well as having a simplified motherboard compared to the BBC micro, the Electron uses an AC mains adapter which also cuts down on the overall size of the machine.

The CPU that the Electron uses is a 6502A which is essentially the same as the BBC micro's CPU and runs at a maximum speed of 2MHz but drops to 1MHz when accessing RAM. Because of this slowness of reading/writing RAM, programs in the ROM will run faster than code run from RAM. There is 32KB RAM but very little is available to BASIC programs as the OS used some of the RAM and the display used a large amount. There is one channel sound which plays through the in-built speaker and a number of graphics modes ranging from 160x256 to 640x256 and a maximum of 16 colours in the lowest resolution mode and just 2 colours in the highest resolution mode.

Most of the BBC micro was emulated using a single ULA (Uncommitted Logic Array) chip from Ferranti but it did so in a limited form. This chip can be a cause of the Electron not working because it is socketed;reseating the chip (while the power is off, of course) can fix startup or hanging problems.

Please note that unless otherwise stated all screen captures were taken using RGB video upscaled.

Overview

Have a look at the Electron:

At the left side you have an RF port (for connecting to TV), composite video (black and white), RGB and cassette (loading and saving was commonly done with cassettes and floppy disks and with the expansion box cartridges could also be used). On the right side you have the AC power input connector, and at the back you have the expansion edge connector, which took a number of add-ons including the Acorn Plus module. As was typical of microcomputers of the time, the Electron has a built-in keyboard at the top, which has the BASIC keywords written on the front of the keys; press CAPS LK/FUNC and a letter key to insert the BASIC keyword. For a summary of how to use the keyboard please see:

http://www.acornelectron.co.uk/ugs/electron/acorn_computers/ug-english/chapter005_eng.html

The Electron does not have a power switch (unlike the BBC micro) and switches on as soon as you plug in power; you will hear a start-up bleep not too dissimilar to that of the BBC micro, and the yellow LED to the left of the CAPS LK/FUNC key will illuminate. The LED is not a power light, however, and is instead the caps lock light; press and hold SHIFT and CAPS LK/FUNC and the light will go out, meaning caps lock has been turned off.

Here is a screen capture showing the very bare boot screen of the Electron:

As was typical of microcomputers of the era the Electron featured built-in BASIC for programming.

Unlike what the boot screen may suggest the Electron is capable of displaying up to 16 different colours (although 8 of them are just alternating colours), allowing the user to independently change the text and background colours, as well as the bitmap colour used for drawing graphics. As the composite video gives black and white only you will need to use the RGB connector to get colour; see 'Connecting to a TV/Monitor' in the 'Troubleshooting' section for more information.

Here is a simple program to show off the 16 colours available in mode 2 by displaying each of the colours with its number:

5 MODE 2

10 FOR I=0 TO 15

20 COLOUR I

30 IF I=0 THEN COLOUR 135 ELSE COLOUR 128

40 PRINT "COLOUR ";I

50 NEXT

The results are shown in the image that follows:

Because the background is black line 30 of the above program checks if we are to change the text colour to 0 (black) and if so sets the background colour to white; to set the background colour you add the colour value to 128. So, as white is colour 7 we add 7 to 128 which gives us 135. If, however, we are to change the text colour to anything other than black (value of 1 to 15) we set the background colour to 128, that is, black (0 is black). We could change the background colour for each text colour but then it would make the programming more difficult.

For reference, the mode 2 colours and colour values are:

0 Black
1 Red
2 Green
3 Yellow
4 Blue
5 Magenta
6 Cyan
7 White
8 Flashing black/white
9 Flashing red/cyan
10 Flashing green/magenta
11 Flashing yellow/blue
12 Flashing blue/yellow
13 Flashing magenta/green
14 Flashing cyan/red
15 Flashing white/black

Of course we cannot appreciate the flashing colours from a still image and they are very annoying should you try to write or read anything in flashing colours.

The only other thing to mention is that in line 40 we use a semicolon to join the text colour number with the word 'COLOUR'; if you used a comma instead the colour number would be tabbed but unfortunately it would cause the line to spill on to the next line and since mode 2 only gives us 32 rows the screen would scroll after the program finishes.

Unfortunately, BBC micro software ran slower on the Electron and a delay in producing the Electron computers hurt it sales and put it behind competing machines such as the Commodore 64.

For help on using the Electron why not check out the user guide:

https://www.retro-kit.co.uk/user/custom/Acorn/8bit/Electron/manuals/Acorn_ElectronUG.pdf

There is also an online version of the user guide:

http://www.acornelectron.co.uk/ugs/electron/acorn_computers/ug-english/contents_eng.html

Technical

For technical information about the Electron's expansion port check out the Acorn Electron Expansion Application Note:

http://chrisacorns.computinghistory.org.uk/docs/Acorn/AN/015.pdf

Electron Advanced user guide:

https://www.pa3byb.nl/wp-content/uploads/2017/12/Advance_user_guide_Acorn_electron.pdf

A site dedicated to the Electron featuring software downloads, online user guide, and lots of information about products for the Electron:

http://www.acornelectron.co.uk/c-home.html

Troubleshooting

Connecting to a TV/Monitor

Nowadays using the RF connection of an Electron will probably be the worst option as it requires a TV with an aerial input and tuning it in to the correct frequency and even if you was successful the video quality will be bad. The next option is the composite connection which gives an OK image and is supported by some TVs and monitors or an upscaler can be used, however, unless the Electron has been modified the output will not be in colour. It is very simple to get colour on the composite output as it just requires opening up the Electron and bridging LK4, as can be seen in this video:

The video is covers how to get sound output (as normally sound only goes through the internal speaker) by using the RF connection to output audio instead of RF video.

For the very best video quality you can make use of the Electron's RGB port but you will either need to either purchase a cable (and of course have a TV/monitor/upscaler that supports RGB) or you can make up one yourself. For a discussion on RGB to SCART (suitable for a TV or SCART to HDMI adapter) please see this site:

https://stardot.org.uk/forums/viewtopic.php?t=17260

Accessories

Acorn Plus 1

The Acorn Plus 1 is an expansion module for the Electron released on 1st September 1984 for £99 that adds two cartridge ports (for games, productivity software and programming language, limited to 16KB maximum per cartridge) as well as an analogue port (mainly for controllers) and Centronics compatible printer port, bringing the Electron more in line with the BBC Micro. The Plus 1 measures 34cm x 9cm x 5cm and plugs into the Electron's expansion port and is held in place by two large screws, ensuring the Plus 1 isn't accidentally knocked out of the computer. Software on ROM within the Plus 1 handles the control of the cartridge ports, Centronics port and analogue port.

To use a cartridge in the Plus 1 it is just a matter of plugging the cartridge into either of the two slots with the cartridge's label facing the keyboard and then turn the Electron on and the cartridge software will automatically run. If it does not, try powering off the Electron, reseat the cartridge and power the Electron back on. The Plus 1 handles cartridges using the ROM filing system which is similar to using cassette based software, however, cartridges are read only. With two cartridges inserted the cartridge closest to the keyboard will have priority over the other one.

It seems there were plans for the Plus 1 to include a serial port as evidenced by issuing *HELP while a Plus 1 is connected to an Electron:

RS423 is the serial connection type used by the BBC Micro.

The analogue port has four 8-bit ADC (analogue-to-digital converter) inputs, meaning it can take up to two joysticks or four game paddles, or it can measure four analogue voltages. from other sources. Although the ADC has resolution of 8 bits it generates numbers in the range of 0 to 65280 for BBC BASIC. The pinout, as taken from the user guide, is as follows:

1 +5V 5 volt power for digital circuit

2 0V 0 volt power for digital circuit

3 0V 0 volt power for digital circuit

4 CH3 Analogue input 3

5 Analogue Gnd 0 volt for analogue circuit

6 0V 0 volt power for digital circuit

7 CH1 Analogue input 1

8 Analogue Gnd 0 volt for analogue circuit

9 Not connected

10 PB1 Pushbutton 1 (digital input)

11 VREF Voltage reference for analogue circuit (1.8V)

12 CH2 Analogue input 2

13 PB0 Pushbutton 0 (digital input)

14 VREF Voltage reference for analogue circuit (1.8V)

15 CH0 Analogue input 0

As can be seen there are four analogue channels CH0 to CH3, two digital inputs for buttons PB0 and PB1, power 5V and 0V, and a 1.8V reference voltage VREF. The analogue GND and digital GND ('0V') are internally connected together inside the Plus 1 but it's good practice to treat them as separate if you have analogue and digital circuits connected to the Plus 1's analogue port. This is to help ensure the analogue and digital circuits do not interfere with each other but is unlikely to be a problem with simple circuits.

A simple way to test the analogue port is with four 10K (10K is the recommended minimum resistance) variable resistors so that each wiper contact go to the respective analogue input CH0, CH1, CH2 and CH3. The other two ends of each variable resistor need to be connected to Analogue GND and VREF (pin 11 and 14 are connected together internally) respectively as to form a voltage divider. For the actual connector to interface with the analogue port you maybe able to source from an old style PC joystick/gamepad provided it has the necessary connections.

You can then use the following BASIC code to read each analogue channel:

PRINT ADVAL(1)

PRINT ADVAL(2)

PRINT ADVAL(3)

PRINT ADVAL(4)

The first line prints the analogue value of channel 0, the second line the channel 1 value, and so on. With one for the four resistors turned to minimum the analogue value should be 0 and turned to maximum the value will be 65280. Note that for any other setting of the variable resistor, such as halfway resistance, the value read multiple times will likely change somewhat, for example one time as 29184, then 28928, and another time 28672. This could be caused by slight variations in the VREF voltage which will result in changes in steps of 256 since the ADC value is 8 bit scaled up.

As for testing the two button inputs, connect a switch each to PB0 and PB1 and common both of the switches to 0V. To read the state of the switches you could use these BASIC instructions:

PRINT ADVAL(0) AND 1

PRINT ADVAL(0) AND 2

If neither buttons have been pressed at the time of running the above commands then '0' will be reported for both switches but if switch PB0 is pressed then you will get a '1' for the first value and if switch PB1 is pressed then you will get a '2' for the second value.

For more information about using the analogue port please see the 'The analogue interface' in the user guide linked below:

http://chrisacorns.computinghistory.org.uk/docs/Acorn/Manuals/Acorn_Plus1UG.pdf

The Centronics port was designed for connection to a printer but could be used for other purposes. The pinout, as found in the user guide, is:

1 Strobe

3 Data0

5 Data1

7 Data2

9 Data3

11 Data4

13 Data5

15 Data6

17 Data7

19 Acknowledge

Even numbers 2 to 24 GND

21, 23, 25 and 26 are N/C.

Pin 1 is marked on the Electron with a triangle.

As the Centronics port was originally intended to communicate with printers you could take advantage of that fact for transferring data to another device attached to the Centronics port which simulates a printer but saves the data to somewhere else, much like in modern operating systems that have virtual printer drivers to save documents as PDF for example. For obtaining a suitable cable to use with the Centronics port you may be able to make use of a Raspberry Pi ribbon cable but it must be designed for the original Raspberry Pi that has a 26-pin GPIO header.

To test the Centronics port connect an LED to each of the data lines Data0 to Data7 via a 150R resistor and common the LEDs to GND. Connect a switch between Acknowledge and GND, and an oscilloscope or logic analyzer input to Strobe and GND. With the Electron turned on press CTRL and B together so that the Electron sends output to the printer port (as well as the screen). If you press a character key on the Electron's keyboard you should see the LEDs we connected to the data lines light up to reflect the character's ASCII value and Strobe will go low for about 2us. Strobe is the computer's means to tell an attached printer that there is a single data byte ready for printing and once the printer retrieves that byte it needs to signal back to the Electron that it is ready for another byte. This is done through the Acknowledge input which in our test case we take low using the switch we connected; we should really use a switch debounce circuit but for this simple test it works without. After the Acknowledge switch has been pressed we can press another key on the keyboard and the LEDs again will reflect the ASCII value of the character that was sent. If you press multiple keys without pressing the Acknowledge switch enough times then the LEDs won't change until the Acknowledge switch is pressed to clear the byte from the printer buffer.

I'll link the Electron Advanced user guide here again as it has some useful information concerning the Plus 1:

https://www.pa3byb.nl/wp-content/uploads/2017/12/Advance_user_guide_Acorn_electron.pdf

In particular, on page 245 is the ROM slot pinout, and on pages 252 to 253 has the circuit diagram.

Acorn Plus 3

Another expansion device for the Electron is the Plus 3 was released on 1st March 1985 for £229 and contains a 3.5" 320K single sided floppy disk drive so that Electron users can take advantage of disk based software. The Plus 3, as with the Plus 1, connects to the Electron's expansion port but also has an additional expansion port (port connecting the Plus 1, for example) and connection for a second disk drive. Because of the high power requirements of the Plus 3 it was shipped with its own power supply that powers both the Plus 3 and the Electron.

For the Plus 3 user guide please go to:

http://chrisacorns.computinghistory.org.uk/docs/Acorn/Manuals/Acorn_Plus3UG.pdf

Commander 3 Joystick Interface

Because the Electron had no built-in joystick ports it was necessary to use an add-on interface of which the Commander 3 by Bud Computers, released in 1984, is an example. The box is shown below:

The interface and included cassette:

The interface provides a single 9-pin 'Atari' DE9 male connector on the top to plug in a joystick (it's compatible with auto fire joysticks). The interface itself mates with the Electron's expansion edge connector so you cannot also have the Acorn Plus 1 module fitted, so no cartridge games can be used with the interface.

Utility software is provided on a cassette; one program maps joystick buttons to keyboard keys to essentially add joystick support to software that wouldn't normally use it, and another program allows the interface to work with software that uses a joystick attached to an analogue interface, which was the standard for the BBC Micro.

The joystick interface is mapped to memory address hex FCC0 and pressing a direction or the fire button on an attached joystick takes a particular CPU data bit low. The joystick and associated bit numbers are as follows:

Bit 0 Up

Bit 1 Down

Bit 2 Left

Bit 3 Right

Bit 4 Fire

I wrote a simple BASIC test program which displays on screen what joystick button is being pressed:

10 JOY%=?&FCC0

20 IF NOT JOY% AND 1 THEN PRINT "UP!"

30 IF NOT JOY% AND 2 THEN PRINT "DOWN!"

40 IF NOT JOY% AND 4 THEN PRINT "LEFT!"

50 IF NOT JOY% AND 8 THEN PRINT "RIGHT!"

60 IF NOT JOY% AND 16 THEN PRINT "FIRE!"

70 GOTO 10

Here is a forum post about the interface which includes software download links, test code, and technical information including a hand-drawn schematic:

https://stardot.org.uk/forums/viewtopic.php?t=15610

We can see the circuit is very simple, consisting of a 74LS30 8-input NAND Gate, 74LS365 3-STATE Hex Buffers, and a few resistors. While one button joysticks were common in the 80's, there's no reason why today you couldn't modify the interface to support joysticks/joypads with two trigger buttons by making use of the unused buffer and either pin 5 or 9 of the DE9 connector.

The interface is also featured on the Chris's Acorns site (now part of The Centre for Computing History):

http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Bud_Commander3JS.html

Note that at the bottom of the page it incorrectly states that the interface plugs into the Plus 1's cartridge socket.

All content of this and related pages is copyright (c) James S. 2012-2022