Maker Pro
Maker Pro

Create Memory/RAM

RaulJ

May 6, 2014
2
Joined
May 6, 2014
Messages
2
Hello, I am a beginner in electronics and i would like to create an 8-bit computer, or something similar. I already made the ALU and now i have some problems with the memory/ram. Is it possible to create memory out of transistors and how?(i don't want to buy the ram for it, i want to make everything from scratch, because i want to understand how it works) I already made latches, but i don't know what's next. I connected 8 latches and i know that i need at least 16x, but i don't know how exactly to connect them and coordinate them(I know in theory, but I don't know exactly in practical, i need a circuit diagram or something).

And sorry if i posted in a wrong section.

Thank you for your time :D.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Hello Raul and welcome to Electronics Point :)

Hello, I am a beginner in electronics and i would like to create an 8-bit computer, or something similar.
You're a beginner? Why not start with something simpler. Perhaps a spacecraft, or an MRI machine! :)
I already made the ALU and now i have some problems with the memory/ram. Is it possible to create memory out of transistors and how?(i don't want to buy the ram for it, i want to make everything from scratch, because i want to understand how it works)
I already made latches, but i don't know what's next. I connected 8 latches and i know that i need at least 16x, but i don't know how exactly to connect them and coordinate them(I know in theory, but I don't know exactly in practical, i need a circuit diagram or something).
Yes, you can make RAM from transistors... a LOT of them! I guess you're using the traditional "single bit static RAM" - a bistable multivibrator made with two transistors. So you've made eight of them, using 16 transistors. But to address this byte, and read and write it, you'll need to add a truckload more transistors.

Memories are accessed and controlled through address lines, data lines, and control lines (typically, chip select, read enable, and write enable (not present on ROMs, obviously)). You need to decode the address lines to determine which set of latches to access, then interpret the other three signals to decide whether to take the data from the data bus and write it to the latches, or vice versa. Then repeat for the next byte, and so on. Now, I'm an assembly language programmer, so I'm used to doing things the hard way. But even I think that THAT level of masochism is just CRAZY!

If you really want to understand the nitty gritty of how CPUs work, can I suggest learning about FPGAs. These are general-purpose logic devices that can be configured to perform all kinds of complex functions. You can create your definitions using interconnected logic gates, state machines, and even sequential programs. The development software is pretty advanced, and in some cases you can get it for free. Companies like Altera, Lattice and Xilinx come to mind.

Altera have an interesting product called the Nios - a CPU that can be instantiated in an FPGA. It comes in several different versions, to suit different processing demands, and multiple copies can be combined in a single device, along with RAM, ROM, customisable glue logic, and other peripherals. It's really quite amazing. There's at least one C compiler that generates code for the Nios. Other FPGA companies probably have similar products, and you can obtain FPGA IP (intellectual property) for standard cores such as the 8051; some of these IP cores are free and some aren't.

Whether you want to teach yourself, or whether you do a course, for hands-on learning and deep understanding of how CPUs operate, an FPGA is by far the quickest, cheapest and easiest way to go.
 

kpatz

Feb 24, 2014
334
Joined
Feb 24, 2014
Messages
334
You can bake a cake by growing wheat, making flour, growing sugar cane, raising chickens for the eggs, etc. Or build a house by growing a bunch of trees. You could make a RAM from transistors too, but it would be complex and unwieldy. Read up on the history of computers, and read about machines built from transistors (or even tubes) that filled a large building and had maybe a kilobyte of RAM.

Then read up on FPGAs if you want to "construct" your own RAM or CPU in a more efficient manner.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Or you can look up computers like the "Educ-8" which had a total board area about the size of an A3 sheet of paper (maybe more) and implemented an 8 bit computer with 128 bytes of RAM. This was made using CMOS ICs, so doing it with discrete components could easily increase the complexity by 1 or 2 orders of magnitude (10 to 100 times).

There are designs for digital clocks made with discrete transistors. They are pretty simple compared to a computer yet they are roughly the same size as an A4 sheet of paper.

This would be a *huge* job.
 

RaulJ

May 6, 2014
2
Joined
May 6, 2014
Messages
2
Okay, thank you very much for your replies, it helped me and i will see what I can do :D
All the best.
 

foTONICS

Sep 30, 2011
332
Joined
Sep 30, 2011
Messages
332
+1 for the FPGA tips, I purchased this book (follow link)

http://www.amazon.ca/VHDL-Starters-Guide-2nd-Edition/dp/0131457357

This book is, obviously, heavy on the programming but it also teaches about RAM/ROM, addressing, half/full adders, ALU's, and everything else that could be used to build what you have in mind. You can also implement all of it on the same FPGA. I want to do more FPGA work so lately I've been reading the book from front to back and it does a good job of explaining circuit behaviour and how the logic is physically implemented.
 
Top