8520 dissection
Posted: Thu Oct 20, 2022 5:56 am
Previous thread: MOS 6522 dissection //NMOS
Side track: NES PPU\APU dissection
First: thanks to all those who make these chip dissections possible.
This thread is about a transistor level dissection of the MOS 8520 CIA (Complex Interface Adapter),
brought to you by Frank Wolf and ttlworks.
8520 features two 8 Bit parallel I\O ports (with handshake),
two 16 Bit timers (down counters),
a 24 Bit binary timer\counter with ALARM function,
plus an 8 Bit shift register for "serial communication".
8520 was used in the Commodore 1581 floppy disk drive, and there are two 8520 chips in every Amiga.
8520 builds on the 8521\6526 (which was used in the C64 and C128),
but in the 8520 a few things are different, see the list below.
8520 datashet at zimmers.net
Datasheet page 11, 1.5.13:
In the datasheet, CRA7 (TODIN) sets the TOD predivider for 50Hz/60Hz mains frequency.
In the silicon, there is no TOD predivider, CRA7 read is supposed to be 0, and writing CRA7 has no effect.
The Amiga Hardware Reference Manual confirms
that CRA7 read is supposed to be 0, and that writing CRA7 has no effect.
Note:
For consistence with Frank's notation, low_active signals are named foo#, not /foo.
Orientation for all the chip pictures: D2 pad is North.
;---
8520 and 8521\6526 internally are completely different from the 6522,
and to me it feels like the MOS designers simply had re_invented the wheel
after Bill Mensch (TM) had left MOS.
To make it short: the only thing the 8520 has in common with the 6522 is DIP40.
;===
Now for the difference between 8520 and 8521.
8520:
2) R/W# falling edge is delayed by an inverting super buffer plus three inverters.
4a) PA0..7 have push/pull outputs with a pullup to VCC.
4c) PB6 and PB7 have "open collector" outputs with a pullup to VCC.
5a) FLAG# pad has a pullup to VCC.
5b) TOD pad has a pullup to VCC.
5c) PC# output is "open collector" with pullup to VCC.
7a) CRA7 is cleared on reset, writing to CRA7 has no effect, CRA7 is unused.
8e) in one_shot mode, writing TA_HI sets CRA0 for starting timer A.
9e) in one_shot mode, writing TB_HI sets CRB0 for starting timer B.
10) interrupt source is delayed by one PHI2 cycle before it enters ICR0..4.
14) TOD (time of day) is a 24 Bit binary counter, counting rising edges on the TOD pad without a prescaler.
8521:
2) R/W# falling edge is delayed by four inverters. //slightly less delay than in the 8520.
4a) PA0..7 have "open collector" outputs with a pullup to VCC.
4c) PB6 and PB7 have push/pull outputs with a pullup to VCC.
5a) FLAG# pad has no pullup to VCC.
5b) TOD pad has no pullup to VCC.
5c) PC# is a push/pull output.
7a) CRA7 works and is used for switching the TOD predivider between 50Hz and 60Hz mode.
8e) only a CRA write can set CRA0.
9e) only a CRB write can set CRB0.
10) interrupt source is not delayed by one PHI2 cycle before it enters ICR0..4.
14) TOD (time of day) is a BCD counter, incremented by a div5/div6 prescaler which counts rising edges on the TOD pad.
//To make it short: to me, trying to replace a defective 8520 with an 8521 doesn't look like a good idea.
;---
Bugfix:
[Mar 2026] Thanks to Daglem for posting some comments\corrections in the 8521 dissection thread.
Since I dissected the 8521 and the 8520 in parallel, I felt a need to check that 8520 dissection again.
Demorganization error in 8e), 9e): polarity of TA_Q and TB_Q was wrong. Fixed.
Side track: NES PPU\APU dissection
First: thanks to all those who make these chip dissections possible.
This thread is about a transistor level dissection of the MOS 8520 CIA (Complex Interface Adapter),
brought to you by Frank Wolf and ttlworks.
8520 features two 8 Bit parallel I\O ports (with handshake),
two 16 Bit timers (down counters),
a 24 Bit binary timer\counter with ALARM function,
plus an 8 Bit shift register for "serial communication".
8520 was used in the Commodore 1581 floppy disk drive, and there are two 8520 chips in every Amiga.
8520 builds on the 8521\6526 (which was used in the C64 and C128),
but in the 8520 a few things are different, see the list below.
8520 datashet at zimmers.net
Datasheet page 11, 1.5.13:
In the datasheet, CRA7 (TODIN) sets the TOD predivider for 50Hz/60Hz mains frequency.
In the silicon, there is no TOD predivider, CRA7 read is supposed to be 0, and writing CRA7 has no effect.
The Amiga Hardware Reference Manual confirms
that CRA7 read is supposed to be 0, and that writing CRA7 has no effect.
Note:
For consistence with Frank's notation, low_active signals are named foo#, not /foo.
Orientation for all the chip pictures: D2 pad is North.
;---
8520 and 8521\6526 internally are completely different from the 6522,
and to me it feels like the MOS designers simply had re_invented the wheel
after Bill Mensch (TM) had left MOS.
To make it short: the only thing the 8520 has in common with the 6522 is DIP40.
;===
Now for the difference between 8520 and 8521.
8520:
2) R/W# falling edge is delayed by an inverting super buffer plus three inverters.
4a) PA0..7 have push/pull outputs with a pullup to VCC.
4c) PB6 and PB7 have "open collector" outputs with a pullup to VCC.
5a) FLAG# pad has a pullup to VCC.
5b) TOD pad has a pullup to VCC.
5c) PC# output is "open collector" with pullup to VCC.
7a) CRA7 is cleared on reset, writing to CRA7 has no effect, CRA7 is unused.
8e) in one_shot mode, writing TA_HI sets CRA0 for starting timer A.
9e) in one_shot mode, writing TB_HI sets CRB0 for starting timer B.
10) interrupt source is delayed by one PHI2 cycle before it enters ICR0..4.
14) TOD (time of day) is a 24 Bit binary counter, counting rising edges on the TOD pad without a prescaler.
8521:
2) R/W# falling edge is delayed by four inverters. //slightly less delay than in the 8520.
4a) PA0..7 have "open collector" outputs with a pullup to VCC.
4c) PB6 and PB7 have push/pull outputs with a pullup to VCC.
5a) FLAG# pad has no pullup to VCC.
5b) TOD pad has no pullup to VCC.
5c) PC# is a push/pull output.
7a) CRA7 works and is used for switching the TOD predivider between 50Hz and 60Hz mode.
8e) only a CRA write can set CRA0.
9e) only a CRB write can set CRB0.
10) interrupt source is not delayed by one PHI2 cycle before it enters ICR0..4.
14) TOD (time of day) is a BCD counter, incremented by a div5/div6 prescaler which counts rising edges on the TOD pad.
//To make it short: to me, trying to replace a defective 8520 with an 8521 doesn't look like a good idea.
;---
Bugfix:
[Mar 2026] Thanks to Daglem for posting some comments\corrections in the 8521 dissection thread.
Since I dissected the 8521 and the 8520 in parallel, I felt a need to check that 8520 dissection again.
Demorganization error in 8e), 9e): polarity of TA_Q and TB_Q was wrong. Fixed.