Page DD

CIA 2
AddressNameBit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0Description
DD00CIA2PRASBDISBCISBDOSBCOSBAOTXD/PA2VICMEM[]Data Port A[1,2,3]
DD01CIA2PRBPB7
DSR
PB6
CTS
PB5
UPJ
PB4
DCD
PB3
RI
PB2
DTR
PB1
RTS
PB0
RXD
User Port PB0-7[4]
DD02CIA2DDRADDA7DDA6DDA5DDA4DDA3DDA2DDA1DDA0Data Direction Port A
DD03CIA2DDRBDDB7DDB6DDB5DDB4DDB3DDB2DDB1DDB0Data Direction Port B
DD04CIA2TIMALTIMALTimer A Low byte
DD05CIA2TIMAHTIMAHTimer A High byte
DD06CIA2TIMBLTIMBLTimer B Low byte
DD07CIA2TIMBHTIMBHTimer B High byte
DD08CIA2RTCTRTCTReal time clock 1/10s
DD09CIA2RTCSRTCSReal time clock seconds
DD0ACIA2RTCMRTCMReal time clock minutes
DD0BCIA2RTCHRTCHReal time clock hours
DD0CCIA2SRSRShift register
DD0DCIA2ICSNMI[14]
Source
Always 0
Unused
NMI Flag[15]
IntRel
SDR
IntRel
Alarm
IntRel
UTB
IntRel
UTA
IntRel
Interrupt Control & Status
Read top, Write bottom
DD0ECIA2CTARTC[5]SRC[6]TSRC[7]Load[8]RES[9]OVFL[10]UNFL1[11]STARTControl Timer A
DD0FCIA2CTBTCOUNT[13]Load[8]RES[9]OVFL[10]UNFL2[12]STARTControl Timer B

Multiple address ranges

CIA2 is mapped to addresses 0xDDxx but only occupies 16 bytes. Referencing any address from 0xDD1x…0xDDFx will mirror those at 0xDD0x.

Notes:

  1. SBxx Serial Bus, D=Data, C=Clock, A=Attention, I=In, O=Out
  2. Bit 2 is RS232 TXD output or the userport PA2 (Pin M)
  3. Bits 0 & 1 VIC-II memory base, %00 = Bank 3 0xC000-0xFFFF, %01 = Bank 2 0x8000-0xBFFF, %10 = Bank 1 0x4000-0x7FFF, %11 = Bank 0 0x0000-0x3FFF
  4. Port B is the user port data, either 8 I/O pins or RS232
  5. RTC 0=60Hz 1=50Hz
  6. Shift register direction SP pin 0=read, 1=write
  7. TSRC 0=count system cycles, 1=positive slope at CNT pin
  8. 1 = Load latic into the timer once
  9. 0 = Timer restart after underflow (latch reloaded), 1 = timer stops after underflow
  10. 0 = Timer overflow, port B bit 6 high 1 cycle, 1 = underflow, port B bit 6 inverted
  11. 1 = Indicates timer underflow at port B bit 6
  12. 1 = Indicates timer underflow at port B bit 7
  13. Timer counts: %00 System cycle, %01 +ve slope CNT-pin, %10 Timer A underflow, %11 Timer A underflow if CNT-pin high
  14. CIA-2 is connected to the NMI line
  15. NMI Signal occured at FLAG-pin RS232 data received