# Sound: the PCD3311 tone generator and the speaker ## What the TRG says (DOC) "The Portfolio speaker is driven by a Dual Tone Multiple Frequency (DTMF) telephone dialler chip. This produces all the necessary dual tones required for tone dialling plus a set of melody tones for musical applications. The keyboard click also uses this circuit" (2.1.5). The block diagram calls it "TONE DIALLER". BIOS services: Int 61h Fn 15h sound generation, 16h melody tone (CX length in 10 ms units, DL tone code), 17h dial number, 18h mute states (3.3.1). The alarm times out after about 15 s (3.8). Programs should use the BIOS for the speaker (3.1.3). ## The chip (DOC, Philips IC03 1987, book pp. 149-) MAME names it a PCD3311 at 3,578,640 Hz (OBSERVED). The Philips sheet ("development data", October 1986): PCD3311/PCD3312 DTMF/modem/musical-tone generators, CMOS, timebase a 3.58 MHz crystal (or an external clock on OSCI); data in either **parallel** (MODE high: D0-D5 latched on the falling edge of STROBE) or **I2C** (MODE low, slave address `0100 10A0`, the same codes). D5/D4 select the family: 00 DTMF single tones / standby / melody, 01 DTMF dual (16 combinations), 10 modem tones / standby / melody, 11 melody; D3-D0 pick the tone. Codes 00/20 standby with oscillator on, 01-03/21-23 oscillator off. Output: filtered (switched-capacitor then RC low-pass) single or dual tones; two octaves of semitones for melody; output level fixed by an on-chip reference. Tables 2-5 of the sheet give every code's frequency and its deviation: the build transcribes them as facts (DOC). ## For the build - `tone.py` in the board (chip rule: no other family board uses a PCD3311): a latch of the last code, the frequency table, a sine-like pair of oscillators for dual tones (the filtered shape is "good enough" territory: Aubrey's 2026-11-13 sound rule). - Unknowns: U13 the interface the Portfolio wires (parallel through an ASIC latch, or I2C bit-banged through ASIC pins) and its port; U14 whether anything else drives the speaker (MAME lists a separate "Speaker" device, the mixing node, OBSERVED); U15 the key click's code and length. - The 1996 PCD3311C revision of the sheet is hosted by mikrocontroller.net, which refused our honest client (HTTP 403); the 1987 sheet is enough for the codes.