Skip to content

Z80 I/O decoding – It’s the Interrupt Stupid!

November 27, 2015

15-11-27 iofailI’ve been fighting with I/O decoding for my SPI chip and i think i understand what’s going on.  I was enabling the chip on NAND(A7,NOT(/IOREQ)).  i.e. an I/O cycle where A7 is high.  I found I was getting a trigger every millisecond but hunting through the monitor code i could not find any instances of in or out instructions to ports 8X.  I turns out that the interrupt cycle itself does an ioreq with the address bus set to the program counter.  I think that neither /rd nor /we are active which is why Lee’s 74138 circuit doesn’t trigger.  I don’t think i can use that since i need to activate the chip for both writes and reads.  I need M1 high, A7 high, /IOREQ low and then i need a low as output.

which is, I guess, NAND(NOT(/IOREQ),NOT(NAND(M1,A7))).  Ok, I can do that with the 74c00.

 

 

Advertisements

From → Olduino/Z

One Comment

Trackbacks & Pingbacks

  1. Adding the TP3465V SPI Chip | olduino

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: