hi all,

i'm donig a little circuit with a Z8400 (SGS Z80 equivalent), I need an EPROM like 27C64 to store the program, but i would one whit the same pinout but electronically erasable, coude i don't have UV to erase. What could be the best choice for develope test a little program?
Every suggestion is appreciated. Thx.

B7
Posted on 2004-01-08 14:13:35 by Bit7
Is the circuit already wired? Does the circuit connect /WE to the PROM? Look up the Winbond W29F512A and Atmel 29F512-70. SST might also have something. You'll have to code you're own driver, but the programming algos are simple. You can even use the same code for different chips, just change 1-2 magic numbers, such as sector size and timeout. BTW, I recommend using a 20mS timeout for ALL Atmel parts.
Posted on 2004-01-08 15:24:34 by eet_1024
eet,
thx for your kind response. For now, my Z80 seems don't reset, and i don't even understand why. Anyway i'll see your suggestion asap. THx for now.
Posted on 2004-01-08 16:01:41 by Bit7
Hehe You have to reset it using proper signals :P
Aka do not keep RESET line Low too much ...
Posted on 2004-01-08 17:58:16 by BogdanOntanu
hehe

thx bogdan :)

i found why :) with oscilloscope i've seen was missing the clock for a wrong connection :) Now it work... with 2.5 khz clock after the reset the bus go to 0, as it should be (counter to 0).

What could happen with reset too long ?

Now i've switched to a 4Mhz clock but after the reset address bus give values between zero and 1.8
V ... strange, i didn't find in the datasheet if this is considered low or high...

So this another problem: my micro is a Z8400B1 SGS... and the only SGS datasheet for it found in internet is under payment. I have many zilog datasheet but i'm not sure about my clock... some site say 2.5 Mhz, other 4Mhz, one other 6Mhz. Now i have put up 4 Mhz, i will see if it work when i put my first proggy on the eprom.

I also will connect an lcd display, but here in my town, at the shop they steel abut 20$ for a stupid 2 lines lcd. I would search a better price.
Posted on 2004-01-09 01:32:28 by Bit7

I need an EPROM like 27C64 to store the program, but i would one whit the same pinout but electronically erasable, coude i don't have UV to erase.


another way is to use SRAM instead, but you know it will gone when the power shut off. the EEPROM version is a little bit expensive compare to this SRAM :)

how? use the conventional method, and trick the z80 to assume that the ram is a rom. then how about the codes? that u must think how to fill them in. if you used to connect to pc, use serial/pararel port, ahhh.... i mean you need someone to fill the code in. it can be through the pararel port, and set things up, with a little bit control. i.e you can do reset via your pc, etc.

btw, i am searching reset circuit.... ok, better put it on new one.
Posted on 2004-01-09 05:14:02 by dion
nice idea dion :)

and what about to use a 28 pin socket with soldered on a parallell cable. Than i put it at the place of the eeprom and i really could do every test i need. I'm only wandering if the parallel is fast enough to talk at the maximum Z80 cpu speed... i think yes as software control, since i have a 2,4Ghz processor but i don't know if there's something between micro and paralle port....
Posted on 2004-01-09 16:31:26 by Bit7
That is a "nice" beginner's dummy idea

A long paralel cable will have too much static and latency for a 4Mhz CPU.

And do NOT overestimate your 2.6Ghz CPU :grin:

On realtime applications it is not able to deliver much (600/900Khz) sustained continouse realtime data Besides windows is not an realtime OS, one glitch and your Z80 CPU will execute random code, very unmantainable.

Not to mention that the big CPU has to read/sample/react in time to simulate eprom's CS and address/data cycles...

Besides i do not think the parallel port runs at CPU full speed, might even run at ISA speed :P

For example an 10 instructions main loop on a2.6Ghz CPU will make it a 266Mhz CPU and an 100 instructions loop will make it an 2.6Mhz CPU already slower that the Z80CPU at 4Mhz.

Of course the Z80 will sample world at even slower speed...
But unfortunately it will read the ROM at 4Mhz or will miserably fail and execute random code
(if ROM is no respecting bus cycles because of big CPU delay/glitch)

So trust me: hardware has its use :grin:

Better follow the original idea and use the big CPU to write up some data/application into a static ram simulator of the eeprom, this way it will certainly work even on serial ports.
Posted on 2004-01-09 18:38:05 by BogdanOntanu
The original part numbers were Z80 for the 2.5MHz part, Z80A for 4MHz. Z80B is probably the 6MHz part. I do not know SGS part number format.

