# Voltage ripple on power lines after 6502 CPU is reset

I have built an Apple 1 replica which is based around a 6502 processor (R6502AP).
It functioning rather unstable (sometimes it works, sometimes it doesn't - it won't always boot properly) so I'm trying to figure out the cause.

When I look at the power line with my scope, I notice a huge voltage ripple starts right after the 6502 boots (when it's reset).

It varies from Vpp = 300 mV up to around 450 mV, so it's pretty significant.
The clock signal is a clean square wave at around 630 kHz (currently produced by an Arduino as I'm still waiting for a proper 1 MHz oscillator).
All the IC's have 100nF bypass caps close to them.

I'm pretty confident this ripple is causing the CPU to be this unstable. My question is two fold:

1) Is this ripple normal behavior? If anyone has built a 6502 computer, maybe you can tell me if this also occurs in your build.

2) If it's not normal, how can I counter it? I have tried adding electrolytic capacitors of varies values close to the CPU's power line, but it doesn't seem to help.

Update: maybe this helps - I remembered I had an Atari 2600 laying around which contains a 6507 CPU that comes from the same family as the 6502. The Atari 2600 also has ripple voltage on the CPU power line once it boots. It peaks at round Vpp = 300 mV.
So maybe it is normal?

• Where is the schematic, and where in it are the bypass caps? – PlasmaHH Jul 17 '17 at 12:20
• What is the PSU - linear or switching? – Dirk Bruere Jul 17 '17 at 12:26
• The schematic can be found here, but the bypass caps are not on there yet: github.com/DutchMaker/Apple-1-Replica/blob/master/design/… (each IC has one 100 nF cap place as close as possible to the VSS/VCC of the chip). I'm using a switching power supply – Ruud van Falier Jul 17 '17 at 12:36

This could be normal for processor, but anyway shows probable deficiencies in the design of the board and circuit. Datasheet states standard 5 V ± 5% guarantee, thus you seem to be formally within spec.

Digital electronic devices, by their design, consume power in discrete pattern, and this is the source of the noise on the power lines. You have 0.1 uF bypass caps, you may also need several electrolytic caps of ~10 mF in several locations on the board, and you have already placed them.

It would much help if you look at the board and analyze power track paths to find most loaded locations, and ensure that conductors are of appropriate width (in case of PCB).

The fact that your retro-PC does not work properly may not be related to power quality. You mention reset, not detailing what it means - after power cycle or reset button press. I must say that reset circuit is inappropriate - it consists of pull-up resistor and button only, I do not see smoothing capacitor and ideally Schmitt trigger. Thus it may simply happen that 6502 can not reset properly.

Here's relatively complex example of the reset circuit for exactly your processor. Here're more circuit diagrams. There're a lot of variations, but the idea is the same - active low (in your case with 6502) must happen steadily within minimum full 6 clock cycles (see datasheet's page 7), and then go inactive without any bouncing, and stay there for normal CPU operation.

• Thanks for your reply! I will implement a reset circuit with a Schmitt trigger to rule that out. – Ruud van Falier Jul 17 '17 at 14:22
• I have implemented the 2nd circuit (single Schmitt trigger), but unfortunately it has not solved the issue. It did clean the reset signal, so it's a win anyway :) – Ruud van Falier Jul 18 '17 at 5:42
• Then you should dig into how it does not work properly, and what triggers this "state". Several questions - if it properly starts, will it then work well? If not, what you do to it to stop functioning as intended? Hi-res picture of the board may help. – Anonymous Jul 18 '17 at 10:00