[Contents]

CONTROL REGISTERS (CRA, CRB)

There are two control registers in the 6526, CRA and CRB. CRA is associated with TIMER A and CRB is associated with TIMER B. The register format is as follows:

CONTROL REGISTER A (CRA)

Bit Name Function
0 START 1=START TIMER A, 0=STOP TIMER A. This bit is automatically reset when underflow occurs during one-shot mode.
1 PBON 1=TIMER A output appears on PB6, 0=PB6 normal operation.
2 OUTMODE 1=TOGGLE, 0=PULSE
3 RUNMODE 1=ONE-SHOT, 0=CONTINUOUS
4 LOAD 1=FORCE LOAD (this is a STROBE input, there is no data storage,
bit 4 will always read back a zero and writing a zero has no effect).
5 INMODE 1=TIMER A counts positive CNT transitions,
0=TIMER A counts pulses.
6 SPMODE 1=SERIAL PORT output (CNT sources shift clock),
0=SERIAL PORT input (external shift clock required).
7 TODIN 1=50 Hz clock required on TOD pin for accurate time,
0=60 Hz clock required on TOD pin for accurate time.

CONTROL REGISTER B (CRB)

Bit Name Function
0-4 (Bits CRB0-CRB4 are identical to CRA0-CRA4 for TIMER B with the exception that bit 1 controls the output of TIMER B on PB7).
5,6 INMODE Bits CRB5 and CRB6 select one of four input modes for TIMER B as:
CRB6 CRB5    
0 0 TIMER B counts pulses.
0 1 TIMER B counts positive CNT transistions.
1 0 TIMER B counts TIMER A underflow pulses.
1 1 TIMER B counts TIMER A underflow pulses
while CNT is high.
7 ALARM 1=writing to TOD registers sets ALARM,
0=writing to TOD registers sets TOD clock.

REG NAME TOD
IN
SP
MODE
IN
MODE
LOAD RUN
MODE
OUT
MODE
PB ON START
E CRA  0=60Hz
 1=50Hz
 0=INPUT
 1=OUTPUT
 0=
 1=CNT
 1=FORCE
 LOAD
 (STROBE)
 0=CONT.
 1=O.S.
 0=PULSE
 1=TOGGLE
 0=PB6OFF
 1=PB6ON
 0=STOP
 1=START
TA


REG NAME ALARM IN
MODE
LOAD RUN
MODE
OUT
MODE
PB ON START
F CRB  0=TOD
 1=ALARM
 00=
 01=CNT
 10=TA
 11=CNT· TA
 1=FORCE
 LOAD
 (STROBE)
 0=CONT.
 1=O.S.
 0=PULSE
 1=TOGGLE
 0=PB7OFF
 1=PB7ON
 0=STOP
 1=START
TB

All unused register bits are unaffected by a write and are forced to zero on a read.


[Contents]