## Saturday, February 4, 2017

### More Milo...

More Milo ... this time on Tucker Carlson's show.  Again, excellent.

### I just felt...

I just felt ... the strangest thing!  I walked from our house into our barn, about 50'.  I wasn't wearing a jacket or a hat.  It's nearly 50°F out, and the sun was out.  I felt the warm sun on my head – what an odd feeling, after a couple months of winter!

### If you've ever done any electronic logic design...

If you've ever done any electronic logic design ... then most likely you already know that ROMs can be used to replace any collection of logic gates.  In effect they can be thought of as extremely simple FPLAs.  For instance, a 4kb ROM has 12 address lines and 8 data lines – which you can think of as 12 logic inputs and 8 logic outputs, and the outputs can be programmed to be any function of those inputs.

If you've actually used ROMs as logic in practice, then you've probably also run across their main drawback: glitches in the outputs when an input changes.  If you're circuit is synchronized this isn't an issue, but for pure logic without synchronization, it is potentially a major problem.

So when I ran across a homebrew computer that claimed to be built entirely with ROMs, I was really curious how this might have been done.  About a third of the way into the web page, I ran across this:
Some observations have led me to assume that when the address input changes from a value A to a value B, even if the same value X is memorized in all the addresses in T(A,B), a transient state can appear on the data outputs during a few nano seconds. This transient phenomenon can be enough to “break” the storage loop. I worked around this problem by putting a 1nf capacitor on each data output of the EPROMs used to implements registers. This solution gives no guarantee of reproducibility. It could be improved by using resistor capacitor circuits in the storage loop instead of single capacitors. Without this hack, the computer crashes after running a few tens of thousands of instructions.
Well, that's about as hacky as you can get!  Basically he's using capacitors as a sort of low-pass filter to keep the transients from affecting his ROM logic.  One would never engineer something for production like that, as the necessary values for those capacitors would be affected by all sorts of things, from ambient temperature to which production run of ROMs was being used.

Still ... having a computer built entirely from logic implemented in ROMs is pretty cool! :)

### Paradise ponders, outdoor liquid water edition...

Paradise ponders, outdoor liquid water edition...  Yesterday morning was cold and very foggy (see photos below).  It wasn't cold enough to form hoarfrost, though.  Later in the day the temperature rose above freezing – and it stayed there all last night and so far today.  This means that the snow and ice that's accumulated over the past month is starting to melt.  Even yesterday morning (when I took the photos below) most of the snow had slipped out of the trees, as you can see.  This morning there's no fog, and it's wet outside – from some light rain and (lots of!) melting snow and ice.  Our driveway has running water on it, something we haven't seen outside for quite a while now. :)

### Animated circuit simulator...

Animated circuit simulator...  At right is a screenshot I took from an animated circuit simulator I ran across yesterday.  It's called EveryCircuit, and it runs on Chrome browsers, IOS devices (iPad, iPhone), and droids.  The circuit is a simple relay driver with a diode snubber, copying something I have in real life – which let me look at the actual circuit with an oscilloscope, and compare it to the simulation.  They were remarkably close, even with the component's values at the default setting.

I go looking for simulators every once in a while, hoping to find something a bit more interactive and usable than the bog-standard SPICE simulators.  Those feel to me like I'm using hand tools to build a house – I wanted a circular saw, dammit!  I've found some interactive simulators before, including (if memory serves) an earlier version of EveryCircuit.  They were so simple as to be nearly useless.  EveryCircuit is not.  It is not as complete or as sophisticated (by far) as a decent SPICE implementation – but it is complete enough to serve for the vast majority of my purposes.  It works remarkably well on the iPad, and despite the small screen of an iPhone it's passable there as well.

There's a very active online community with vast quantities of user-contributed circuits.  I did a search for “zero crossing” and got 16 results.  The quality varied from pathetic to quite good.

It's free to try (even on IOS or Android), but the trial comes with some severe limitations.  To buy it is a one-time purchase of \$14.99, which is the least expensive commercial simulator I've ever run across.  It's now part of my electronics toolkit.  I'm sure I'll still bump up against its limitations now and then, and for all I know they'll go out of business some day – so I'll still keep a “real” SPICE implementation lying about.  But for the common little jobs I need to do, this will do just fine...