--- /dev/null
+ TRAIN SET CIRCUITRY
+ -------------------
+
+This README describes some of the circuitry connected to the train set
+PICs. It does NOT describe everything, and does NOT give pinouts.
+Refer to the relevant pinout diagrams for actual pin assignments.
+
+On the layout, PIC 0 is the `master' PIC: it controls the booster,
+serial port and other currently-implemented one-off peripherals.
+It is wired according to REVERSERS, left-hand entry for variant pins.
+
+
+BOOSTER
+=======
+
+The `booster' generates the track voltage. It includes a short
+circuit protection feature.
+
+The PIC has direct control and responsibility for
+ * Turning the track voltage on and off
+ * Switching the track polarity according to the NMRA DCC spec
+ * Detecting short circuit cutouts
+ * Retrying after a short circuit
+
+The relevant pins are
+ Booster Retry (output)
+ Booster Cutout (input)
+ Booster Flag (TBD)
+ Booster PWM (output)
+ Booster Direction (output)
+
+If both of the following conditions are true, the track will be
+supplied with power:
+ * PWM is H
+ * The short circuit cutout permits
+The polarity of the power is controlled by the Direction pin.
+(There is no need to specify which polarity is which, as this is not
+meaningful in NMRA DCC.)
+
+The short circuit cutout circuit works, and should be driven, as
+follows:
+
+During normal operation, the Retry output should be L. The track
+voltage is measured, and checked against a preset value. If it is
+lower this is considered `undervoltage'. If undervoltage persists for
+more than around 20-40us then the cutout will trigger: the power to
+the track will be disconnected (perhaps with a delay of up to 150us).
+Since the cutout prevents track power from being supplied, the
+undervoltage will persist.
+
+After a period of track undervoltage (including at startup), the
+cutout will start in the `tripped' state. The PIC may override the
+trip by setting Retry H. This will instruct the booster to (attempt
+to) supply track voltage, resetting the cutout, for up to 150us. If
+this rectifies the undervoltage (for around 150us), the cutout will
+no longer feel the need to trip (and Retry can be taken L).
+
+If turning the track power back on does not rectify the undervoltage,
+the cutout will re-trip after 150us after Retry was set H. In this
+case, the PIC must take Retry L for at least 4.7ms before another
+attempt can be made.
+
+Note that timings above are approximate, subject to variance during
+testing. All of these timings are done with R-C timing circuits which
+maintain two notions of credit (undervoltage credit and retry credit),
+so short-term glitches don't affect things and oscillations etc. are
+averaged out.
+
+Note also that during a change of the Direction the booster fails to
+supply track power for around 10us.
+
+The Flag pin was originally intended for a use connected with an
+earlier (now abandoned) scheme for short circuit detection. My
+current best guess at its best use is to control the Green segment of
+the track indicator LED.