Assume C=5pF (one gate load, quite probably an underestimate), V=3V (might be 5), t = dt = 1ns (reasonable for a tp=7.5ns), L=50nH (2" of wire) in the ground lead.
Then the current spike from switching one output is around 3*5e-12/1e-9 = 15mA.
Then the voltage induced in the ground lead is 50e-9*15e-3/1e-9 = 0.75V.
So, can your circuit tolerate 0.75V spikes on the inputs, or will they cause internal logic to change state?
Don't forget that if you have more than one output changing in the same direction simultaneously, the spikes will be proportionately larger.
Thankyou for the additional detail. Some of these concepts are still a little hard for me to follow, but stepping through it as you have makes it easier to understand.
W.r.t. decoupling, ensure you have the right kinds of capacitor and that the leads are short and wide. Failure here will reduce the CPLD's PSU voltage, possibly causing internal state corruption.
Thanks. I do the best I can on a breadboard (as described). On a PCB I keep them nice and close to the IC in question, practically adjacent where possible.
Ok, cool.
Cheers for being fine with my rapid and minimal response yesterday. I had run out of time but I did still want to provide an answer to your questions. The slightly longer answer is: All of the buttons are connected to one pin CPLD each and can be read directly by the CPLD. I've got spare LEs, a handful of bits of storage, and some pins. Each resource I use takes away from something else I can do, but they are available. An all-buttons AND-gate is very, very cheap compared to what I was expecting.
So, the MAX V (in 3.3V LVTTL) needs at least 1.7V to register an IO pin as high. If you can get a pin on the CPLD to go high when all buttons are pressed, all we need is some external analog circuitry that takes (about) a second to rise from 0 to 1.7V.
This sounds a lot like an RC filter to me, and would be _a lot_ cheaper than using 555s or other chips.
Thanks for this.
There is a lot of appeal in your solution. Downsides I can see are:
- It'll take time to discharge enough to release the reset. But maybe this won't be too long, and besides, this is an emergency reset, it shouldn't happen too often.
- The desire for a 1Hz clock was to let it count a few ticks to make it take a few seconds to activate. I'd need a resistor/capacitor combo that would cover a few seconds. I'm worried I might run into similar signal integrity problems similarly to the other solutions I've used, and until I have an oscilloscope, I'm blind.
- It would dedicate one or two pins to just this solution (one pin if the output was to an NMOS that grounded the reset line). As there would now be no clock, I can't use it to solve other problems. But then again, maybe I'm better off just sticking with a specific solution. Once the MCU is up it is going to be a better candidate for clock-related tasks. Something to consider.
Many thanks for your thoughts on this.
Now, there is a slight downside to this approach. There's no "reset" of the charge in the capacitor, so if the user presses the keys for 0.5s, lets go of them for a very short time, and then press them again for 0.5s, it would count as a "1"/reset.
( It does discharge/reset though, but it takes a second or two before all the energy in the capacitor has drained )
This did initially help turn me away from this approach, but thinking about it it's *probably* not a big deal.
Maybe I can tweak the parameters a little by including a parallel resistor across the cap? If I'm guessing correctly, this would slow the charge, reduce the maximum voltage, but speed the cap discharge when not in use. I did something similar with a 1-pin hardware version solution, but I did also run into timing issues that changed day-by-day, so I'm not sure if it is a good idea.
74HC4060 oscillator/divider. The RC oscillator is two resistors and a cap. Set the oscillator frequency to 16 kHz and you'll have manageable (and cheap) component values. Runs fine at 3.3 V, consumes almost no current and costs a few cents.
Thanks. evb149 made a similar suggestion. I'm guessing the basic idea is that it is driven by a less troublesome oscillator, and I'd just take the appropriate line (probably the highest counter bit) as the signal.
Sorry about that. I wasn't very clear with my explanation. Get a blinking LED, like the one in the picture I attached. Put a resistor on the low side and put your probe between the resistor and LED. You're stuck with the frequency and duty cycle of the LED, but it's a pulse generator with two components.
Thankyou. I'm not sure this is something I will be able to use in my solution for a number of reasons, but I appreciate the creative suggestion.
....
Thankyou everyone for all of your suggestions and detail and the wealth of knowledge shared. I now have plenty of options, and my main limitations at this stage are: (i) lack of oscilloscope to properly evaluate and diagnose; (ii) concerns on the value of the feature when considered in isolation; (iii) lack of some of the mentioned components; and (iv) external factors that are not yet resolved that might make certain solutions more appealing than others due to the additional benefits of the specific solution.
At this point I am going to move on to other parts of the design that feed into this, and see what I can do about an oscilloscope and the missing parts. There should be no shortage of options when I am better placed to make this decision, thanks to all of the input in this thread.