sharpie7 / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
2.23k stars 619 forks source link

Question: Memory #926

Open lukacs-leon opened 4 months ago

lukacs-leon commented 4 months ago

How can I add a ROM or a flash memory to my circuit, or if it is not there, can it be included?

pfalstad commented 4 months ago

Use the Static Ram under "digital chips".

You can use it like a ROM. Just don't write to it. 🙂

lukacs-leon commented 4 months ago

Thanks @pfalstad

lukacs-leon commented 4 months ago

How can I write data to a static RAM?

lukacs-leon commented 4 months ago

Under the edit, content?

lukacs-leon commented 4 months ago

Képernyőfotó 2024-02-19 - 16 07 41 what's on this static RAM?

pfalstad commented 4 months ago

yes, you can load the static ram using right click, Edit, Contents.

What's your other question? I can't tell what's on the static RAM by looking at a picture of it.

lukacs-leon commented 4 months ago

what can i do with which leg?

pfalstad commented 4 months ago

The WE is "write enable". That should be low (0V) when writing, high (5V) when reading. So if you are making a ROM, that should always be 5V.

The OE is "output enable". The RAM is enabled when low (0V), disabled when high (5V).

A0-A3 are the address pins, and D0-D3 are the data pins.

lukacs-leon commented 4 months ago

Thanks

lukacs-leon commented 4 months ago

how big is this memory? how many Bytes / Kb?

lukacs-leon commented 4 months ago

does it have four serial ports or can I send four bits on a parallel port?

pfalstad commented 4 months ago

well, it's got 4 address pins and 4 data pins so it can store 2^4 = 16 4-bit words, or 8 bytes.

I guess you could call it a parallel port. The data bits are accessed in parallel.

lukacs-leon commented 4 months ago

thank you

lukacs-leon commented 4 months ago

could you give me an example of something when I enter something in advance on the edit and then it reads it and writes it to a scope with an out?