Here is some stuff from the Bronze training.
A typical CDI module may look something like this on the inside, simplified of course:
As the flywheel goes by the armature, the magnetic lines of flux travel up through the armature and induce current flow in the primary windings. The energy is stored in the capacitor, and the diode prevents the AC current from bleeding off. When the chip tells the transistor when to close, the capacitor discharges and the current flow in the primary cuts through the secondary and fires the plug. I don't know what kind of voltages are at work in the primary, but it typically has around 200 turns of wire in it, but the secondary has like 20,000 turns so you get a step up transformer effect, so a module can develop 15k volts depending on the design. Since the capacitor stores the energy, the flywheel can roll on by the module, and the chip will decide when to fire the plug by comparing how often the flywheel comes by to a built in quartz clock, to determine RPM. It changes the timing based on the software it was programmed with when it was made.
At 12,000 rpm the plug is firing the spark plug 200 times a second, so all this is happening really fast but they tell me electrons move at the speed of light, and microprocessors can think really fast, so I guess it is all relative.
Here is the timing curve used to illustrate a typical curve for a module with a rev-limiter in it, shown by the red line. The blue line is a module with no advance. STIHL does not use an ignition rev-limiter in any saws, but they do in most all line trimmer engines.
So at cranking speed the timing is virtually nil, but as soon as the engine fires and the RPM comes up, the module advances the timing for a smooth idle, and then continually advances the timing as RPM goes up until the rev-limiter setting is reacher. Then it starts backing the timing down, which will prevent the RPM from going any higher. Early module designs just took away every other spark to limit RPM. When you look at this with a timing light on a running engine, it is a smooth curve, not angled like this picture.
This is an early module, without the full blown microprocessor that is used now. There is a little chip on the backside of the board that makes the changes. The primary is wound around the left leg of the armature, with the secondary wound around the primary. There are some plastic separators between the windings, but the primary and secondary are each one continuous piece of wire. Each is grounded to the armature, with the primary attached to the "switch", either the points or the transistor. The other end of the secondary is attached to the spark plug. The capacitor is between the legs of the armature under the circuit board, so you can't see it here. The transistor is the little black spot you can see hanging off the end of the board between the legs of the armature. The winding on the right leg is the power supply for the circuit board, and on the board is a DC regulator to make the voltage right for the board and the chip.
You can't go in and reprogram the chip (PROM: programmable read only memory) like you can on a car computer. The software is loaded when the module is made. I just hope the OEM's will come up with a reasonably priced tester that will allow us to verify the timing curve for troubleshooting purposes. About the only option now is to replace a suspect module with a known good one, which isn't all that bad for a dealer, but it would be nice to know for sure if a module has a fault.