Back to: Build a 6502 based computer
The VIA that I added to my computer allowed me to have an LCD and a PS/2 keyboard. This is great but I would like to be able to have more peripherals on my computer, such as a gamepad. Also, I would like to keep one of the ports spare for experimentation. The way that I want to modify my circuit to allow this is by adding a second VIA.
I can think of more than one method for achieving this. The one that I am going to use is using the two chip select pins of the VIA (CS1 and CS2) to decode the required address space and connect the four register select pins to the required address space. The existing VIA is controlled by A13 and the IOEN signal. If I then tie CS1 to the address line below that of CS1 of the first VIA, A12 and tie CS2 to the IOEN signal, I will be able to have control over both VIAs.
The first VIA was in address space 6000 to 600f. This is 16 bytes of address space. The second VIA will be in the address space 5000 to 500f.
Selected register will be accessed when CS1 high and CS2 low.