KiCad

KiCad is an EDA program, similar to Eagle, Altium and the like. I last tried it some years ago and found it to be very difficult to use, not least because of the inevitable steep learning curve that all CAD type programs seem to have. However, recently, I thought I’d give it another go. I downloaded and installed version 4.0.5 in order to have another bash. I was pleasantly surprised to find a much more mature product than I had found in the past and it had become usable for me.

I followed a set of introductory tutorials on YouTube called Getting To Blinky 4.0 Presented by Chris Gammel. These are well worth doing as is joining the KiCad forum Chris mentions in the videos.

As an excercise, I re-created the minDUINO v1.6 design to see if I could get to grips with the new way of working. Unlike other EDA programs, KiCad separates the component symbols on the schematic from footprints. Once a schematic has been drawn, annotated and a netlist produced a program is called specifically to associate symbols with footprints manually. Then, in the PCB layout program, they appear ready to be placed upon reading the netlist. I understand that you can have CvPCB, the association program, take a stab at allocating footprints automatically, but I haven’t got that far. I quite enjoyed this systematic approach but it can be a little frustrating when updating a design. I found that I had to re-create the netlist again after footprint association in the schematic and then import the netlist to the PCB layout program.

The outcome of my first foray into KiCad is this:

minDUINO v1.6 (KiCad)

minDUINO v1.6 (KiCad)

Here illustrated flashing the LED on pin 10 of the ATMEGA328 by way of a test. The board was fabricated by OSH Park in this instance. It has a couple of wrinkles though; I thought to fit a ZIF socket like the previous Eagle version of the board but I neglected to make the holes large enough to accommodate the wider pins of the socket. The ceramic capacitor hole distances are a little tight and there is a labeling issue on the underside. I also didn’t give enough clearance for the full shrouded 6-pin header for ICSP. However, these small problems aside, it worked first time.

OSH  Park Fabricated minDUINO v1.6 Board Front and Back

OSH Park Fabricated minDUINO v1.6 Board Front and Back

Once I rework the design and have had some new test boards fabricated, I’ll publish all the design files on the minDUINO page.

I’ve decided to go full ‘Open Source’ after having watched several videos and read articles. I realised that I haven’t been following the full guidelines of the Open Source movement. Mostly because of my Non Commercial attitude. Over time, I will correct this site-wide and make sure all the designs are full Open Source and that all the design files reflect this. I may keep the (corrected) Eagle Files online but new designs will be produced in KiCad.

Posted in Building, Design, Uncategorized | Tagged , , , , , , , , , , , , | Comments Off on KiCad

Display Planning

Recently, I’ve been experimenting with the cheap 32×128 and 64×128 OLED Displays available from various emporiums. I’ve managed to prototype a simple Temp/Humidity/Pressure device without too much trouble, details will probably appear on ProjectAVR.com in due course.

One of the things that I found difficult was how to plan out the display elements. In the ‘old days’ of program planning, a lot of work was done on paper so I decided to design an OLED Display Planner Sheet enabling me to draw what I wanted and instantly find out what co-ordinates to use.

OLED Planner Sheet

OLED Planner Sheet

Each axis has the cell numbers on it and, although it’s not apparent from the above image, the lower 32 cells are shaded indicating the second set of 32 pixels. You can use the sheet for planning either two 128×32 sized OLEDs or one 128×64 sized OLED.

The planner sheet can be downloaded from:

ProjectAVR.com 32-64×128 OLED Planner Sheet: PDF

and is published under Creative Commons Attribution-ShareAlike 4.0 International Licence. Feel free to download and use as you see fit. Print at 100% on A4 landscape paper at 600×600 dpi for best results.

Creative Commons License128×32 and 128×64 OLED Planner Sheet by ProjectAVR – Steve Smith G0TDJ is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Posted in Uncategorized | Comments Off on Display Planning

Constructing an RC2014

Whilst working on the ZAViouR v1.02, I discovered a kit for a Z80 based micro-computer designed by Spencer Owen. Spencer called it the RC2014 since it was for the Retro Challenge in 2014. It’s a nice, simple modular design which can be built on stripboard but Spencer sells a kit of parts (and all the different modules separately) on Tindie.

I ordered the RC2014 (full monty) kit along with the additional Digital I/O board. All of which arrived in a couple of days in a well packed padded envelope. There are no instructions included, however, the boards are pretty much self explanatory and there are details on the website.

Construction went well and I configured the SIL (Single In Line) connectors in the same way that is illustrated in the Tindie images. The only real problem I had was with the tact switches on the Back Plane and Clock boards. The through holes didn’t quite align with the switch leads and required a little ‘persuasion’. Spencer assures me that he uses a better footprint on his later designs.

After I completed construction, I checked my soldering and that I’d got all the chips orientated correctly and also double-checked I’d plugged the boards in the correct way and with all the ‘PIN 1’ contacts lining up.

