Close

Not Dead Yet

A project log for z80 Experimentation Kit

A project to produce a kit for experimenting with z80 CPUs - More an embedded board than a PC

michael-cullenMichael Cullen 04/01/2019 at 12:580 Comments

I got a new job at the end of January so progress on this slowed a bit. I did manage to find some time this weekend to take a look at the EEPROM writes again.

Having completely forgotten my previous conclusions about writes being too slow, I spent quite a while digging into this. I got writes from the AVR itself to be even more reliable, but writes from USB still don’t work. Looking at it on a logic analyser, the write timing looks basically the same in both cases, except the USB case is about half the speed. 

I just found the relevant bit in the data sheet: it’s not 10ms you have between bytes, it’s 150us - writes directly from the AVR are actually a bit over that but do work. Writes from USB are more like 500-700us so of course have no chance. 

I might be able to buffer the writes a bit so they’re not directly in the USB handler, but then there’s still the chance that a USB request at the wrong time throws it off.

The options now are either to put up with it taking up to 10ms per byte to write (hence up to about 90 seconds to write an 8k eeprom) or to redesign it to be faster. It’s possible I might be able to find a way to buffer writes to between USB calls but that might or might not work.

When I chose the i2c port expanders, I knew it would be a bit slow, but I didn’t realise quite how tight the timing on the eeprom was.

Ah well, at least I understand the problem now.  I’ll probably stick to the slow route for now and work on another part in the name of progress.

Discussions