Set port B of both VIAs to output. Set port A of both VIAs to
input. Connect port B to port A on both VIAs. (on the VIA at A000, wire PB0 to
PA0, PB1 to PA1, etc. -- do the same on the VIA at 8000 ). Now it's your turn to write some code. Modify
a previous
program so that it:
-
Initialize one port as input and one as output for each VIA.
-
Load a 00 into the accumulator
-
Stores from the accumulator to "Port B" of VIA A000
-
Loads to the accumulator from "Port A" of VIA A000
-
Stores from the accumulator to "Port B" of VIA 8000
-
Loads to the accumulator from "Port A" of VIA 8000
-
Store to TILs
-
Increment accumulator
Burn and test the program. If all is well the display will
count as before. Disconnect the lowest line (PB0 - PA0) of one VIA or the other
and observe the count. The count should jump by two rather than by one as
before. Show this to your lab instructor. This is the only time you will
do this test. Due to the hardwire aspect of the test, you will not perform
it on your Vector Board computer. You can though use the proto-board
computer to test the VIA that will be used on the Vector Board.