English
Language : 

W65C22S Datasheet, PDF (26/46 Pages) List of Unclassifed Manufacturers – Versatile Interface Adapter (VIA)
The Western Design Center, Inc.
W65C22S Data Sheet
The IFR and IER format and operation is shown in Tables 1-11 and 1-12. The IFR may be read directly by the
microprocessor, and individual flag bits may be cleared by writing a Logic 1 into the appropriate bit of the IFR. Bit
7 of the IFR indicates the status of the IRQB output. Bit 7 corresponds to the following logic function:
IRQ = IFR6 ∧ IER6 ∨ IFR5 ∧ IER5 ∨ IFR4 ∧ IER4 ∨ IFR3 ∧ IER3 ∨ IFR2 ∧ IER2 ∨ IFR1 ∧ IER1 ∨ IFR0 ∧ IER0.
Note: ∧ = Logical AND, ∨ = Logical OR.
IFR7 is not a flag. Therefore, IFR7 is not directly cleared by writing a Logic 1 into its bit position. It can be cleared,
however, by clearing all the flags within the register, or by disabling all active interrupts as presented in the next
section.
Each Interrupt Flag within the IFR has a corresponding enable bit in IER. The microprocessor can set or clear
selected bits within the IER. This allows the control of individual interrupts without affecting others. To set or clear
a particular Interrupt Enable bit, the microprocessor must write to the IER address. During this write operation, if
IER7 is a Logic 0, each Logic 1 in IER6 thru IER0 will clear the corresponding bit in the IER. For each Logic 0 in
IER6 thru IER0, the corresponding bit in the IER will be unaffected.
Setting selected bits in the IER is accomplished by writing to the same address with IER7 set to a Logic 1. In this
case, each Logic 1 in IER6 through IER0 will set the corresponding bit to a Logic 1. For each Logic 0 the
corresponding bit will be unaffected. This method of controlling the bits in the IER allows convenient user control
of interrupts during system operation. The microprocessor can also read the contents of the IER by placing the
proper address on the Register Select and Chip Select inputs with the RWB line high. IER7 will be read as a Logic
1.
Table 1-11 Interrupt Flag Register ($0D)
7
6
5
4
3
2
1
0
IFR
IRQ Timer1 Timer2 CB1
CB2
Shift
CA1
CA2
Register
The Western Design Center
W65C22S
26