Next: PIA module, Previous: CIA module, Up: Module formats [Contents][Index]

#### 9.2.2.6 VIA module

The VIA 6522 is the predecessor of the CIA and also an I/O port chip with 2 8-bit I/O ports, a shift register, two timers and interrupts.

Version numbers: Major 1, Minor 0.

Type | Name | Description
BYTE | ORA | Output register A
BYTE | DDRA | Data direction register A
BYTE | ORB | Output register B
BYTE | DDRB | Data direction register B
WORD | T1L | Timer 1 Latch value
WORD | T1C | Timer 1 counter value
BYTE | T2L | Timer 2 latch (8 bit as only lower byte is used)
WORD | T2C | Timer 2 counter value
BYTE | RUNFL | bit 7: timer 1 will generate IRQ on underflow; bit 6: timer 2 will generate IRQ on underflow
BYTE | SR | Shift register value
BYTE | ACR | Auxiliary control register
BYTE | PCR | Peripheral control register
BYTE | IFR | active interrupts
BYTE | IER | interrupt mask
BYTE | PB7 | bit 7 = pb7 state
BYTE | SRHBITS | number of half-bits to shift out on SR
BYTE | CABSTATE | bit 7: state of CA2 pin, bit 6: state of CB2 pin
BYTE | ILA | Port A Input Latch (see ACR bit 0)
BYTE | ILB | Port B Input Latch (see ACR bit 1)