Hardware structure
Approximate VHDL entity only! entity VIA_6522 is --
port(
n_rst: in std_logic; -- Reset
n_wr: in std_logic; -- Read / Not Write
ph2: in std_logic; -- CPU clock phase 2
cs1: in std_logic;
n_cs2: in std_logic;
rs: in std_logic_vector(3 downto 0);
d: inout std_logic_vector(7 downto 0);
pa: inout std_logic_vector(7 downto 0); -- Port A
ca: inout std_logic_vector(2 downto 1); -- Port CA
pb: inout std_logic_vector(7 downto 0); -- Port B
cb: inout std_logic_vector(2 downto 1); -- Port CB
);
end entity VIA_6522;
Pinout comparison:
Pin |
6821 6520 |
6522 |
6526 |
18 |
CB1 |
CB1 |
!PC |
19 |
CB2 |
CB2 |
TOD in |
21 |
R/!W |
!IRQ |
!IRQ |
22 |
CS0 |
R/!W |
R/!W |
23 |
!CS2 |
!CS2 |
!CS |
24 |
CS1 |
CS1 |
!FLAG |
35 |
A0 |
RS3 |
RS3 |
36 |
A1 |
RS2 |
RS2 |
37 |
!IRQB |
RS1 |
RS1 |
38 |
!IRQA |
RS0 |
RS0 |
39 |
CA2 |
CA2 |
SP |
40 |
CA1 |
CA1 |
CNT |
|