Author Topic: 8 bit computer without RAM  (Read 15261 times)

0 Members and 1 Guest are viewing this topic.

Offline ChristofferBTopic starter

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: dk
  • Chemistry phd student!
    • My channel:
8 bit computer without RAM
« on: July 27, 2015, 01:49:16 am »
Hi again!
Okay, so I've been out of the computing 'tronics for 4 months or so, and that means new project!

- I'm trying to see how simple one could actually go with a small 8-bit system. I've been messing around with some preliminary designs, and the plan is making a z80 computer that is literally just CPU, EPROM, output latch and whatever MEM/IO decoding logic I need.

The EPROM will hold a few bytes of code just outputting patterns or so.
Question is- If I don't need to store anything on the fly, would a system like this need RAM? I'd like to keep chipcount at a minimum at first.

Thanks!
--Christoffer //IG:Chromatogiraffery
Check out my scientific instruments diy (GC, HPLC, NMR, etc) Channel: https://www.youtube.com/channel/UCZ8l6SdZuRuoSdze1dIpzAQ
 

Offline TheMG

  • Frequent Contributor
  • **
  • Posts: 866
  • Country: ca
Re: 8 bit computer without RAM
« Reply #1 on: July 27, 2015, 02:32:13 am »
My question is... why?

There is a large variety of 8bit microcontrollers available (such as Microchip PIC) that have EEPROM, RAM, I/O and even the clock oscillator built in. Literally a single-chip solution. They're available in everything from small 8-pin packages to large 40+ pin versions depending on how much I/O you need.

Anyways, without RAM it's extremely limiting what you can do. Even something as simple as displaying patterns. Presumably you don't want it to run full-tilt, and want to be able to slow down the time between each pattern. That will require some form of counter, which will need RAM to store values.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: 8 bit computer without RAM
« Reply #2 on: July 27, 2015, 05:29:25 am »
I think you do not need RAM if the internal registers are sufficient.
However this will severely limit you're programming options.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: 8 bit computer without RAM
« Reply #3 on: July 27, 2015, 05:52:36 am »
I've built one!  I once took a microcontroller course and for some dumb reason the assigned project was a  RAMless Z80 + Z80 PIO to control a set of model traffic lights for a four way junction with pedestrian crossing.

The problem is, no RAM = no conventional stack so no subroutines and no way of returning from an interrupt to where it came from.  The constraints usually result in evil spaghetti code.

Far more interesting is a ROMless Z80 board.   The trick for that is to attach it to a PC printer port and after reset, make it wait for a byte on the printer port on every read from memory.  Writes go to memory as normal.   This mode is turned off under software control after a bootloader or monitor program has been transferred from the PC.
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: 8 bit computer without RAM
« Reply #4 on: July 27, 2015, 06:19:55 am »
http://www.z80.info/zip/z80cpu_um.pdf

Page 28 is ram less example
Page 29 adds ram

C
 

Offline ChristofferBTopic starter

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: dk
  • Chemistry phd student!
    • My channel:
Re: 8 bit computer without RAM
« Reply #5 on: July 27, 2015, 12:36:17 pm »
My question is... why?

My answer is... why not ? - No really, you're absolutely right, there's no "reason" for doing this. My interest in digital electronics dies with anything made after the mid-to-late 80's, so it's simply because I find it more interesting.

I've built one!  I once took a microcontroller course and for some dumb reason the assigned project was a  RAMless Z80 + Z80 PIO to control a set of model traffic lights for a four way junction with pedestrian crossing.

The problem is, no RAM = no conventional stack so no subroutines and no way of returning from an interrupt to where it came from.  The constraints usually result in evil spaghetti code.

Far more interesting is a ROMless Z80 board.   The trick for that is to attach it to a PC printer port and after reset, make it wait for a byte on the printer port on every read from memory.  Writes go to memory as normal.   This mode is turned off under software control after a bootloader or monitor program has been transferred from the PC.

That's encouraging! And yes, that ROMless trick is indeed very interesting! - One should be able to do something similar with reading from paper tape..

http://www.z80.info/zip/z80cpu_um.pdf

Page 28 is ram less example
Page 29 adds ram

C

