Page 1 of 1

6522 Peripheral Control Register - setting CA2 and CB2 high?

Posted: Tue Jun 07, 2022 9:03 am
by Aloha6502
I'm continuing investigating the 65c02 Single Board Computer from WDC.

Here's the latest "puzzle":

I'm trying to access the EPROM banks, and apparently these are switched using the two uppermost lines. They are not actually part of the address bus, but are controlled by one of the two 65c22 on the board.

Specifically, the 4 EPROM banks are selected based on one of 4 possible high/low conditions of FA15 and FAMS. FA15 is connected to the 6522 CA2 and FAMS is connected to CB2. They also have LEDs to indicate status.

So, looking at the memory map for the board (page 6 on datasheet), it indicates the "VIA-TIDE" (as opposed to the other VIA, which is called "VIA port") starts at $7FE0

https://www.westerndesigncenter.com/wdc ... C02SXB.pdf

So, looking at the 6522 (65c22) data sheet (page 8 on data sheet), the Peripheral Control Register (PCR) is at +C offset from the base address, so that's $7FEC.

https://www.westerndesigncenter.com/wdc ... w65c22.pdf

Looking at the table for the PCR bits, CB2 and CA2 are configured by bits 7,6,5 and 3,2,1 respectively.

Page 12, datasheet

If I set all the bits for them to 1, these two lines ought to be forced to be HIGH OUTPUT.

However, I have done that using the monitor program, directly writing to $7FEC with various values, all which turn on the relevant CA2 and CB2 bits.

00
0E
70
and 7E

but the LEDs on those lines do not light up.

Do I need to do anything else to make CA2 and CB2 go high?

Re: 6522 Peripheral Control Register - setting CA2 and CB2 h

Posted: Tue Jun 07, 2022 1:35 pm
by GARTHWILSON
Page 13 has the tables. It looks like your 7 needs to be an E in the most-significant digit.

Re: 6522 Peripheral Control Register - setting CA2 and CB2 h

Posted: Tue Jun 07, 2022 4:04 pm
by Aloha6502
GARTHWILSON wrote:
Page 13 has the tables. It looks like your 7 needs to be an E in the most-significant digit.
Thanks Garth!

What a newbie mistake LOL, I mixed up 0111 with 1110.

Anyway even after using the correct values, I still didn't get any response, at least not with the LEDs.

The monitor did show the memory location was changed.

Experimenting with this board really is not simple...

(I don't know why the JPEG is always posted sideways, I had already tried different ways of holding my phone, or editing the file afterwards. I can't take screenshots using the OS because my Windows 7 install is locked down for safety, no network, nothing).

Re: 6522 Peripheral Control Register - setting CA2 and CB2 h

Posted: Tue Jun 07, 2022 4:09 pm
by BigEd
(if you have a simple tool to edit the photo, try rotating 4 times and re-saving.)

Re: 6522 Peripheral Control Register - setting CA2 and CB2 h

Posted: Tue Jun 07, 2022 4:13 pm
by Aloha6502
BigEd wrote:
(if you have a simple tool to edit the photo, try rotating 4 times and re-saving.)
Trying now

(WOOT!! Haha! Did it with Preview on the Mac).

Re: 6522 Peripheral Control Register - setting CA2 and CB2 h

Posted: Tue Jun 07, 2022 4:25 pm
by Aloha6502
Anyway, no action on the VIA_TIDE.

I was thinking of various possibilities:

1) the board has a problem (i.e., mine has a manufacturing problem, but probably unlikely)

2) there is something wrong with the Java monitor I am using (although the memory locations seem to be edited properly, and I could write a simple program to load the Accumulator).

3) I need to test using the OTHER 65c22.

For testing the other VIA, called VIA Port, I need to have some feedback. Since I can't trust the on-board LEDs now, I want to check the pins. The second VIA's pins are exposed via a connector. (The VIA_TIDE has no such access, so I could only hope for the on-board LEDs action.)

I attach the relevant parts from the schematics.

However, for CA2 and CB2, does the rightward-pointing "thingie" mean VIA_CA2 and VIA_CB2 are hardwired to be inputs only? Pins 4 and 16 on the connector schematics for VIA_INT