I had an FTDI module sourced from eBay which I connected up to the FTDI connector on the Serial I/O board. This produced a sporadic start-up. One in every six or seven starts would result in the machine firing up. I re-checked everything but i could find nothing amiss. It took me a while to find the ‘fault’.

Very kindly, Spencer included a few extra boards for me and I’d used one of his newer designs, not yet in general circulation. It is a Z80 board with jumpers for the Z80 control bus that are not included on the Back Plane. Although I’d soldered in the headers, I’d forgotten to add the jumpers meaning that several lines on the control bus were floating. After a standard ‘Doh!’ slap on the forehead and adding the jumpers, the RC2014 started up reliably every time!

RC2014 and Test Program

RC2014 and Test Program

Now the machine was up and running, I built up the Digital I/O board. I was very careful to seat the tact switches properly! Once built, I realised there was a small layout problem with the FTDI module I’d used. The solution was to make a right-angle adaptor with a 6-way header plug and it’s associated socket.

6-Pin Adaptor

6-Pin Adaptor

This allows the Digital I/O board to be plugged in whilst still using the FTDI module. Sadly, it does partially obscure the LEDs on the Digital I/O board but is good enough for testing. I quickly wrote a BASIC program to output 0 to 255 on the LEDs and came across a strange problem. When the value exceeded 70 or so, the RC2014 would crash. I had included the 7805 option on the Back Plane so I reasoned that the LEDs were pulling too much current and hence, creating a partial shutdown of the 7805. To test this, I bridged over the connections where the optional header pins were to bypass the 7805 and tried again. I might add, I was powering the board from a variable PSU.

From there, I discovered a strange thing. The board works perfectly, LEDs displaying 0-255 with ease but only if I keep the supply voltage under 5.0 volts. If supplied with even a small amount over 5 volts, the RC2014 crashes. I have spoken to Spencer about the issue and he can’t replicate the problem. However, at 4.8 volts supply, I have a fully working RC2014.

I have now ordered the Pi Zero Terminal board and the Universal Micro Keyboard to add to the project. These will allow use of the RC2014 without the FTDI module.

I really enjoyed building this little machine, despite the small issues and look forward to experimenting with it in the future.

Posted in Building, Construction | Tagged , , , , , , , | Comments Off on Constructing an RC2014

Lets have another go!

Well, inspired by the announcement of the Specnext, I’ve decided to get back to work on my ZAViouR Board. It’s been a long time coming but now, I really want to get it going. I got a little disheartened when I couldn’t get it to work before and I thought a break would do me good. It has! I’ve been involved in lots of other non-electronic projects but now I think it’s time to get back and get ZAViouR up and running or find out what’s wrong with the design.

The last time I tried to get ZAViouR to work, I think I probably aimed a little high, duplicating what I had done on the previous version of the board. I wrote a small AVR program to load blinkenlight code into the SRAM, run the Z80 and flash a set of LEDs. When I converted this to the new version of ZAViouR, it failed. I did some cursory checks before I left it alone.

Initial Check of ZAViouR v1.02

Initial Check of ZAViouR v1.02

This time, I’m going to take it one step at a time and prove each part works sequentially. The first thing to do is give the AVR chip a test by flashing the indicator lights. ZAViouR 1.02 has three of these. One is intended to eventually show the Z80’s M1 line’s activity (although it will need to be divided down in the AVR). The other two are general purpose. All that’s required is the standard ‘blink’ sketch that is supplied with the Arduino™ IDE. I can add a few lines for the extra LEDs and test that first. Subject to the AVR being in good order and being able to program it, I’ll continue by test loading the SRAM via the MCP23017 port expander.

For those curious, you can check out the circuit diagram here:

  • ZAViouR v1.02 Eagle v6.3.0 .PDF schematic file.

Once fully tested and hopefully working, I’ll be uploading all the design files and gerbers on their own dedicated page.

Wish me luck!

[UPDATE 20th May 2016]
After having checked that the AVR was operational by loading the standard ‘blink’ program, I then started from scratch and found the port expander not working. I first suspected a faulty component but after checking some code examples online, I found that I hadn’t included the serial initalisation before the I2C calls. This fixed the port expander. I then modified the code I had used previously and eventually managed to store code in the SRAM successfully. Now, all that is left is to execute the code in the Z80 after cleanly removing the AVR from the address, data and Z80 control busses.

Posted in Uncategorized, ZAViouR | Tagged , , , , , , , , , , , , , , | Comments Off on Lets have another go!

The Spectrum Coming Next

I’ve been out of the loop somewhat but recently I heard of a new retro-computing project called the ZX Spectrum Next. It’s an update of the original Sinclair Spectrum Plus but with lots of added bells and whistles. I grew up in the 8-bit microcomputer era and learned lots on an original Spectrum Plus. The chance to get my hands on an updated machine is exciting.