How was I to know that the z80 datasheet had data about the z80?   ::) - Yeah, should've consulted that in a little more detail

And of course it'd be a tiny feat to add some RAM, you could basically just solder it on top of the ROM with a few modwires, and i will at some point.
My plan is to make the simplest possible z80 system, that can actually do things, IE. not just running NOPs. I'm using the mem and IO decode scheme as made by Grant Searle, but at this point I don't have anything to communicate via serial, so I won't be adding the UART and/or rs232 interface either. yet.

--Christoffer
--Christoffer //IG:Chromatogiraffery
Check out my scientific instruments diy (GC, HPLC, NMR, etc) Channel: https://www.youtube.com/channel/UCZ8l6SdZuRuoSdze1dIpzAQ
 

Offline BloodyCactus

  • Frequent Contributor
  • **
  • Posts: 482
  • Country: us
    • Kråketær
Re: 8 bit computer without RAM
« Reply #6 on: July 27, 2015, 12:51:03 pm »
no stack makes it seem very pointless. but whatever floats ones boat eh.
-- Aussie living in the USA --
 

Offline McBryce

  • Super Contributor
  • ***
  • Posts: 2682
  • Country: de
Re: 8 bit computer without RAM
« Reply #7 on: July 27, 2015, 01:01:44 pm »
If you want a challenge and like 80's hardware, then add a floppy controller and get it to boot from a disk.

McBryce.
30 Years making cars more difficult to repair.
 

Offline Pjotr

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: nl
Re: 8 bit computer without RAM
« Reply #8 on: July 27, 2015, 01:05:05 pm »
Consider the Zilog Z8, It's quite old but it has a 256 byte register stack you can use as ram as well. Also pretty handy to program in assembler for small logic related tasks.  It's 20 ago I used those and in those days they came without an embedded EE program prom.  Today for simple tasks Atmel Tiny's are the Swiss army knife.
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2084
Re: 8 bit computer without RAM
« Reply #9 on: July 27, 2015, 01:06:47 pm »
Omitting the RAM means (at least) one less chip and less address decoding. There was a design for an MSF radio clock (I think it that went by the name of "Rewbichron") that used a Z80 to decode the signal and drive the display all without external RAM.
 

Offline ChristofferBTopic starter

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: dk
  • Chemistry phd student!
    • My channel:
Re: 8 bit computer without RAM
« Reply #10 on: July 27, 2015, 01:24:46 pm »
Consider the Zilog Z8, It's quite old but it has a 256 byte register stack you can use as ram as well. Also pretty handy to program in assembler for small logic related tasks.  It's 20 ago I used those and in those days they came without an embedded EE program prom.  Today for simple tasks Atmel Tiny's are the Swiss army knife.

I actually have made a z8 machine, with the Z8671 chip which is the z8 with built-in 2k tinybasic. I've ever gotten it properly working though, and the architecture is very very different from most other 8-bit processors- think it's Harvard architecture.

Another goal with this, I forgot to mention, is that I want the smallest system that I can develop my z80 assembly programming skills on. Until now, I've been using my ZX spectrum, with a small BASIC program to punch in machine code, but the IO on the speccy is horrible to figure out.

If you want a challenge and like 80's hardware, then add a floppy controller and get it to boot from a disk.

McBryce.

That would be pretty neat, maybe at some stage!
--Christoffer //IG:Chromatogiraffery
Check out my scientific instruments diy (GC, HPLC, NMR, etc) Channel: https://www.youtube.com/channel/UCZ8l6SdZuRuoSdze1dIpzAQ
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21672
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 8 bit computer without RAM
« Reply #11 on: July 27, 2015, 01:26:58 pm »
http://seventransistorlabs.com/tmoranwms/Elec_Z80.html

Once you've got everything wired up, it's practically a trivial step further to add RAM and more ports.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: 8 bit computer without RAM
« Reply #12 on: July 27, 2015, 01:31:52 pm »
In the old days, it wasn't uncommon to add more system RAM by piggy-packing and soldering the new chips onto the existing RAM chips and to wire the chip selects separately. It wasn't pretty, but it worked.

