DesignSpark Electrical Logolinkedin
Menu Search
Ask a Question

Raspberry Pi with an ancient ancestor

It’s extraordinary:  the release of a new piece of computing technology has generated a huge wave of nostalgia for 30 year old kit such as the Sinclair ZX81, ZX Spectrum and the BBC Micro. The RasPi represents the latest stage in an illustrious line of computing development at Cambridge going back to 1949 and EDSAC built by Maurice Wilkes and his university team. People of a certain age, like myself, have dredged up the old memories and in many cases the actual hardware out of the attic. Well, everybody has heard of the Sinclair Spectrum, but what of the white box in the photo below dwarfing the RasPi amongst the clutter on my desk?

 RasPi & Jupiter Ace

Looking like a Sinclair ZX80, it is yet another Z80 microprocessor based computer, designed by a couple of guys from the Spectrum development team who set up their own company, Jupiter Cantab to build and sell it. Called the Jupiter Ace, it wasn’t really aimed at the beginner because of the computer language it used – Forth. This language caused a lot of excitement in the early 80’s because of its efficiency and was ideal for programming microcomputers. It became popular in real-time control applications, particularly robotics, and is still used today. It is also a semi-compiled language unlike the BASIC of the Spectrum which is fully interpreted.

Forth programs look really incomprehensible because they use Reverse Polish Notation (RPN) instead of the conventional algebraic. Anybody using a Hewlett Packard calculator at the time was familiar with this seemingly odd way of doing things.

Algebraic:   C = A + B         Reverse Polish:  A B +

In fact RPN is the ‘natural’ syntax for computers and explains why Forth is so efficient. The language makes extensive use of the classic push-down memory stack. In the simple example above, A is ‘pushed’ onto the stack followed by B. The + operator ‘pops’ A and B off the stack, adds them and pushes the result back onto the stack. The main problem with this type of programming is keeping a mental image of all the items on the stack at each stage while developing the program.

At that time, 1982, I wrote my own Forth interpreter/compiler for the 8085 microprocessor, developed on a microcomputer running the operating system CP/M, the predecessor to MS DOS. It was used to program a microprocessor-based lab instrument I’d designed. The interpreter section of the Forth environment fitted into a 4 Kbyte EPROM on the instrument’s PCB.  I didn’t know it at the time, but I’d built what we now call an ‘embedded’ system programmed in a high-level language.

Here is a fragment of a Forth program that performs a standard piece of digital signal processing. No prizes, but can anybody see what it does?

 

:  MYSTERY 1 DUP M1 ! SFACT ! 256 M2 ! 9 1 DO SCALE

   M2 DUP @ 2/ SWAP C! 0 M3 !

   M1 @ DUP 2* M1 ! DUP K1 C! 1+

   1 DO

   M3 @ DUP C/S @ U2 ! 192 + 255 AND C/S @ U1 !

      256 I DO

   I K1 @ + L1 !

   L1 @ REAL @ DUP U1 @ 32767 */

   L1 @ IMAG @ DUP U2 @ 32767 */

   ROT SWAP – SWAP U1 @ 32767 */

   ROT U2 @ 32767 */ +

   DUP I IMAG @ SWAP – L1 @ IMAG ! I IMAG +!

   DUP I REAL @ SWAP – L1 @ REAL ! I REAL +! M1 @ +LOOP

   M3 @ M2 @ + M3 C!

LOOP LOOP ;


Meanwhile back to Python on the Raspberry Pi.

If you're stuck for something to do, follow my posts on Twitter. I link to interesting new electronics components and development kits (some of them available from my employer!) and retweet posts I spot about robot, space exploration and other issues.

Engineer, PhD, lecturer, freelance technical writer, blogger & tweeter interested in robots, AI, planetary explorers and all things electronic. STEM ambassador. Designed, built and programmed my first microcomputer in 1976. Still learning, still building, still coding today.

19 Apr 2012, 21:18

Comments

[Comment was deleted]

May 24, 2013 19:50

Help me please modelsource not wanting to play
well I've had a frustrating day I wanted to design a simply high bridge controller today I have all the parts and the sch drawing from the net

I even found the parts and part numbers in the RS web store. then my problems started.

I pasted the RS part number into modelsource expecting it to give me the part and add it to my drawing but no it couldnt find a RS part number (this happened twice) yes twice with to different components.

LDR
LM1458

I'VE even tried to import the components from eagle but I couldn't find the file SchematicToIntermediate.ulp .

Im running the latest eagle lite

what am i todo as I'm lost I even logged out and back in to modelsource but no change






James

0 Votes