Friday Fun: RC2014 Micro

We got back to the 1980s to build a computer based upon a Zilog!

Zilog? Those puppets from 1990s TV?

Err no, the Zilog Z80 is an 8-bit CPU that came out in 1976! and it is an important CPU for computing history. It powered the Colecovision console, and for UK enthusiasts it powered the ZX80 / ZX81 / ZX Spectrum legendary home computers that sparked a generation of bedroom coders.

I never owned any Sinclair machines, I was a Commodore kid, but I was a product of that era and I did write some projects in BASIC from magazines.

BASIC?

Beginners All-purpose Symbolic Instruction Code is a high level (human readable) language that started many on their coding journey. Just like Python today, BASIC was the most popular way to build something in code as it came ready to go on almost every machine. As soon as a machine was booted, it went straight to the BASIC interpreter.

The "Hello World" (the most basic project that we can write) in BASIC looks a little like this.

10 PRINT "FOR HACKS VISIT BIGL.ES"
20 GOTO 10
RUN

This code will print FOR HACKS VISIT BIGL.ES to the screen in a forever loop. The loop is constructed on line 20 which uses GOTO to send the interpreter back to the first line, line 10.

In Python it would look like this.

while True:
    print("FOR HACKS VISIT BIGL.ES")

So why all the interest Les?



Well yesterday I started to build a kit which I received from my friend Heeed.

"The RC2014 Micro is a 32k Z80 based single board computer which runs either Microsoft BASIC or Steve Cousins SCM monitor ROM." So in essence it is a smaller ZX computer.



In about 90 minutes I had soldered the kit, triple checking everything before I soldered them in place. I started with the resistors as they are nice a low.



Then the capacitors around the perimeter and the crystal used for timing the CPU.



Then I added some male header pins and spare jumper connectors that I scavenged from taking a Sky+ box apart for spares.



I added a few ICs to the board for UART (Serial) and ROM (the OS)



Then the Z80 and RAM were added.



All the soldering was completed after I added the serial breakout pins.

Et voila!

So I just plugged it in and it worked?

Well not exactly I had an issue and it was that I just got a non responsive prompt :(

So I reached out for help and RC2014, the board creator, helped me out.

After a little tweaking of the TX and RX connections from the CP2102 USB to serial device...by tweaking I mean swapping them over...we had life!

So now what? What are we going to code?

We've got the "Hello World" code already.

10 PRINT "FOR HACKS VISIT BIGL.ES"
20 GOTO 10
RUN

Try the code out, obviously change the message in " " to something humorous. Perhaps a family member smells, or you would like to tell the world that you "woz ere"?

Do something better!

How about we have the code ask us for input, store the input to a variable and then print that variable to the screen?

10 INPUT A$
20 PRINT A$
30 GOTO 20

On line 10 we ask for input from the user (typing on the keyboard) which is then saved to a variable A$ which is then printed to the screen using the code on line 20. Lastly on line 30 we tell the code to go back to line 20 and repeat printing the text.



So I typed this code in and a ? appeared, this is the prompt to ask me to type something! After a second the text scrolls up the screen! To stop it I press CTRL+C and I see Ok and a prompt.

I want to show my mum / dad / partner the code!



In the prompt type LIST to show the code. I used to do this with my mum when I was a kid, she would do that parent thing "WELL DONE!...< mumble > not a clue what he is doing..."< /mumble >

This is just the start of my adventures

I intend to learn more about BASIC, and how I can use it to make a few cool projects.

Why?

Well because it interests me, it is interesting to see how far we can go with this language, and the parallels between BASIC and Python.

Where can you buy one?

From the creator's Tindie store!