Page 3 of 3

Re: 56k address decoding logic

Posted: Sun Dec 19, 2021 7:01 am
by BigDumbDinosaur
technifix wrote:
I've been experimenting trying to find the source of the crashing. There were some interesting developments...

Something to consider is the crashing issue may be due to building your machine on a breadboard. Aside from reactive issues related to long, curving wires, breadboards are “famous” for flaky power distribution, ground bounce, VCC sag and noise. It sounds as though your circuit design is okay, but the execution not so much. You'd probably see more consistent results with wire-wrap or a PCB.

Re: 56k address decoding logic

Posted: Sun Dec 19, 2021 3:37 pm
by Dr Jefyll
technifix wrote:
On a lark I just pulled out the LCD. Board ran for 6 hours with no issues. Remember, there is no code driving it now, it's just in the circuit connected to the 6522 but I don't make any usage of the 6522 at all. I put in a 10MHz can, and it's been running now for a couple of hours. 10MHz has never worked before.
It's hard to draw conclusions, given that the crashes are to some extent random. But "10MHz has never worked before" does catch my attention! :!: And you're saying that's made possible simply by removing an LCD that wasn't doing anything anyway?? And (to be clear) it was not attached to the CPU bus, only the port pins of a VIA?

If so, it begins to seem as if the power supply was struggling -- you need to check the voltage during actual operation. Either it's inadequate or was poorly connected, or perhaps the LCD is defective in a way that causes extra current consumption. (Does the VIA get warm, btw?)

-- Jeff

Re: 56k address decoding logic

Posted: Sun Dec 19, 2021 4:27 pm
by BigEd
One the reasons those LCDs are very fussy about their startup sequence, I believe, is that the need, and have, internal high-voltage generators to drive the display, and it takes some cycles for a charge pump to get that internal supply to spec. It's not impossible that the charge pump is quite needy, for its own supply, and not impossible that it periodically needs to fire up to get that supply back into spec. In which case there could be a periodic power demand. (Lots of speculation, there, of course!)

Re: 56k address decoding logic

Posted: Mon Dec 20, 2021 8:15 am
by technifix
Dr Jefyll wrote:
technifix wrote:
On a lark I just pulled out the LCD. Board ran for 6 hours with no issues. Remember, there is no code driving it now, it's just in the circuit connected to the 6522 but I don't make any usage of the 6522 at all. I put in a 10MHz can, and it's been running now for a couple of hours. 10MHz has never worked before.
It's hard to draw conclusions, given that the crashes are to some extent random. But "10MHz has never worked before" does catch my attention! :!: And you're saying that's made possible simply by removing an LCD that wasn't doing anything anyway?? And (to be clear) it was not attached to the CPU bus, only the port pins of a VIA?

If so, it begins to seem as if the power supply was struggling -- you need to check the voltage during actual operation. Either it's inadequate or was poorly connected, or perhaps the LCD is defective in a way that causes extra current consumption. (Does the VIA get warm, btw?)
BigEd wrote:
One the reasons those LCDs are very fussy about their startup sequence, I believe, is that the need, and have, internal high-voltage generators to drive the display, and it takes some cycles for a charge pump to get that internal supply to spec. It's not impossible that the charge pump is quite needy, for its own supply, and not impossible that it periodically needs to fire up to get that supply back into spec. In which case there could be a periodic power demand. (Lots of speculation, there, of course!)
Yes, the LCD was connected only to the 6522 and the VIA didn't get warm. My power supply is an old ATX one which can supply around 23 amps at 5V. Although come to think of it I have modifed it to use one of those little volt and ammeters from ebay. The voltage does fluctuate at startup (sometimes it'll be 5.1V, others it will be 4.8V, but the current used is always the same and the crashing happens no matter the voltage). Perhaps I should just use the 5V directly and see if the meter is causing an issue.

Steve

Re: 56k address decoding logic

Posted: Mon Dec 20, 2021 8:36 am
by BigEd
technifix wrote:
I've been experimenting trying to find the source of the crashing. There were some interesting developments.

I was running the SBC at 6MHz, and it would crash around the 10 minute mark. I switched to a 1MHz can and it crashed after an hour. Of course I thought this meant perhaps there was some bug in my program that would only manifest after however many clock cycles that would be, but I put in an 8MHz can and it ran for about 4 hours before it crashed. Must be a co-incidence.
I'm not sure how much you've said about your on-board power supply decoupling. Best practice is to have an electrolytic where power connects to the board, and a smaller bypass cap across the power terminals of each device.

But more importantly, perhaps, if you want to get to the bottom of this, is to consider your experimental design. It's not clear to me if 10 minutes is always the exact life of the machine, or an average, or a single measurement, or if it's exact or approximate. If you tabulate at least a few consecutive times to crash, that might help.

Also, the question of what the machine is doing. The simplest case is a tight loop with no interrupts. Next up might be an ordinary idle state of a monitor or interpreter. Then, a simple program such as an LED blinker. Then, something deliberately meaningful, like a RAM test which loops forever.

If, on the other hand, you are using the machine for this and that, and find it crashes at some point, it's much harder to know what the cause might be.

I still wouldn't rule out your domestic appliances (or nearby industrial users) - if you bench supply reacts to a brownout by dipping the supply rail, that's an external cause. If there's a lift (elevator) in your building, or someone doing arc welding next door, that might affect your machine.