Selecting an EPROM/FLASH and RAM so that they are pin-compatible makes the piggy-packing possible. Would that be useful, I do not know as you are creating the board from the scratch anyway, so you can add the socket for the RAM.
« Last Edit: July 27, 2015, 01:44:23 pm by Kalvin »
 

Offline Pjotr

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: nl
Re: 8 bit computer without RAM
« Reply #13 on: July 27, 2015, 02:54:49 pm »

Another goal with this, I forgot to mention, is that I want the smallest system that I can develop my z80 assembly programming skills on. Until now, I've been using my ZX spectrum, with a small BASIC program to punch in machine code, but the IO on the speccy is horrible to figure out.


Funny you mention the ZX Spectrum. I actually build a lot of controls for art installations with those things. All programmed in assembler. There was a neat 2-pass in-line assembler available for it. But hell, the 2 passes took half an hour with cassette tape as storage. Concerning the bus: That is not all that difficult, near all the processor lines are available there and you can hook up all the Z80 peripherals to it including interrupts. It will be more difficult to find a proper connector I guess.

But if your goal is to master assembly coding, I suggest to look for something more more modern. As long as the instruction set of the MCU is clever and neat laid out.  The art of assembly coding by itself does not differ much between processors, if it a 6809, a Z80, Z8 or ATmega. Only their structure en mnemonics differ. But definitely stay away from the PIC's, assembly coding is a nightmare with them.

Hooking up an Atmel 8-bit controller in a DIP package on a piece of breadboard is a snap. Lots of diy ISP programmers available on the net, although I myself stick with Atmels own $30 USB programmer I got for free from a kind Atmel representative here. And all development tools for PC are free. IAR has even a very good professional assembler for free.

Ar do you have particular needs for a Z80 in special?
« Last Edit: July 27, 2015, 03:02:07 pm by Pjotr »
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: 8 bit computer without RAM
« Reply #14 on: July 27, 2015, 03:20:24 pm »
I don't think it will add too much complexity if you added some RAM. 6116 chips are cheap and that 2K RAM will make your system design a lot easier.

By the way, one of my most commonly used SIP cores for my CPLD and FPGA projects, is a SIP-based configuration-free DDR3 controller. When coupled to a DIMM module as used in normal computers (I usually use a 2GB DDR3-1333 SO-DIMM module that was a reject from my computer upgrade) it gives me some (in my case, 2GB) of cheap RAM space.
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: 8 bit computer without RAM
« Reply #15 on: July 27, 2015, 03:25:59 pm »

Another goal with this, I forgot to mention, is that I want the smallest system that I can develop my z80 assembly programming skills on. Until now, I've been using my ZX spectrum, with a small BASIC program to punch in machine code, but the IO on the speccy is horrible to figure out.


Funny you mention the ZX Spectrum. I actually build a lot of controls for art installations with those things. All programmed in assembler. There was a neat 2-pass in-line assembler available for it. But hell, the 2 passes took half an hour with cassette tape as storage. Concerning the bus: That is not all that difficult, near all the processor lines are available there and you can hook up all the Z80 peripherals to it including interrupts. It will be more difficult to find a proper connector I guess.

But if your goal is to master assembly coding, I suggest to look for something more more modern. As long as the instruction set of the MCU is clever and neat laid out.  The art of assembly coding by itself does not differ much between processors, if it a 6809, a Z80, Z8 or ATmega. Only their structure en mnemonics differ. But definitely stay away from the PIC's, assembly coding is a nightmare with them.

Hooking up an Atmel 8-bit controller in a DIP package on a piece of breadboard is a snap. Lots of diy ISP programmers available on the net, although I myself stick with Atmels own $30 USB programmer I got for free from a kind Atmel representative here. And all development tools for PC are free. IAR has even a very good professional assembler for free.

Ar do you have particular needs for a Z80 in special?

If you would like to learn assembler I would definitely suggest either x86 (including amd64) or ARM (both A32 and A64), the two most used processor architectures in the world. x86 is used in most PCs, servers and supercomputers, and ARM is appearing everywhere, from servers (AMD K12 Opteron) to desktops (Raspberry Pi) to mobile devices (Apple iPhone and Samsung Galaxy S) to embedded platforms (Arduino Due.)

Z80 is largely being phasing out in new designs.
 

