Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Trying to use RAM... Circuit becomes Light Sensitive???!!

Status
Not open for further replies.

dag10

New Member
Hello!

I'm planning on building a small Z-80 computer on a few breadboards. Right now I'm just experimenting with RAM to make sure I understand how to use it, as well as bus drivers (or buffers, or whatever they're called).

I build a simple circuit on a breadboard. It has a write button, an 8-bit DIP switch for the address to write to/read from, a 4-bit DIP switch for the data to write, and 4 LED's to show the output data at the selectedaddress.

The RAM chip is a 2114N-2L 1Kx4 SRAM chip. Its address pins are connected to the 5v output of the 8-bit DIP switch. It's Data bus from the RAM is then connected to a buffer 74LS244 chip. The buffer's input is connected to the 4-bit DIP data, and it outputs its data onto the data bus. The data bus is then connected to a 4-bit D latch which outputs its memory to the four LED's. The write button is connected to a transistor as a NOT gate. The Output of the NOT gate is connected to the RAM's Write pin (active low), the data buffer's Output Enable Pin (active low), and to the LED's D-latch Latch Enable pin (active high).

Ok, hopefully you're still with me here. ;)

The problem is, it sorta doesn't work. I see hints of it working, but it just doesn't work. I can leave the address at 0x00000000, and set the data to 0x0100 for example, and press Write. The LEDs will then immediatly reflect 0x0100. But then, if I lightly tap the wires on the small address bus, the LEDs start lighting up randomly as eigher all on, all off, the data in the data DIP, or some other memory addresses data.

But wait! That's not all! :eek:

Here's the super duper odd part: The circuit seems to respond to LIGHT!! If I wave my hand or fingers around the address bus, the LEDs dim, and sometimes change their data as if I was touching the address bus. The same also happens if I tilt the board, or press down on its corners (away from any wires or components).

I can make a video of it if you'd like.

Here's more info about my circuit:

It's based off of Donn Stewart's Z-80 computer at Home-Built Z-80 Computer

Here are the main schematics on that site that I used:
**broken link removed** (I only used the top RAM)
**broken link removed**

Also, I only used 4 bits of data in the data bus. I left the upper four data pins unconnected on the buffer and the LED d-latch.

I also drew myself a little diagram for myself that shows the 3 ICs and how I connected the pins. I can scan that if you'd like.

Well, hopefully you're still there. If you're reading this, here's a cookie for you! (Cookie: °). It's a bit small, but I'll give you a bigger cookie if you're able to help solve this mystery. ;)

Thanks in advanced,
Drew
 
Sounds like you have bad power or bad noise rejection. It's probably not light sensitive, but your hand is changing EM fields around the board.

Make sure all unused pins are tied high or low, whatever is appropriate. Also make sure you put decoupling caps at every chips power pin.
 
Sounds like a floating node to me. Check all unused pins on all ICs as smanches suggested.
 
And as above make sure you have adequate decoupling on **all** chips on the board
 
Last edited:
Hi, thanks :)

Although I'm not new to logic and computers (I'm a programmer), I still am very new to electronics. What's decoupling? What's an easy way to achieve it on a +5v circuit?

My current power supply is this: I have a battery pack that holds four AA batteries. These plug into a hole on my breadboard and the positive connection is connected to the input of a +5v voltage regulator. The ground it connected to the regulator's ground as well as the grounds on the power bus, and the output of the regulator is connected to the +5v lines on the power bus.

The chips' +5v inputs are connected straight to this line.
 
Put a 100nF ceramic capacitor across the pins of each IC as close to the power pins as you can physically manage. (thats the decoupling)

four AA batteries will give you around 6 volts so unless you're using an ultra low dropout regulator you might find that your 5v regulator can't handle such a low overhead.
 
Last edited:
My multimeter says that the regulator is outputting +5v, so its seems fine in that sense. Is the problem you said with my regulator not related to that?

Also, I have a bunch of assorted ceramic capacitors, but I'm having trouble identifying the capacitance from looking at it. My smallest ones have a underlined 1 on it, and the larger ones say 221. Is that the capacitance in farads? I also have a pack of green ceramic capacitors that all say 104K, 100V on it.

And you're saying that I should just replace the wire connecting the +5v pin to the power bus with the capacitor connecting it to the bus? (In addition to grounding unused pins)

Thanks :)
 
Last edited:
Aha! I found the problem!

With the DIP switch for choosing the address, I didn't put resistors on its outputs that connected to ground. This caused the input on the RAM IC to become a floating input because the switch cut the connection. This then made currents in the address bus wires to respond to the electromagnetic field caused my static on my fingers.

I knew what you guys were talking about with floating inputs, but for some reason it didn't occur to me that the DIP switch created one when switched off.

I learned something today. :)
 
Good news :)

The decoupling question you asked above is fairly simple.

Every IC has a +5v and a Ground (simplifying things a bit but generally true in your case)

You ideally should connect a 100nF ceramic capacitor in parallel with the +5v and Ground on every IC you have and as close to the IC pins as possible - this is called decoupling.

From Wikipedia:

Wikipedia said:
In electronics, decoupling refers to the preventing of undesired coupling between subsystems via the power supply connections. This is commonly accomplished by connecting localized capacitors close to the power leads of integrated circuits to act as a small localized energy reservoir; these supply the circuit with current during transient, high current demand periods, preventing the voltage on the power supply rail from being pulled down by the momentary current load. See decoupling capacitor.

Lossy ferrite beads may also be used to isolate or 'island' sections of circuitry. These add a high series impedance (in contrast to the low parallel impedance added by decoupling capacitors) to the power supply rails, preventing high-frequency currents being drawn from elsewhere in the system
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top