Home    LBP Showcase / Reviews / Recommendations    Level Showcase
#1

8-Bit Memory in LBP2

Archive: 1 post


I don't know if this was actually made in LBP2 before, or even in LBP1 (It might not be impossible, since you can make logic from mechanic components using key sensors), but I want to share probably one of my best levels up to date (I am not a good level dessigner unfortunately).

In this level, you can see and test an 8 bit memory in action.

http://ic.lbp.me/img/ft/bbcb3b88420f58bd0eabe2a5b94b3eb0984cc01a.jpg

Okay, the memory works like a real memory, this mean, you should know a little bit about binary. But nobody knows binary, nor anyone here should know binary, right? That's why I made it easier to understand for this people. You have the whole process explained in the bottom part of the level, the value of each bit marked above all the inputs, and tags telling you what everything does, with lights and colors to make it easier for everyone to understand.

The bit order is inverted, I know. I made it on purpose.

When using this memory, you should notice how it stores any binary number you store on it, in each memory address. Like a real memory.

For a more detailed and technic description of the component, the memory is composed of three basic components. The 8-bit memory cells (Where it stores the data), the selector (it selects wich cell to use, depending of the number in the address port), and what I call data matrix (merges the data from the 4 cells into one single 8-bit output).

Each memory cell contains 8 J-K flip flops used to store each bit, wich makes the memory "static" (the kind of memory commonly used in the cache of your computer microprocessor). Also, this kind of flip-flop requires a clock signal (sinchronous) in order to work. This signal comes from the CLOCK input. The clock signal generator I'm using in this level is obsolete, I have another one that goes faster using only one XOR gate with it's output connected at one of it's inputs, and a 100% battery connected to it's other input (addictionaly you can change the battery with a conmutator to make it toggleable).

The output of the memory cell is connected to a chip that serves as a port. When you select a memory region, you enable the output port of that cell, disabling the rest and giving only one output at once.

Also, it has a READ/WRITE input, which tells to the selected cell if it has to store data (using the SET input of each flip-flop), or send the current status of each bit trough the selected output.

The ZERO input will erase all data in all memory cells, using the RESET input in each flip-flop.

To operate with the memory, you must follow those steps:

1. Enable the clock with the CLOCK switch. A flicking orange LED will tell you it's enabled.

2. Select the memory address you want to write in with the ADDRESS (yellow) switches. A light in one of the neons in the ADDRESS panel will tell you wich address you are currently in.

3. Switch ON the WRITE (green) switch, behind the binary data switches. A red neon will turn on, telling you it's now storing data. Be aware that whatever you do now will be stored in the memory, so if you switch ON one of the bits, it will remain ON even if you switch it OFF. You can also switch the WRITE mode ON after inputing the data to avoid this.

4. Input some data using the 8 bit switches. For each bit you enable, a light will glow telling you the value of that bit. If you add the value of all the bites you enable, you will get the decimal value of the number you are storing in the memory.

5. Switch OFF the WRITE switch to finish the writting operation and switch OFF all the bit switches. You have already wrote data in the selected memory region.

6. Now, enable the READ mode by switching ON the READ (red) switch behind the 8 binary data switches. You will see in the 8 output LEDs the data you just wrote in that address, which means the memory works and the data is stored in the memory. Like in a real RAM memory!

7. Switch OFF the READ switch, and repeat the process from step 2 as many times as you want. You can also use the CLEAR (black) switch to erase all data in the memory.

At the end of the level you can take the items and all the components used in the memory, as well as the memory itself, so you can go to your moon and play around with it to learn how it works and even implement it in your own creations.

If you want to know more about RAM memories and how to implement them in LBP, check out the Wikipedia:

http://en.wikipedia.org/wiki/RAM_memory

http://en.wikipedia.org/wiki/Binary_numeral_system

I am currently working in an example application of this memory, using an adder, to make some kind of simple calculator with memory. You can also chain more memories, so you can have more than 4 addresses, but then you would have to make an external selector to select each one, and plug it into each memory.

I hope you like this level and you find this usefull in any way.
http://lbp.me/v/4yz2gr
2011-09-16 23:21:00

Author:
Unknown User


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.