Offline Pjotr

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: nl
Re: 8 bit computer without RAM
« Reply #16 on: July 27, 2015, 03:34:46 pm »

If you would like to learn assembler I would definitely suggest either x86 (including amd64) or ARM (both A32 and A64), the two most used processor architectures in the world. x86 is used in most PCs, servers and supercomputers, and ARM is appearing everywhere, from servers (AMD K12 Opteron) to desktops (Raspberry Pi) to mobile devices (Apple iPhone and Samsung Galaxy S) to embedded platforms (Arduino Due.)

Z80 is largely being phasing out in new designs.

Of coarse you can get you potatoes at home with a 20-tons truck. But is that is handy for learning driving?  >:D
 

Offline ChristofferBTopic starter

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: dk
  • Chemistry phd student!
    • My channel:
Re: 8 bit computer without RAM
« Reply #17 on: July 27, 2015, 03:36:21 pm »

If you would like to learn assembler I would definitely suggest either x86 (including amd64) or ARM (both A32 and A64), the two most used processor architectures in the world. x86 is used in most PCs, servers and supercomputers, and ARM is appearing everywhere, from servers (AMD K12 Opteron) to desktops (Raspberry Pi) to mobile devices (Apple iPhone and Samsung Galaxy S) to embedded platforms (Arduino Due.)

Z80 is largely being phasing out in new designs.

Of coarse you can get you potatoes at home with a 20-tons truck. But is that is handy for learning driving?  >:D
Hah, yeah, that's basically what I mean. I want it as basic as possible.
--Christoffer //IG:Chromatogiraffery
Check out my scientific instruments diy (GC, HPLC, NMR, etc) Channel: https://www.youtube.com/channel/UCZ8l6SdZuRuoSdze1dIpzAQ
 

Offline ChristofferBTopic starter

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: dk
  • Chemistry phd student!
    • My channel:
Re: 8 bit computer without RAM
« Reply #18 on: July 27, 2015, 03:36:43 pm »
No real need for the z80, nope. it was just the processor I had on hand, and the one I'm most familiar with. And again, no doubt that everything becomes smarter with microcontrollers, but I'm trying to keep it very very retro, as the computer electronics in the 70's and 80's is what really interests me.
And IN the matter of vintage 8-bit processors, I don't think there is an instruction set neater than that of the z80. maybe the 8088, but the hardware is way more involved.

My particular troubles with the zx spectrum (+2), is the I/O decoding. I couldn't really find an empty I/O address, and the ones I tried didn't work.

And of course, going x86 or ARM would be wayy more useful, but it's not a skill I need for anything other than personal interest, and if you want to develop your hardware yourself, it gets a bit hard with the more modern processors.
--Christoffer //IG:Chromatogiraffery
Check out my scientific instruments diy (GC, HPLC, NMR, etc) Channel: https://www.youtube.com/channel/UCZ8l6SdZuRuoSdze1dIpzAQ
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: 8 bit computer without RAM
« Reply #19 on: July 27, 2015, 03:53:52 pm »
No real need for the z80, nope. it was just the processor I had on hand, and the one I'm most familiar with. And again, no doubt that everything becomes smarter with microcontrollers, but I'm trying to keep it very very retro, as the computer electronics in the 70's and 80's is what really interests me.
And IN the matter of vintage 8-bit processors, I don't think there is an instruction set neater than that of the z80. maybe the 8088, but the hardware is way more involved.

My particular troubles with the zx spectrum (+2), is the I/O decoding. I couldn't really find an empty I/O address, and the ones I tried didn't work.

And of course, going x86 or ARM would be wayy more useful, but it's not a skill I need for anything other than personal interest, and if you want to develop your hardware yourself, it gets a bit hard with the more modern processors.

Not really - you can design your project around a i80486DX chip - still basic enough, but you are just one recompile away from getting your code from that 486DX to a dual Xeon behemoth computational powerhouse.

Also if you are willing to GPL your code, going x86 or ARM will allow you to lift code out of existing projects - UEFI, SeaBIOS, U-boot, and most importantly, Linux kernel. For example, even with only a 486DX, if you want to add a tested and trusted network stack, you can just use the code from Linux kernel and you are good to go.