Spectrumnext Black

The Spectrum Next rendered in black.

There is a fledgling website for the machine at http://www.specnext.com/ but for the convenience, here is a current list of specs as of 9th May 2016:

  • Processor: Z80 3.5Mhz and 7Mhz modes
  • Memory: 512Kb RAM
  • Video: ULAplus featuring expanded video modes and colours
  • Video Output: RGB, VGA, mini HDMI
  • Storage: SD Card slot, with DivMMC-compatible protocol
  • Audio: AY-3-8912 or FM2149 audio chips (selectable) with stereo output
  • Joystick: DB9 compatible with Cursor and Interface 2 protocols (selectable)
  • PS/2 port: Mouse with Kempston mode emulation or an external keyboard
  • Extras: Multiface functionality for memory access, savegames, cheats etc.
  • Tape support: Mic and Ear ports for tape loading and saving
  • Expansion: Original external bus expansion port and accelerator expansion port
  • Accelerator board: GPU / 1Ghz CPU / 512Mb RAM

A Facebook group dedicated to the machine can be found at: Spectrum Next Facebook Group and there has been lots of support there for the makers and plenty of suggestions and comments on the design.

The Spectrumnext Rear

The Spectrum Next Rear

The Spectrumnext SD-Card Slot

The Spectrum Next SD-Card Slot

The makers intend to crowd-fund the machine and supporters are eagerly awaiting the announcement on when this will take place.

What’s this got to do with AVRs you ask? Well, one of the things I always wanted on my original Spectrum Plus was a general purpose I/O port. Commercial boards were just to expensive for me at the time and I didn’t have the knowledge to design and build one for myself. So my wish is to design a good AVR based general I/O port for the Spectrum Next. The Spectrum Next will be fully compatible with the original Spectrum’s rear expansion connector and should be fairly easy to interface a design. I’d like to have 8 buffered digital inputs and 8 buffered digital outputs.

There is discussion that the Spectrum Next will feature a port to add an ESP-8266 WiFi module which opens up lots of possibilities for networking.

If you are interested in the Spectrum Next, I highly recommend you check out and bookmark the official website and join in the discussion on the Facebook Page. And watch for updates on my interface design here once I have a Spectrum Next to play with.

The Spectrum Next rendered in White

The Spectrum Next rendered in White

Many thanks to Henrique Olifers for the use of all images.

 

Posted in Uncategorized | Comments Off on The Spectrum Coming Next

Distributed Computing

Now for something slightly different. In attempt to support this site and a few others that I have online, I’ve looked into ways of earning a few pennies. You may have noticed the (hopefully) few Google ads on the pages. I have discovered another money making technique in the shape of distributed computing. I have long known about this since I ran the SETI@Home software for ages (searching for intelligent life via the Aricebo Radio Telescope). This is slightly different in that the data that each workstation processes does so to test websites and pays the user for doing so. In their own words:

“Gomez PEER is a secure java application that runs in the background of your PC and leverages your system’s idle resources (such as unused processing power, RAM, and bandwidth) to test the performance of many of the world’s most popular websites.”

As the text says, you run a small Java app on your desktop and it uses spare processor cycles. There is a probation period whilst the software works out if your workstation will be useful after which it makes the Java app active. I have been running it for a few days and have potentially made the hansom sum of $0.15! I expect this will grow once the app has been running for a while and goes into it’s active state. The thing to do is to leave it running all the time whether you are using your workstation or not. Since mine runs 24/7, that won’t be an issue for me. It’s not exactly going to make me rich anytime soon but with a few referrals,  it may help with the hosting fees.

If you’d like to give it a try, please click on the banner below which will automatically add me as a referrer. If this doesn’t work, please indicate ‘destinysagent’ without the quotes as your referrer when you go through the sign-up process.





Any help given is very much appreciated and helps with hosting a variety of websites including this one.

In other news, I have given the ZAViouR Board a little break, having run up against a few software problems. I aim to be back with it once I complete a few other projects I’m currently working on.

Posted in Coding | Comments Off on Distributed Computing

New Boards On The Way

Finally, after being involved in non-electronic projects for a while, I’ve been able to finalise the new ZAViouR board v1.02 and the 7400 based I/O expansion board v1.00. Both have been sent to my favourite fabrication house, Hackvana and I await the acceptance e-mail.

ZAViouR v1.02 Gerblook.org Preview

ZAViouR v1.02 Gerblook.org Preview

Meanwhile, I’ve also started on an 8255 based I/O board, a Zilog Z80 PIO based I/O board and of course, the Backplane board. After the ZAViouR and 7400 I/O boards have been tested, I’ll get the backplane fabricated.






