Close
0%
0%

ZAViouR Board - AVR/Z80 Hybrid

A Z80 experimenters board with a supervisory AVR and 64K of SRAM

Similar projects worth following
I've long been a fan of the Z80 microprocessor and have fond memories of programming the Sinclair Spectrum back in the day. I'd like to relive some of those times so I set about designing an experimenters board. This would enable me to use my limited knowledge of AVRs and the Arduino IDE to program in good old Z80 machine code, which I still remember quite well.

The design hasn't much in common with Arduino except that it uses an AVR (in this case the ATMEGA1284P) and the Arduino IDE for programming. I have found that I lack lots of knowledge to make this work but I'm willing to learn. The primary aim is to get programming Z80 machine code and design the hardware so that it can be expanded.

The components used are mainly things I have laying around. An ATMEGA1284P which I believe was a sample from Atmel. A Z80 I won on eBay ages ago and one of the many Amic A65308A 32K SRAMs I also won on eBay. I have some 7404s. The only things I lack are the 74138 and 74374 needed for the output port hijacked from the excellent Z80 SBC by Grant Searle (chips on order).

Once I have a good working board with an expansion bus, the plan is to design several expansion cards to plug in to do useful things. I/O ports, motor drivers, communications etc.

If you have any ideas for expansion boards or enhancements to the main PCB, please feel free to comment.

ZAViouR v1.02.pdf

Main Schematic

Adobe Portable Document Format - 136.65 kB - 01/22/2016 at 16:01

Preview

  • 1 × Z80 Microprocessors, Microcontrollers, DSPs / Microprocessors (MPUs)
  • 1 × ATMEGA1284P Microprocessors, Microcontrollers, DSPs / Microcontrollers (MCUs)
  • 1 × AMIC A625308A 32Kb SRAM or compatible chip SRAM
  • 1 × 74HC04 Electronic Components / Misc. Electronic Components
  • 1 × 74AC138N 1-of-8 Decoder/Demultiplexer