1.8V is too low (not guaranteed to be interpreted as high or low) unless you're using low voltage ( < 5V ) CMOS. Under DC characteristics, you can find the specs for high and low output voltages (VOH, VOL).
Posted on 2004-01-10 01:56:02 by tenkey
thx tenkey. Yes, so it's probably a 6mhz.

And thx Bogdan, i knew that long parallel cables fail... i've already seen it with my parallel pic programmer :) . Ok, for now since i've all just wired, i erased 2 Eprom at job and i'll put up a programmer here at home. I want just to make a siple proggy to put some out value in a latch and see if it work. Then i will see for the ram solution. :) thx for now
Posted on 2004-01-10 03:04:01 by Bit7
While a cable extendor may not be very fast, who said it has to be?

I'm going on long term memory here, based on what I remember doing for a TRS-80 (or TRASH-80) computer, a Rasio Shack product that used a Z80 for the CPU.

I was making a CRT controller add-on (basically a character based, or non-graphic video card) and needed to extend the time to perform either a memory read or write cycle. The Z80 (and the 8080 popular at the time too) had a signal the memory could pull down when it was ready with data, so the sloow memory at the time could be used with the latest fast processor.

You could use this line to extend the time of a memory access for the Z80 such that it would work over a long cable.... IF that line is still on the Z80.
Posted on 2004-01-10 17:02:08 by Ernie
It's called /WAIT on the Z80.

The 1.8V on the address lines bother me. That usually is an indication of a high-impedance state (tristate). I've only glanced at the timing diagrams. If I read it correctly, the address lines go hi-Z when /BUSREQ goes low. Which is a reminder that several inputs should be pulled up to get smooth operation -- the interrupt lines /INT and /NMI, plus /WAIT and /BUSREQ. The Z80 probably won't have internal pullup resistors on these control lines.

I'm also assuming the main circuit is 5V powered.
Posted on 2004-01-10 17:51:13 by tenkey
The only thing I can suggest is a FLASH memory, such as the SST 39SF010. Unfortunately, it only comes in 32-pin packages.
Here is the link to the datasheet:
http://www.sst.com/downloads/datasheet/S71147.pdf

I have used the SRAM approach with 8051 micros, but it's a little awkward, since you still need an EPROM with a bootloader, then you need to do the switching between the bootloader EPROM and the SRAM.

The FLASH approach seems the best to me.
Hope this helps.
Posted on 2004-01-19 11:59:17 by VVV
Like the 28F001 boot block flash which enables you to electronically lock your boot code. It is not a smart voltage device though and you would need a DC to DC converter for VPP. I'm sure they have a version in smart voltage with 3.3V VCC. It does come in DIP package anyway. As far as driving the parallel port, use line drivers. Maxim has a nice line of them. I think TI still makes them too.
Posted on 2004-01-19 14:52:37 by mrgone
thx,

nice idea for the flash :) and what about the 2864 ? Should it be an electronically-erasable eeprom with same pinout of the 27C64 ?
Anyway, my idea of checking the address bus voltage is really bad. Since at every instruction cycle there is a refresh at an incremental address of the dinamic ram.

Thx again B7
Posted on 2004-01-19 15:17:01 by Bit7
You can use /WAIT to halt the Z80 in the middle of a memory or I/O cycle. It will not stop in the middle of a refresh cycle. You will be able to see stable and valid address and data lines. (Except one case: the Z80 has /RD low, indicating a read, and there is no component putting data on the bus. Only the address will be stable and valid.)

It takes a little bit of work to create a "single cycle" stepper. You need to release /WAIT long enough to free the Z80 from its "wait state", but short enough to force the Z80 into the wait state at the very next memory or I/O cycle.
Posted on 2004-01-19 23:55:43 by tenkey
SRAM of today will surpass the speeds of the Z80. As for interrupts I dont beleive MOSTEK is in business anymore so the MK3881 is out. You can use the 8259 by Intel but you will need some combinational logic to tri-state the memory when the pic sends it's type number over the data base. The PIC will notify the hardware with the SPEN pin.
Posted on 2004-01-20 11:22:33 by mrgone
The 2864 is an EEPROM, pin compatible with the 2764. (I thought these were extinct).
Here is a link to the datasheet of the 28HC64, by Xicor. It should help you program it.
http://www.xicor.com/pdf_files/x28hc64.pdf

Hope this helps.
Good luck!
Posted on 2004-01-20 11:38:21 by VVV