8521 dissection
Posted: Wed Nov 30, 2022 10:03 am
Previous thread: 8520 dissection
//In some parts, 8520 and 8521 are pretty similar. In some other parts, they are not...
First: thanks to all those who make these chip dissections possible.
This thread is about a transistor level dissection of the MOS 8521 CIA (Complex Interface Adapter),
brought to you by Frank Wolf and ttlworks.
8521 features two 8 Bit parallel I\O ports (with handshake),
two 16 Bit timers (down counters),
a BCD real time clock (TOD, time of day) with ALARM function,
plus an 8 Bit shift register for "serial communication".
8521 is the HMOS-II successor of the 6526.
8521 is supposed to be a compatible plug_in replacement for the 6526.
8521 was used in: C64, SX64, C128(D), 1570, 1571.
Nevertheless, somebody better check for little differences between 6526, 6526A, 8521.
For instance, whether the ICR (interrupt control register) responds to an interrupt event\source
with a 1 cycle PHI2 delay or not...
Me and Frank were unable to find an 8521 datasheet in the internet.
So I'm linking to the 6526 datasheet intead.
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.
;---
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 8521 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, counting rising edges on the TOD pad with a prescaler.
//To make it short: to me, trying to replace a defective 8520 with an 8521 doesn't look like a good idea.
;---
Bugfix:
[Jan 2024] //Maybe dissecting 8520 and 8521 in parallel wasn't a good idea.
Re_calculated resistor values assuming 10kOhm/square FET: 3c, 3c, 4a, 4b, 4c, 5c, 5d, 5e, 13. Done.
A pullup had sneaked into the schematics for SP, CNT: 5d, 5e. Fixed.
PB0..PB5 outputs were not push/pull in the schematics: 4b. Fixed.
Bugfix:
[Mar 2026] Thanks to Daglem for posting some comments\corrections.
Demorganization error in 8e), 9e): polarity of TA_Q and TB_Q was wrong. Fixed.
A transparent PHI2 latch was missing in my 10a) schematic. Fixed.
A pullup actually does not pull up to VCC in 10b), I didn't notice a missing via in the chip picture. Fixed.
//In some parts, 8520 and 8521 are pretty similar. In some other parts, they are not...
First: thanks to all those who make these chip dissections possible.
This thread is about a transistor level dissection of the MOS 8521 CIA (Complex Interface Adapter),
brought to you by Frank Wolf and ttlworks.
8521 features two 8 Bit parallel I\O ports (with handshake),
two 16 Bit timers (down counters),
a BCD real time clock (TOD, time of day) with ALARM function,
plus an 8 Bit shift register for "serial communication".
8521 is the HMOS-II successor of the 6526.
8521 is supposed to be a compatible plug_in replacement for the 6526.
8521 was used in: C64, SX64, C128(D), 1570, 1571.
Nevertheless, somebody better check for little differences between 6526, 6526A, 8521.
For instance, whether the ICR (interrupt control register) responds to an interrupt event\source
with a 1 cycle PHI2 delay or not...
Me and Frank were unable to find an 8521 datasheet in the internet.
So I'm linking to the 6526 datasheet intead.
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.
;---
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 8521 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, counting rising edges on the TOD pad with a prescaler.
//To make it short: to me, trying to replace a defective 8520 with an 8521 doesn't look like a good idea.
;---
Bugfix:
[Jan 2024] //Maybe dissecting 8520 and 8521 in parallel wasn't a good idea.
Re_calculated resistor values assuming 10kOhm/square FET: 3c, 3c, 4a, 4b, 4c, 5c, 5d, 5e, 13. Done.
A pullup had sneaked into the schematics for SP, CNT: 5d, 5e. Fixed.
PB0..PB5 outputs were not push/pull in the schematics: 4b. Fixed.
Bugfix:
[Mar 2026] Thanks to Daglem for posting some comments\corrections.
Demorganization error in 8e), 9e): polarity of TA_Q and TB_Q was wrong. Fixed.
A transparent PHI2 latch was missing in my 10a) schematic. Fixed.
A pullup actually does not pull up to VCC in 10b), I didn't notice a missing via in the chip picture. Fixed.