Next: , Previous: , 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.

TypeNameDescription
BYTEORAOutput register A
BYTEDDRAData direction register A
BYTEORBOutput register B
BYTEDDRBData direction register B
WORDT1LTimer 1 Latch value
WORDT1CTimer 1 counter value
BYTET2LTimer 2 latch (8 bit as only lower byte is used)
WORDT2CTimer 2 counter value
BYTERUNFLbit 7: timer 1 will generate IRQ on underflow; bit 6: timer 2 will generate IRQ on underflow
BYTESRShift register value
BYTEACRAuxiliary control register
BYTEPCRPeripheral control register
BYTEIFRactive interrupts
BYTEIERinterrupt mask
BYTEPB7bit 7 = pb7 state
BYTESRHBITSnumber of half-bits to shift out on SR
BYTECABSTATEbit 7: state of CA2 pin, bit 6: state of CB2 pin
BYTEILAPort A Input Latch (see ACR bit 0)
BYTEILBPort B Input Latch (see ACR bit 1)