I have a simple circuit using a Z80 and a 29C256, the program on the eprom(with the opcodes and addresses) is:
0000 3E 01 LD A,01H
0002 CD 0A 00 START: CALL TEST
0005 0E 03 LD C,03H
0007 C3 02 00 JP START
000A 06 02 TEST: LD B,02H
000C C9 RET
The problem I have is, after "CALL TEST" is executed, the program will jump to the "TEST" subroutine but on executing "RET", it won't return to address 0005h("LD C,03H") but instead will start right from address 0000h("LD A,01H") again. You can see the logic analyser screen cap by cutting and pasting this link to your browser.
http://kalawala.freewebspace.com/LAcap.jpg
The circuit is very simple with the Z80's and the 29C256's address lines together, the data lines together, RD goes to the eprom's OE, WR to WE, the eprom's CE is tied low. The Z80's control lines(RESET, INT, NMI, BUSRQ, WAIT) are all pulled high, all other control lines are not connected. For a copy of the Z80 manual & spec., you can get one here:
http://www.z80.info/zip/z80cpu_um.pdf
Any help will be greatly appreciated. Thank you all in advance.
0000 3E 01 LD A,01H
0002 CD 0A 00 START: CALL TEST
0005 0E 03 LD C,03H
0007 C3 02 00 JP START
000A 06 02 TEST: LD B,02H
000C C9 RET
The problem I have is, after "CALL TEST" is executed, the program will jump to the "TEST" subroutine but on executing "RET", it won't return to address 0005h("LD C,03H") but instead will start right from address 0000h("LD A,01H") again. You can see the logic analyser screen cap by cutting and pasting this link to your browser.
http://kalawala.freewebspace.com/LAcap.jpg
The circuit is very simple with the Z80's and the 29C256's address lines together, the data lines together, RD goes to the eprom's OE, WR to WE, the eprom's CE is tied low. The Z80's control lines(RESET, INT, NMI, BUSRQ, WAIT) are all pulled high, all other control lines are not connected. For a copy of the Z80 manual & spec., you can get one here:
http://www.z80.info/zip/z80cpu_um.pdf
Any help will be greatly appreciated. Thank you all in advance.