RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » RC2014 Z80 /WR and /RD mutually exclusive?
RC2014 Z80 /WR and /RD mutually exclusive? [message #8287] Thu, 04 February 2021 12:20 Go to next message
quarterturn is currently offline  quarterturn
Messages: 86
Registered: April 2018
Member
On RC2014 Z80, are /WR and /RD always the opposite of each other, or can they both go low?

The reason for asking is I'm prototyping a MOS8568 video card for RC2014 and the MOS8568 has a single r + /w pin. The prototype board I'm using provides a 74LS32 to OR /WR, /RD, and /IORG into /IOWR and /IORD signals. If /WR and /RD are mutually exclusive, I could just connect /IOWR to r + /w. If not, it'll take more logic and I'm tight on extra board space.

Thanks!
Re: RC2014 Z80 /WR and /RD mutually exclusive? [message #8291 is a reply to message #8287] Fri, 05 February 2021 19:15 Go to previous messageGo to next message
ashtons is currently offline  ashtons
Messages: 8
Registered: May 2020
Location: Louisiana
Junior Member

If both /WR and /RD were low, the processor would be both writing to an address and reading from it at the same time. That doesn't make any sense. That would mean both the Z80 and the device at that address would put a byte on the data bus, which would result in some sort of collision. There would be no telling what either would get. So, it is safe to say they cannot be low at the same time, else it'd be an invalid system state.

Plus, I don't think the Z80 has any instructions which would cause such a state.
Re: RC2014 Z80 /WR and /RD mutually exclusive? [message #8293 is a reply to message #8291] Fri, 05 February 2021 21:42 Go to previous messageGo to next message
b1ackmai1er is currently offline  b1ackmai1er
Messages: 396
Registered: November 2017
Senior Member
Hi, the z80 pio also only uses /rd so definately valid technique.

[Updated on: Fri, 05 February 2021 21:42]

Report message to a moderator

Re: RC2014 Z80 /WR and /RD mutually exclusive? [message #8296 is a reply to message #8287] Sat, 06 February 2021 08:24 Go to previous messageGo to next message
quarterturn is currently offline  quarterturn
Messages: 86
Registered: April 2018
Member
Thanks for the replies. I figured as such, good to confirm.
Re: RC2014 Z80 /WR and /RD mutually exclusive? [message #8301 is a reply to message #8287] Sun, 07 February 2021 01:26 Go to previous messageGo to next message
beb is currently offline  beb
Messages: 10
Registered: October 2019
Junior Member
quarterturn wrote on Thu, 04 February 2021 12:20
On RC2014 Z80, are /WR and /RD always the opposite of each other, or can they both go low?

The reason for asking is I'm prototyping a MOS8568 video card for RC2014 and the MOS8568 has a single r + /w pin. The prototype board I'm using provides a 74LS32 to OR /WR, /RD, and /IORG into /IOWR and /IORD signals. If /WR and /RD are mutually exclusive, I could just connect /IOWR to r + /w. If not, it'll take more logic and I'm tight on extra board space.

Thanks!
First part of the answer : they *SHALL* never go low at the same time, as they used to control direction of bus transceivers. This would lead to bus contention and hardware damages. Moreover, for some transceivers like 74LS240, it is clearly required that both direction shall never be active at the same time, as it will make the chip oscillate (and probably destroy it)

Second part of the answer : if Zilog did put the two signals on two separate pins, it's because they have a good reason Very Happy (more pins means more copper to route, meaning higher costs)
If you look to 68xx or 6502, you will see that there is only one direction pin called R/nW, but this pin is associated to E pin, which says when the signal is active.

So you have only two possibilities to implement those signals :
- either one pin to say when you read and one pin to say when you write (Z80, 80x86, etc)
- or one pin to say what you do (reading or writing) and one pin to say when you do it

So in all cases, you will need two pins. So, for the MOS8568, you will need to emulate the E signal from the Z80 bus, otherwise the chip will never recognize the bus sequence.

And, as said in another post, as far as I know there is no official instruction to do it (maybe an hidden one can do, but I would not try to find it as it may seriously damage the computer)

Benoit

[Updated on: Sun, 07 February 2021 01:28]

Report message to a moderator

Re: RC2014 Z80 /WR and /RD mutually exclusive? [message #8303 is a reply to message #8301] Sun, 07 February 2021 03:35 Go to previous message
b1ackmai1er is currently offline  b1ackmai1er
Messages: 396
Registered: November 2017
Senior Member
Hi,

Have you seen this? 8563

https://www.retrobrewcomputers.org/doku.php?id=boards:ecb:cv du:start#ecb_color_video_display_unit

/forum/index.php?t=getfile&id=1982&private=0
Previous Topic: N8 (4314) RomWBW 3.0.1 and PPIDE
Next Topic: adapt ECB CVDU to ROMWBW RC2014


Current Time: Mon Mar 24 21:19:14 PDT 2025

Total time taken to generate the page: 0.03695 seconds