48k Spectrum
Technical Information
ULA Output

As an output device the ULA sends data to the loudspeaker and the cassette via the MIC socket. The colour of the TV border is also controlled by the ULA. Each of these internal output devices is controlled by the bit-pattern of the data sent to the ULA as follows:

Bits 0,1,2: (border) Colour
Bit 3: MIC
Bit 4: Loudspeaker

For example: 10 INPUT B
20 OUT 254, B
30 GOTO 10

Typing in numbers 0 to 7 will change the border (bits 0,1,2). Because BASIC is slow not much sound will be heard with other values. Try:
10 OUT 254, 16
20 OUT 254 ,0
30 GOTO 10

This repeatidly turns the loudspeaker bit on and off. Controlling the loudspeaker is controlled later in the Tape, Sound, Printer section. The MIC not just a 'tape out' connection, but also a 'speaker out' because the same pin controls the loudspeaker.


Expansion Connector
Built in I/O
ULA Output
ULA Input
System Variables
ZX Basic
I/O Streams
Video Display
Tape, Sound, Printer
Interface 1
©2002 ZeDeX82