Pages: 1 2 [3] 4   Go Down
Author Topic: Wiring a Z80 to Arduino...  (Read 6505 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Shannon Member
****
Karma: 160
Posts: 10418
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

D0..D7 is the Z80 data bus, just as A0..A15 is the address bus.
Logged

[ I won't respond to messages, use the forum please ]

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24319
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
D0..D7 is the Z80 data bus, just as A0..A15 is the address bus
I think it is the thought of wiring all that lot up more than anything else turned me on to microcontrollers!
My FYP was a 6800 controlled rover, and I damn near sprained my wrist wire-wrapping it.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8433
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I don't get the D0-7
Quote
0..D7 is the Z80 data bus, just as A0..A15 is the address bus.
Doh, I must have written that before my first cup of coffee.

All the data lines should show 0v I would think, if that's not the case then the chip must be stuffed.

_____
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Full Member
***
Karma: 0
Posts: 193
The people the people they see me and they know
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This project sounds prime for an FPGA
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24319
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That would be cheating
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello !
Sorry for the long delay (delayWeeks(), a new Arduino function...  smiley), but
I was waiting for my Z80 - and other electronic stuff - from Jameco (which costed me 44 € for shipping PLUS
44 € for customs... ouch... never again !), and then I became father for the second time... So I'm just beginning
to have a little spare time for me again, before going back to work tomorrow (ouch again).
While waiting for the Z80, I made some tests with a 6502, and it worked perfectly. So, I've done the same tests
with the new Z80, and it works great.
- I've bought a 1Mhz oscillator, but it's too fast for the Arduino to keep up the pace, even with a basic test.
So I'm still using the Arduino as the source of CLK.
- The Arduino plays the role of an memory simulator (using the Arduino RAM for the Z80). For the time being,
I write my Z80 code and compile it on PC, then insert it into a byte array in the Arduino code.
(eg: char bytes[]={0x3E,0x20,0xD3,0,0x3C,0xC3,2,0};). Every time the Z80 requests a byte from memory, it is taken
from this array. Thank you Rob for the suggestion.
- It also serves as an I/O IC simulator : every time the Z80 outs a byte to 0, the Arduino sends it
back to the PC via Serial and then I can display it on my PC screen. I will use the same mechanism, in
the opposite direction, to provide a virtual keyboard to my Z80 computer.

Things I'd like to do now:
- use a real memory instead of the Arduino. Since I don't have an EEPROM programmer, I'm trying to use a NVRAM
but for now, it doesn't work (whenever I reset my circuit, some bytes - sometimes a lot- from the NVRAM get corrupted, don't know
why. Maybe a write occurs during the RESET with the WriteEnabled pin unstable ?). When it will work, I will set up a assembly chain,
so that I can write code on my pc, then assemble and download it into the NVRAM, with some kind of bootloader at the start of the
NVRAM (the Arduino will "listen" to IORQ queries on address X, and provide the data to the bootloader so it can write it into RAM - don't
know if I'm clear !?)
- use latches to provide more than 64 kbytes of memory (switching banks)
- connect a parallel 40x2 LCD display directly to the Z80, so it can output text by itself
- build or connect some kind of keyboard.
- connect some kind of mass storage. I've only a few ideas right now, like using the SPI interface of an SD-card.
- connect it to a VGA monitor. The tricky part for me, right now.
then...
- write an O/S (multitask would be great, but is it possible without hardware NMI ?) and maybe a compiler before (or use some kind of C compiler for Z80,
like SDCC)
- make it multi-processor
- etc, etc...
 
Well, that's a lot to do ! It will eventually require a few years...
Thank you again for your advices and help !

cr0sh : sorry, I did'nt have enough time to explain why I'm doing this.
- first, I didn't know you could still find DIP40 Z80 (I knew of the Rabbit one, but where's the fun ?)
- I'm not interested in repairing it to have it work (I've had a 6128 CPC Amstrad, in the 80's, and emulators are enough for me)
- it's really for the sake of the educational value : I've always wanted to design and build my own computer,
but I work in the software businness, which is a really separate world (when you don't work with embedded devices).
- I was sure the Amstrad was in bad condition. When people sell you this kind of stuff, at a very low price, and without
the power cord (because they "could'nt find it"), 99 % of the time it's because it's not working anymore.

Boz
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8433
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OK I know this thread is as old as my granddad.

If you're still there Boz, did you do any more with this?

_____
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Sr. Member
****
Karma: 6
Posts: 468
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Really enjoyed reading this thread and remembered having some old books lurking about some where.


* Z80_Book.jpg (131.96 KB, 658x540 - viewed 12 times.)
Logged

Johannesburg UTC+2
Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

graynomad said "I had a Microprofessor development board once"

Me too, left it at the office, went on annual leave (late 1983 iirc?... shit, exactly 30 years ago...), and some bar-steward stole it. I was not best pleased.....
Logged

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

Victoria, Australia
Offline Offline
God Member
*****
Karma: 24
Posts: 984
Electronics Engineer/Industrial Control
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I still have mine...

Tom... smiley
Logged

Everything runs on smoke, let the smoke out, it stops running......VK3DMK

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8433
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I still have mine...
I bet you don't use it much smiley

_____
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Victoria, Australia
Offline Offline
God Member
*****
Karma: 24
Posts: 984
Electronics Engineer/Industrial Control
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I bet you don't use it much smiley

No not much. lol.

Tom... smiley
Logged

Everything runs on smoke, let the smoke out, it stops running......VK3DMK

More Cowbell
Offline Offline
Edison Member
*
Karma: 11
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Z80s as microcontrollers now exist, if that matters to you.  Zilog makes "eZ80", Z8 "Neo", and "Z16" (16 bit architecture) as well as 8051 microcontrollers.  You may be able to sample them.  They also provide a free compiler and a very cheap programmer.

http://www.digikey.com/product-search/en/integrated-circuits-ics/embedded-microcontrollers/2556109?k=ez80
http://www.digikey.com/product-detail/en/ZUSBSC00100ZACG/269-4539-ND/1206981
Compiler/IDE:  Search for "ZDS II – eZ80Acclaim! version 5.2.1 with RZK and TCP/IP Object Code" on Google (it's at the Zilog Store but there is no direct link).

I was able to get simple projects running with the Z8 Encore, eZ80, and the Z16 microcontrollers using the linked programmer and the free software.
Logged

Vexatious Sampler

Leicester UK
Offline Offline
Full Member
***
Karma: 3
Posts: 114
Half intelligent old fart.....
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi bozgrul35 ,
                             The Z80 I remember that, did a lot of work on that, in fact learnt most of my stuff on it back in the 80's.
Take a look here:  http://melsaunders.x10.bz/

Regards

Mel.
Logged

Open your mind, but not too far, your brain might fall out!!

Also like model building, photography and keeping an eye on my 294? Cacti & Succs...

Take a look at http://melsaunders.x10.bz

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8433
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Love that stuff Mel, do you still use it?

Last I looked (maybe a year ago) you could still buy all the Z80 chips, SIO, PIO, CTC, etc etc. Over that period I have designed several modern boards with LPCs/SAMs etc but they all get too complicated for a one-man band to develop and produce in a reasonable time frame, and of course they are out of date two weeks later and also there are so many great 32-bit boards around now for about $1.50 I see little point in producing yet another one.

So, maybe the answer is to go retro, after all there won't be any competition smiley

A Z80 board with an AVR co-processor that acts as an EPROM emulator would be a simple and fun project, but the question is what the heck would you do with it? Once you get it working and flashing a few LEDs what's next?

If I could think of an answer it might be worth doing.

@Joe, that $29 dev kit is "Z8 Encore! XP F08xA Series Dev Kit" but lower down it also says "For Use With/Related Products   Z8 Encore!®, Z8 Encore! XP®, eZ80Acclaim!®, ZNEO™ Dev Boards" so I guess that's the compiler/assembler one could use for the Z80.

Is that correct?

So for the Z80 you would not use the hardware in that kit, just the IDE/compiler?

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: 1 2 [3] 4   Go Up
Jump to: