Close

Early Boot: Design Progress and Testing

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 01/06/2018 at 18:090 Comments

I have done an initial PCB layout (Thanks to Diptrace’s autorouter!) and started writing some AVR C for the programmer.

PCB Design

I have been working on a PCB layout - I haven’t spent too much time on it so far, but I do think what I have would work quite well. Obviously, it is not the final design - for that I’ll need to do some extra tests on a breadboard first!

The usual wisdom is to avoid the autorouter, but for this board it seems to be the best option - there are so many through hole components I was struggling to route it by hand. I might be able to do better on another attempt, but it at least proves the board is routable! I’ll come back to this later.

Programmer

As mentioned before, the design currently includes an ATmega8515 as an EEPROM programmer for downloads of z80 code. The 8515 is an older part, but is about the only thing  with enough pins for this. Initially I chose it because  it’s cheap, but actually, all other parts have A/D converters on - and therefore you lose a pin or two to Things like ARef. This does mean I need to be fairly careful to make sure my code fits into the 8Kb of program flash - That said it isn’t looking too bad so far as long as I am careful. Link time optimisation helps a lot here. 

I have a suspicion I’ll end up using tristate shift registers as a port expander - however that’s not without its own problems - not least that it adds cost and components. The other option would be to disable in circuit programming (probably not actually incredibly useful if the microcontroller has a boot loader on it) but that would me a anyone wanting to use a blank Atmega8515 would need to be able to program it in parallel mode, raising the barrier to entry somewhat. Still, it’s an option though it wouldn’t be perfect since it wouldn’t allow me to both use a different AVR and drive more pins at the same time- only one or the other. That might be fine, but I can’t shake the idea that using a different AVR might be advantageous somehow.

Ive been writing and testing some of the code using the ATmega328 currently on a spare arduino board - it provides enough (power, serial) to be able to test some of the code - and I can’t get going on testing the meat of programming the EEPROM until my component order arrives anyway - and the ATmega8515 is in the same order.

Other Thoughts

It’s beginning to take shape nicely. I do wonder if I’m worrying too much about the whole pin count thing on the AVR - it’s a somewhat theoretical problem right now!

I have been thinking I probably need to use a boot loader on the AVR - tho is would make future updates a whole lot easier since it wouldn’t require a separate programmer. 

Another idea I had would be to clock the AVR faster (I currently have it using the same 8MHz clock as the Z80) and use software USB instead of serial. It might allow faster data transfers and be easier to work with - on the other hand, serial is easier to use - but would probably require some form of serial to USB converter! Hmm, decisions... Clocking the AVR faster might also allow it to monitor the busses in real time - though I’m not sure how fast it would have to be - and given I might have to use a shift register it might need to be quite a bit quicker to be useful. Again, more tests and thinking needed here.

Discussions