BBC Micro analogue in

From Deskthority wiki
Jump to navigation Jump to search

The Analogue in port is a D-subminiature 15-pin socket on the back of the Acorn BBC Microcomputer. The port provides four analogue channels, in two pairs, with each pair having an analogue ground and reference voltage. In addition, two pairs of pins allow for detecting two pushbuttons. A light pen strobe allows the port to be used for light pens.

Wiring and usage

The pins are as follows:

Port Assignment
1 +5 V
2 0 V
3 0 V
4 Analogue channel 3
5 Analogue ground
6 0 V
7 Analogue channel 1
8 Analogue ground
9 Light pen strobe
10 Pushbutton 1
11 Joystick 2 reference voltage (1.8 V)
12 Analogue channel 2
13 Pushbutton 0
14 Joystick 1 reference voltage (1.8 V)
15 Analogue channel 0

The provision of a single socket means that pairs of joysticks must share a single plug. In theory, a splitter cable could also be produced should two people have already purchased separate joysticks.

The joystick wiring, for a pair of joysticks, is as follows:

BBC Micro analogue in (two joysticks).svg

Analogue to digital conversion

In the Advanced User Guide for the BBC Microcomputer (third edition, November 1983), the analogue input is described as 10 bit, with full reference voltage being reported as 1023. A hardware register is available to select between 8-bit sampling and 10-bit sampling; selecting 8-bit sampling decreases the ADC delay from 10 ms to 4 ms. The decoder chip is a 7002.

BBC Microcomputer System User Guide, 1982, indicates that the ADC produces figures in the range 0 to 4095, and for the purposes of the API these are scaled up to 0 to 65520 to allow for future ICs to provide more accurate readings. The reference voltage is 1.8 V, with this giving 65520. The 1984 edition of the manual, for the Model B+, indicates that 1 V gives around 35158, and that while the decoder chip is 12-bit, only 10 bits of accuracy should be used unless great care is taken.