View all 17 components

  • On The Way Back

    Steve Smith01/22/2016 at 16:14 0 comments

    I've just added the main schematic to the 'Files' section. Also a couple of new pics from last year. I hit a bit of a block and got a little frustrated with my lack of progress. I thought it better to leave the project alone for a while rather than getting so frustrated that I never wanted to see it again! :-) Recently, my interest has been re-awakened but I haven't the spare time at the moment to continue development. Hopefully, when my current (non-electronic) projects are complete, I can revisit ZAViouR nad get it working. In the meantime, feel free to point out any mistakes I may have made in the circuit, any improvements you would make or any other comments. All are welcome.

  • On the way

    Steve Smith10/09/2015 at 12:47 0 comments

    Finally, I've been able to finalise the design of the second version of the ZAViouR Board, along with a 7400 based I/O board that plugs into the ZAViour's expansion port. The designs have been submitted to my favorite fabricator www.hackvana.com and I'm awaiting news of their acceptance.

    I have added a few new images to the gallery and removed some of the old ones. The schematic is just as a rough guide, as all of the design files will be available on my website www.projectavr.com as soon as I've tested the new boards.

    I've also been working on other I/O board variants and the backplane which I will have fabricated later.

  • Continued 2...

    Steve Smith09/27/2015 at 12:06 0 comments

    Still a bit busy over here but I have sporadically been developing the ZAViouR idea. I have now laid out the main board after adding a soft reset switch to allow soft resetting of the Z80 via the AVR and another LED for general use as a status indicator:

    The 8-bit I/O Port:

    And the Backplane:

    The I/O port will plug into either the main board directly, or into the backplane. The backplane has provision for daisy-chaining more than one board together in case four ports isn't enough.

    When finances and time allow, I will be ordering these boards to build and test before publishing all the design files on www.projectavr.com

  • Continued...

    Steve Smith09/13/2015 at 10:37 0 comments

    I've been busy with other things of late so haven't been able to work on ZAViouR, however, I expect to be able to continue very soon. Stay posted.

    I'd also like to say a big 'Welcome' to all the new followers.

  • New Boards

    Steve Smith09/06/2015 at 11:10 0 comments

    I've been developing the next iteration of ZAViouR and it's first I/O Port. I will be adding a backplane but I want to get the first interface designed and working beforehand. This will enable me to test the connections are in the correct topology etc. I have designed a custom connector component for Eagle with mirrored connetions. If I hadn't done this, I would have had to of used the standard IDC connector with all the pins flipped. This looked especially untidy on the board preview and I wasn't sure it would solder correctly.

    So here's the new layout of ZAViouR v1.02 and the I/O Port which is a single port version of Grant Searle's design. Once the I/O Port is proved, I will insert the backplane between it and ZAViouR. I'm intending the backplane to have at least 4 connectors on the expansion bus to accommodate 4 expansion cards.

  • Line of lights

    Steve Smith09/03/2015 at 07:55 0 comments

    Development continues on ZAViouR. I've been doing a few bits and pieces with it but I get increasingly annoyed with myself for combining the AVRs serial lines with the Datalines. I made a small bar of LEDs to fully test the output, shown here in this video:

    I shot this on my iPhone 6, but because of the way it records, it misses some of the LED flashes. All the LEDs flash in turn as they should do in reality.

    I've added a few features to the new board.

    • A 40-pin expansion port.
    • SRAM size Option. Extra traces for Cypress CY7C199CN 32K SRAMs.
    • A 'proper' power socket.
    • A second indicator LED
    • A Run/Inhibit switch to tell the AVR to run or stay 'Hands Off' at start up.
    • A Micro-SD Card socket and header to provide storage via the AVR.

    There may be other things to modify/add as yet so for now, I will continue with the ZAViouR v1.01. A couple of things I have done, apart from add the manual /BUSRQ switch is to add some pull-up resistors to unused lines on the Z80 (like /INT) and add a capacitor across the 'Reset Z80' switch for a kinder power-up. Currently it is a 10uf but I may increase that to make the start-up delay a little longer.

  • Flash-ah-ah!

    Steve Smith08/28/2015 at 12:02 0 comments

    I'm pleased to report that upon fitting the last two chips and uploading some Z80 'Hello World' flash code, the board works well. Programming both the AVR and the Z80 require the /BUSRQ line to be grounded with the manual switch but apart from that, it seems to operate as expected. I have only addressed a single line on the output port so I'll have to write a bit of code to access several to test it properly.

    Now I'm thinking about the new version which will sort out the /BUSRQ problem and add a couple of features. Requests considered.

  • It's Alive!

    Steve Smith08/26/2015 at 12:37 0 comments

    Having fixed the bug that prevented the loading program from working, I have now successfully assembled a short Z80 program and run it in memory.

    ;Z80 Test Program
    
    DESTINATION_SIZE equ 50
    
        .org 0000h
    start:
            LD HL, Storea                ; point to the source
            LD DE, Storea + 1            ; point to the destination
            LD BC, DESTINATION_SIZE - 1    ; copying this many bytes
            LD (HL), 170                ; put a value in the 1st pos
            LDIR                        ; move 1 to 2, 2 to 3...
    Finish:
            NOP
            NOP
            NOP
            NOP
            JP Finish                    ;Infinite Loop
    Storea:
                DEFS 50
    end 

    A nice easy memory filler. I tested it by temporarily redirecting a reading routine in the AVR to check the bytes after the code (Storea). All seems well. More experimentation to come.

  • Simple huh?

    Steve Smith08/25/2015 at 20:43 0 comments

    Well, it was supposed to be. I've been wrangling with C++ programming for several days, trying to get the SRAM to accept code stored in the AVR's array. I've poured over many tutorials and seen videos and I can't make it work. I am down to attempting to program just two bytes and read them back but I need a break!

    Any help gratefully appreciated at this point.

    [UPDATE] Well, after being prompted to radically change the code, I was re-writing it and found the bug! I was setting up the address ports incorrectly. One character out of place! That'll teach me.

    On with the show...

  • Serial Problem Fix (Workaround)

    Steve Smith08/22/2015 at 11:24 0 comments

    The problem with the Serial Port has now been fixed, or at least, I have a workaround. Bill Rowe suggested I activate the /BUSRQ line to force the Z80's Address and Data lines into High Impedance. After soldering the switch line on to the /INT pin, directly opposite the /BUSRQ pin on the Z80 and being frustrated for a number of hours before finding the mistake! I re-wired it with a 10K pullup resistor and it works fine. Pulling down the /BUSRQ line does indeed allow the serial port on the AVR to receive programming from the Arduino IDE. The /BUSACK line also goes low to indicate this.

    I'll have to think of a solution for the next version of the board. Could I drive some sort of circuit off of the DTR line on the serial port? Or will I have to have a switch on the board to select between Program or Run?

View all 13 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates