MOS Technology CIA
The MOS Technology CIA ( Complex Interface Adapter ) is a versatile I / O chip, which in many Commodore computers and peripherals came into use (including C64 and Amiga). He is the successor of the MOS Technology VIA.
There are four types of the CIA: 6526, 8521 and 8520, the latter was used in the Amiga and the floppy drive VC1581. An integrated version 5710 with only three registers was developed for C128DCR.
The CIAs 6526 and 8521 have two bidirectional 8-Bit-TTL-Ein/Ausgabe-Ports (all bits are each independently programmable for input or output ), a serial shift register, two cascaded 16- bit timer and accuracy of a tenth of a second real-time clock with alarm function. The 8520 has the real time clock instead of a 24 -bit timer. If the timer underflow, filled or emptied shift register, reaching the alarm time or receiving an external signal, the chip can trigger an interrupt request.
Each data line of the input / output ports can be individually switched on input or output.
The real time clock uses the 50 - or 60 - Hz mains frequency as a reference, the time, may have four registers ( tenths of a second, seconds, minutes, hours) in BCD format can be read. In addition, an alarm time to be set in an interrupt is triggered.
The timer can be triggered using an internal clock, but also include external signals. A counter underflow can trigger an interrupt and / or send a pulse to an I / O pin.