MainHELP Glossary Hardware SAL Workshop Companies FTP ToolsBackAbout

CIA 6526

Employed in: C64, C128, SX64, 1570/71/81

The CIA (Complex Interface Adapter) is a peripheral IC which is used in the C-64 for controlling the serial bus and the keyboard, among other things.

Technical Data


Links: 'A Software Model of the CIA6526'

Pinout

[Picture of 6526]
Fig. 1: CIA

Signal Description

(Click here for ASCII version)

Pin(s) Signal Dir Description
1GND- Ground (0V).
2-9PA0-PA7progr. Port A 0-7.
10-17PB0-PB7progr. Port B 0-7. With the control registers A and B, bits 6 and 7 can be programmed to indicate an underflow of timer A and B.
18/PCout Port control. Indicates availability of data on port B or both ports [1].
19TODin Time of day. A TTL signal carrying the mains frequency (derived from the 9VAC) of 50Hz (PAL) / 60Hz (NTSC) is applied here to trigger the realtime clock.
20Vcc - Supply voltage (+5V DC).
21/IRQout Interrupt ReQuest. Becomes LOW when it matches a set bit in the interrupt control register on ocurrence of the corresponding event. In the C64, this line is connected to the CPU's /IRQ pin (CIA #1) or to the /NMI pin (CIA #2), respectively.
22R/-Win Read/-Write. 0=read on data bus, 1=write on data bus.
23/CSin Chip select. 0=coupled to data bus, 1=tri-state.
24/FLAGin Flag input. See /PC (pin 18).
25ø 2* in Phi 2. System clock signal. All data bus action takes place only when ø2=1.
26-33DB7-DB0in/out Data bus.
34/RESin Reset. 0=reset the CIA to initial state.
35-38RS3-RS0in Register select. These four pins select one of the CIA's internal registers.
39SPin/out Serial port. In/output of the shift register.
40CNTin/out(?) Counter. In/(out??)put of shift register clock or trigger input for interval timer [1].

* The 'ø' is used as Greek 'phi' here.
progr. = programmable

Technical info

In the C64, CIA #1 (at $DC00) controls keyboard and joysticks, while CIA #2 (at $DD00) controls the serial bus and the user port.

In the 1570/71/81, the CIA is used to implement the fast serial bus.

Wolfgang Lorenz has detailled information in his article 'A Software Model of the CIA6526'. This article, a test suite for testing CIA compatibility of emulators, and other files belonging to it can be found on Funet.


[1] Hardware-Basteleien zum C64/C128, ISBN 3-89090-389-4
[2] 64 intern, p.69, ISBN 3-89011-000-2


Updated: February 24th, 1998
Created: January 30th, 1997
Status : Verified on December 12th, 1997

Site copyright © 1997 by Marc-Jano Knopp
This document is part of MJK's Commodore 64 & LCD Page
Brought back to life by Peter Schepers, Dec 10, 2005 because I really liked this site!