| Electronics > Projects, Designs, and Technical Stuff |
| AY-3-8910 - can't write odd values to its registers? |
| << < (3/7) > >> |
| nockieboy:
Okay. :wtf: Here's the result and my analysis of the logic testing: --- Code: --- XOR A OUT (AY_LATCH),A ; Clear register 0 psgrl_test: 1 LD A,$10 ; Value = $10 2 OUT (AY_WRITE),A ; Write $10 to register 0 3 IN A,(AY_READ) ; Port = RSEL/RD 4 LD A,$11 ; Value = $11 5 OUT (AY_WRITE),A ; Write $11 to register 0 6 IN A,(AY_READ) ; Port = RSEL/RD 7 JP psgrl_test ; Loop --- End code --- The above logic analyser trace was produced using the above code (line numbered for ease of reference). I have an 8-channel logic analyser, so I have restricted the data bus analysis to the lower 5 bits and the values used in the test accordingly, so I can record BC1, BDIR and ~WR (direct from the Z80) as well. The first LOW in WR is line 2 of the code. BDIR goes HIGH, BC1 remains LOW for a WRITE operation to the PSG. The value on the data bus is 0x10, as loaded into the accumulator in line 1. Line 3 executes a READ operation on the PSG, signified by the LOW on BDIR and HIGH on BC1. The value read on the data bus is 0x10, which is correct. The next LOW on WR is line 5 of the code. A WRITE operation SHOULD be executed here, but it is not – BDIR remains LOW. The data bus correctly contains the value 0x11. :-// So it's obviously performing a write to receive the first value of 0x10, and returning that value on a read, but when I try to write an odd value BDIR doesn't go high to signal a write to the PSG's register. I can't see how DQ0 (D0) would interfere with BDIR. The BDIR line from the 7402 (where WR is NOR'd with the chip select) doesn't go anywhere near DQ0 on the PCB! |O Here's a gratuitous snapshot of the relevant (I hope!) part of the schematic: EDIT: Something else I just noticed - there's no corresponding RD transaction after the attempt to write the odd value, either! |
| nick_d:
You mentioned swapping out the sound chip -- did you try swapping out the Z80? An internal short between BDIR and D0 or similar could be causing this. cheers, Nick |
| nockieboy:
--- Quote from: nick_d on February 27, 2019, 01:32:12 pm ---You mentioned swapping out the sound chip -- did you try swapping out the Z80? An internal short between BDIR and D0 or similar could be causing this. cheers, Nick --- End quote --- Sorry Nick, I don't understand? You think the Z80 may be at fault? I'm 99.9999% sure it's not the Z80. Everything else (including running CP/M) works fine. An internal short in the PSG may be the issue, I suppose, but I've tried it with two PSG chips - I would have thought it highly unlikely they'd both have the same problem, especially as the first one was working just fine in the breadboard prototype. |
| SiliconWizard:
--- Quote from: nockieboy on February 27, 2019, 01:01:27 pm ---I can't see how DQ0 (D0) would interfere with BDIR. The BDIR line from the 7402 (where WR is NOR'd with the chip select) doesn't go anywhere near DQ0 on the PCB! |O --- End quote --- Have you taken a look at the /(P=Q) signal from U4.1 when this happens? |
| radiolistener:
there is definitely something wrong with SN74F521, probably some input lines are incorrect. Unfortunately it's not clean what you put on the input of SN74F521. Try to check if D0 is connected to the input lines of SN74F521. |
| Navigation |
| Message Index |
| Next page |
| Previous page |