Thanks to the flexibility of U-boot, even with your home-grown bus architecture around an x86 or ARM chip, you can always get a full blown Linux running on it if the chip supports all the required features (MMU). This will reduce a lot of code you will have to write, and save you a lot of time.
« Last Edit: July 27, 2015, 04:04:14 pm by technix »
 

Offline ChristofferBTopic starter

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: dk
  • Chemistry phd student!
    • My channel:
Re: 8 bit computer without RAM
« Reply #20 on: July 27, 2015, 04:00:52 pm »
No real need for the z80, nope. it was just the processor I had on hand, and the one I'm most familiar with. And again, no doubt that everything becomes smarter with microcontrollers, but I'm trying to keep it very very retro, as the computer electronics in the 70's and 80's is what really interests me.
And IN the matter of vintage 8-bit processors, I don't think there is an instruction set neater than that of the z80. maybe the 8088, but the hardware is way more involved.

My particular troubles with the zx spectrum (+2), is the I/O decoding. I couldn't really find an empty I/O address, and the ones I tried didn't work.

And of course, going x86 or ARM would be wayy more useful, but it's not a skill I need for anything other than personal interest, and if you want to develop your hardware yourself, it gets a bit hard with the more modern processors.

Not really - you can design your project around a i80486DX chip - still basic enough, but you are just one recompile away from getting your code from that 486DX to a dual Xeon behemoth computational powerhouse.

Also if you are willing to GPL your code, going x86 or ARM will allow you to lift code out of existing projects - UEFI, SeaBIOS, U-boot, and most importantly, Linux kernel. For example, even with only a 486DX, if you want to add a tested and trusted network stack, you can just use the code from Linux kernel and you are good to go.

I suppose that's right, and as I mentioned earlier, there are no "real" reasons to use hardware as antiquated as I do, but that's just what interests me the most.
And I'm really not aiming for anything as advanced as that. Right now, software-wise, if the end goal is a small bootloader and maybe some tinybasic; even that's way above my ambitions. I might do an x86 project at some point, but that's far in the future right now.
--Christoffer //IG:Chromatogiraffery
Check out my scientific instruments diy (GC, HPLC, NMR, etc) Channel: https://www.youtube.com/channel/UCZ8l6SdZuRuoSdze1dIpzAQ
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: 8 bit computer without RAM
« Reply #21 on: July 27, 2015, 04:06:56 pm »
Another goal with this, I forgot to mention, is that I want the smallest system that I can develop my z80 assembly programming skills on.

Without RAM you will not be able to use half of the instructions ;-)
 

Offline ChristofferBTopic starter

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: dk
  • Chemistry phd student!
    • My channel:
Re: 8 bit computer without RAM
« Reply #22 on: July 27, 2015, 04:09:55 pm »
Another goal with this, I forgot to mention, is that I want the smallest system that I can develop my z80 assembly programming skills on.

Without RAM you will not be able to use half of the instructions ;-)

I knoow, I never said it was a good idea, and RAM is probably the first expansion I'll make  :D
--Christoffer //IG:Chromatogiraffery
Check out my scientific instruments diy (GC, HPLC, NMR, etc) Channel: https://www.youtube.com/channel/UCZ8l6SdZuRuoSdze1dIpzAQ
 

Offline eas

  • Frequent Contributor
  • **
  • Posts: 601
  • Country: us
    • Tech Obsessed
Re: 8 bit computer without RAM
« Reply #23 on: July 27, 2015, 04:11:00 pm »
Another goal with this, I forgot to mention, is that I want the smallest system that I can develop my z80 assembly programming skills on.

Without RAM you will not be able to use half of the instructions ;-)
Bonus simplification!
 

Offline ChristofferBTopic starter

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: dk
  • Chemistry phd student!
    • My channel:
Re: 8 bit computer without RAM
« Reply #24 on: July 27, 2015, 04:13:56 pm »
Did someone say "Reduced Instruction Set Computing" ?  ;D
--Christoffer //IG:Chromatogiraffery
Check out my scientific instruments diy (GC, HPLC, NMR, etc) Channel: https://www.youtube.com/channel/UCZ8l6SdZuRuoSdze1dIpzAQ
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf