# The ADC, the serial system (ACIA + serial ULA), tape and RS423 Citations as in [start-here.md](start-here.md); ADC = NEC's uPD7002 data sheet, ACIA = Motorola's MC6850 data sheet (both pinned TIFF scans, OCR in `reference/text/ocr/`). ## uPD7002 ADC (&FEC0-&FEDF) - Four channels, 8- or 12-bit conversions (the data sheet says "12 bit"; the BBC's manuals say "ten-bit": Acorn's guaranteed resolution, not the chip's word: **C6**, follow the chip for what is read back and note the BBC's 1.8 V reference makes the low bits noise). - Conversion time at a 1 MHz clock: 8-bit typically 4 ms (2.4 min, 5 max), 12-bit typically 10 ms (8.5-15) (DOC: ADC timing table); the Master's manual says "conversions take place in 5ms" (DOC: MRM "Analogue Port"). - End of conversion goes to the system VIA's CB1 (DOC: AUG 23.1, 26). The status register carries EOC, BUSY, the two top result bits and the 8/12 flag (DOC: ADC). - Inputs: the analogue port (joysticks); with nothing plugged in, a board constant per channel (a socket, `AnaloguePort`, with a default of mid-scale: HYPOTHESIS). - **Chip rule**: BBC only among planned boards; stays in the board. ## Serial system: MC6850 ACIA (&FE08) + serial ULA (&FE10) DOC: SM 3.5; AUG 20. - The ACIA serialises; the serial ULA ("serial processor", IC7) has two baud-rate generators (transmit: bits 0-2, receive: bits 3-5 of its write-only control register at &FE10), a cassette data/clock separator, the RS423/cassette switch (bit 6) and the cassette motor relay (bit 7) (DOC: SM 3.5; AUG 20.9). - Its clock: 16 MHz / 13 = 1.23 MHz (IC42), divided by 1024 inside the ULA for the 1200 Hz cassette tone (DOC: SM 3.5). MAME: "Acorn Serial ULA (SERPROC) @ 1.23 MHz" (OBSERVED), agreeing. - Tape format: 1200 baud (and 300) with a 2400 Hz carrier tone whose detection raises the ACIA's DCD (DOC: AUG 13, 20; "5 seconds of 2400Hz tone to synchronise the ACIA"). The bit encoding (a "1" as two cycles of 2400 Hz, a "0" as one of 1200 Hz) is common knowledge not yet cited from a document in hand: HYPOTHESIS until it is. AUG 20.10 describes a "BUG" fix needed when using the cassette system: read it before writing the ACIA/ULA pair. - The serial ULA is an Acorn custom chip with no data sheet in hand: its data separator's behaviour on a noisy or off-speed tape is **U12**; the board starts from clean bit-level tape images (`.uef`, `.csw`), where the separator can be modelled at the level of "tones in, bits out". - **MC6850 chip rule**: other family users exist (the 6850 is common: Atari ST keyboard and MIDI ACIAs, many arcade boards, the Tandy CoCo's RS-232 pak). Stays in the board until a second family board needs it; when it does, `mc6850-python`. The serial ULA stays. ## RS423 The ACIA through level shifters (ICs 74, 75) with RTS/CTS (DOC: SM 3.5). A socket (`SerialPort`) for a host-side device; not needed for milestone 1. ## Econet (68B54 ADLC, &FEA0) and the Tube (&FEE0) Optional on the Model B, standard interfaces on later machines; both out of scope for rows 1-3 (sockets only). The Tube is the doorway to second processors (6502, Z80, 32016, ARM): each a board of its own on a `TubeSocket`, much later. ## Judges | Behaviour | Judge | Tier | | --- | --- | --- | | uPD7002 | ADC | 2 | | MC6850 | ACIA | 2 | | serial ULA register meanings | SM 3.5, AUG 20.9 | 2 | | tape timing as the MOS reads it | the MOS itself loading a known UEF (firmware is the program) | - | | everything else | MAME (5) | detector |