Page 4 of 8
Re: It begins! (Wren Prototype build log)
Posted: Sat Sep 02, 2023 6:31 pm
by gfoot
That's great, it's always good when things work in the end!
I'd suggest also running a full RAM test, to check you can write and read all RAM locations without corrupting others. You could also consider running the Dormann test site, which I only started using recently, but which has already caught a few failures in my systems.
Re: It begins! (Wren Prototype build log)
Posted: Sat Sep 02, 2023 6:48 pm
by drogon
Re: It begins! (Wren Prototype build log)
Posted: Sun Sep 03, 2023 3:20 pm
by allisonlastname
Strange issue: the RAM doesn't seem to be accepting write cycles. I've checked the connections and they're all correct, so I have no idea what could be going wrong.
Re: It begins! (Wren Prototype build log)
Posted: Sun Sep 03, 2023 3:53 pm
by No True Scotsman
Is it still the same circuit as posted here?
Here's the current version that I have on the breadboard.
output.pdf
Re: It begins! (Wren Prototype build log)
Posted: Sun Sep 03, 2023 3:54 pm
by allisonlastname
Yes.
Re: It begins! (Wren Prototype build log)
Posted: Sun Sep 03, 2023 5:38 pm
by and3rson
Strange issue: the RAM doesn't seem to be accepting write cycles. I've checked the connections and they're all correct, so I have no idea what could be going wrong.
The schematic seems to have no issues to me. Maybe double-check NAND wiring (U5A & U5D)? Do you have a logic analyzer? If so - you could check if RAM's /CS & /WE are properly asserted during RAM write cycles.
EDIT: Are you using decoupling capacitors? I don't see any on your schematic nor on the breadboard. To quote BDD:
Each device should be paired with a bypass (aka decoupling) capacitor. Time and time again, we have seen unstable or DOA designs that were victims of nothing more than inadequate or non-existing bypassing. Typical practice places a 0.1µF ceramic (MLCC) capacitor so it is as physically close to the device's VCC pin as possible. Capacitor connections should be as short and direct as possible. I use 50 volt, X7R capacitors in my builds. Bypass capacitors are cheap, don't be shy about using them.

I even like to squeeze them right under the chips - it saves a lot of space and allows the traces to run under the capacitor (especially when doing PCB designs):
Just wondering - is there a reason why you're pulling /RST high? DS1813 should work just fine without it.
The pullup inside the DS1813 is weak. An external pullup makes the circuit a lot less noise-sensitive.
I actually found its weak pull-up to be a very helpful indicator that I forgot to add capacitors near power-hungry components.

In my case, ESP-01 was often triggering reset during WiFi reconnects, and this issue went away after I added an extra 10uF cap near it.
Re: It begins! (Wren Prototype build log)
Posted: Sun Sep 03, 2023 7:10 pm
by allisonlastname
The schematic seems to have no issues to me. Maybe double-check NAND wiring (U5A & U5D)? Do you have a logic analyzer? If so - you could check if RAM's /CS & /WE are properly asserted during RAM write cycles.
EDIT: Are you using decoupling capacitors? I don't see any on your schematic nor on the breadboard.
I'm single-cycling it using an arduino, and by poking the board with an LED I can see that /CE and /WE are behaving correctly. There are some decoupling caps on the board, but they might be hard to see because they're only little 100nf ceramic ones.
Re: It begins! (Wren Prototype build log)
Posted: Sun Sep 03, 2023 7:47 pm
by Paganini
When you checked the wiring, did you look at VCC and GND too? If you happen to be using those little jumpers shaped like staples it's really easy to get them off by one row and accidentally leave (e.g.) your RAM's power pin floating. This sort of thing can be frustratingly pernicious, and can be pretty tough to spot (at least by my middle-aged vision) without a magnifier of some type.
Re: It begins! (Wren Prototype build log)
Posted: Sun Sep 03, 2023 8:08 pm
by allisonlastname
There's 4.98V between Vcc and ground on the RAM chip, which is well within limits according to the datasheet.
Re: It begins! (Wren Prototype build log)
Posted: Sun Sep 03, 2023 8:58 pm
by allisonlastname
Ok, I've tested the RAM chip by false-feeding it on a separate breadboard, and no matter what I do I can't make it accept writes properly. I also tested a few others I got in the same order, and all of those exhibited the same behaviour. I find it hard to believe that all of them were dead on arrival, but it seems to be the only explanation.
Re: It begins! (Wren Prototype build log)
Posted: Sun Sep 03, 2023 9:14 pm
by GARTHWILSON
Ok, I've tested the RAM chip by false-feeding it on a separate breadboard, and no matter what I do I can't make it accept writes properly. I also tested a few others I got in the same order, and all of those exhibited the same behaviour. I find it hard to believe that all of them were dead on arrival, but it seems to be the only explanation.
These things are hard to troubleshoot at a distance. Where did you get them? I will comment that I have never gotten a defective IC from a legitimate distributor; and I've been responsible for probably millions of ICs at work. However, see the links in the second paragraph in our sticky topic at viewtopic.php?f=1&t=1953, about China's counterfeit IC market. Also, how are you handling them? Any MOS (CMOS, NMOS, PMOS, etc. silicon is vulnerable to damage from static discharge; so you should exercise adequate anti-static handling precautions when you're building. I still suspect some simple forehead-slapper error that you'll eventually find.
Re: It begins! (Wren Prototype build log)
Posted: Sun Sep 03, 2023 9:29 pm
by allisonlastname
I got them from Mouser. And yeah, it probably is a stupid error, but I can't think what. I've triple-checked all the pins and run it with false-fed signals and it still doesn't work.
Re: It begins! (Wren Prototype build log)
Posted: Sun Sep 03, 2023 10:39 pm
by Michael
Not sure what your flash programmer looks like but you might use that with minor hardware/software modifications to test your RAM chips...
Re: It begins! (Wren Prototype build log)
Posted: Sun Sep 03, 2023 11:09 pm
by GARTHWILSON
I got them from Mouser. And yeah, it probably is a stupid error, but I can't think what. I've triple-checked all the pins and run it with false-fed signals and it still doesn't work.
Mouser is definitely a legitimate distributor, so no worries there. I have no doubt that the parts were all good when they arrived at your house. After some more head-banging, you'll be telling us what you figured out, and that you got it working. In the mean time, maybe spending a few days away from it will result in your coming back to it with fresh eyes that see something you didn't catch earlier when you were only seeing what you were expecting to see, or you'll think of something you didn't earlier when you got tunnel-visioned.
Re: It begins! (Wren Prototype build log)
Posted: Mon Sep 04, 2023 4:26 am
by Dr Jefyll
no matter what I do I can't make it accept writes properly
Just a reminder that you won't know if a write was successful unless you're capable of doing a successful read. IOW, don't be too sure it's the write that's failing.
I agree with Garth. You might find some new insight after setting the problem aside for a while. (Also, do the reads and writes achieve the appropriate levels noted for reads and writes in the data sheet's Truth Table? Just checking!)
-- Jeff