I’ve arranged the expansion connectors so that the backplane will replace the I/O board and the I/O board and up to three others may be plugged into the backplane. The backplane has now an optional daisy-chain connector so that more than one can be connected.

ZAViouR Backplane v1.00 Eagle Preview

ZAViouR Backplane v1.00 Eagle Preview

The I/O board and Backplane required a specially mirrored 40-pin IDC connector which I created as a custom component in Eagle. There is no difference in the physical connector, just how the connections are utilised on the PCBs.

Once tested, all the design files will be available on their own page which I will add to the site.



Posted in Construction, Design, ZAViouR | Tagged , , , , , | Comments Off on New Boards On The Way

ZAViouR Demo and plans

Development continues on ZAViouR Boards v1.01 and v1.02. With a simple bit of Arduino code, you can insert Z80 Hex coded machine code into the ‘Sketch’ via bin2h.exe then compile and run it. Demonstrated here with a simple routine to flash LEDs on the output port:

I recorded the clip on my iPhone which misses LEDs due to it’s frame rate. In reality, all the LEDs flash in turn before repeating.

Meanwhile, I’ve also been developing ideas for the next iteration of ZAViouR adding the following features:

  • A 40-pin expansion port.
  • SRAM size Option. Extra traces for Cypress CY7C199CN 32K SRAMs.
  • A ‘proper’ power socket.
  • A second indicator LED for AVR status.
  • 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.

I have produced a quick mock-up of the new board along with the I/O board I’ve designed to go with it based on a single port of Grant Searle’s excellent design.

ZAViouR with I/O Expansion

ZAViouR with I/O Expansion

My intention is to get the I/O Board fitted and proved before designing a backplane board that will go between them and add three more ports.



Posted in Building, Construction, Design, ZAViouR | Tagged , , , , , , , , , | Comments Off on ZAViouR Demo and plans

ZAViouR Lives!

After a painful few days programming, trying to identify why I couldn’t do a simple thing like load SRAM with data, I found that I’d mis-typed one of the port names in the init routine. After editing the single character that was incorrect, it sprang into action!

I quickly modified the program to load a ‘proper’ Z80 routine and tried it out. It was a simple program, loading 50 bytes of RAM positioned just about the main code with a value. I first ran the AVR code to load the Z80, then manually switched off the /BUSRQ line (a modification I had to hardwire to the board) and reset the Z80. I then ran a read program on the AVR and the value I’d chosen was there in the SRAM! I changed the value a couple of times and re-ran the test to verify it was working.

;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

The next step is to re-write the loading program entirely, in a more tidy manner, and test the Z80 properly when the two missing chips for the output port are delivered.

I’d like to say a big thank you to Bill Rowe who gave me some great advice and suggested ideas as I went along. I’m sure I will find his help invaluable in the future as I develop the ZAViouR Board.

For those who would like to follow the progress as it happens, I have a Hackaday.io page devoted to the project. You can find it at: Hacakday.io

 Here’s a quick video of me resetting the board twice. You can see the /M1 light flicker (once I get my hand out of the way!) and then go off and on as the Z80 resets.

In the video you can also see the hard-wired /BUSRQ switch which will be re-routed to the AVR in the next version of the board. The next version of the board will have improvements based on experiences with the current version. It will have 64Kb of SRAM and the address lines will be driven from the AVR via a port expander. This will free up plenty of AVR GPIOs for other tasks.



Posted in Uncategorized | Comments Off on ZAViouR Lives!

AVR/Z80 Hybrid

The AVR/Z80 Hybrid boards arrived yesterday. Excellent service as always from Hackvana, my preferred fabricator. I set about constructing the first board. I’ve not included the output port on the first one since I haven’t got the two relevant 74′ chips in stock but they are on order and not necessary for initial testing.

AVR-Z80 Hybrid v1.01 Assembled and Bare

AVR-Z80 Hybrid v1.01 Assembled and Bare

It went together pretty easily. I soldered the chip sockets first, then the capacitors and then followed with the rest of the components. The Z80 is an original Zilog chip, one of a few I own. Before inserting the AVR, Z80 & AMIC SRAM, I tested the 7404 oscillator and all was well. I then plugged in the AVR and tested it by loading the standard ‘Blink’ program via ICSP, OK so far. I added the Z80, still OK and then the SRAM – Ooops! Dead short (indicated by my PSU going into Constant Current). After a quizzical few moments I realised I had plugged it in backwards! Doh! Luckily, I have a number of this chip if this one has failed but I reversed it and all is well.

I have started writing some test code which I will publish when complete and working. At the moment, the code is getting the AVR ports set up for sending data over to the SRAM. I’m currently working out the best way to convert a Hex or Bin file into something that the Arduino IDE will accept as data in preparation for sending byte by byte over to the SRAM.



Posted in Construction, Programming | Tagged , , , , , , , , , , | Comments Off on AVR/Z80 Hybrid