I implemented an artificial spiking cell class called Autogoad. A zip file containing its mod file plus two demonstration programs is downloadable from https://www.neuron.yale.edu/ftp/ted/neuron/autogoad.zip
Autogoad has two parameters: delay and interval. An Autogoad instance ignores inputs until t > delay. After that, it monitors inputs (events delivered by NetCons).
When monitoring inputs, it generates a single "spike" event when
t - t0 >= interval
where t0 is the time of "the most recent received event." Note that "the most recent received event" may be either a self-event or an event received from some other spike source.
The demo programs are implemented with NEUIRON's GUI.
sets up a toy network model in which Cell0 (based on the IntFire2 class) is driven by epsps that are elicited by the "afferent" spike train produced by the presynaptic neuron NS (based on the NetStim class).
Cell0 projects to AG2 (an instance of the Autogoad class). All connection delays are 1 ms.
Use NEURON to execute rig.ses. Click on the RunControl's Init & Run button to launch a simulation.
During a simulation, NS1 generates two spikes, which happen at 10 and 20 ms (raster 2 in the SpikePlot). The resulting epsps at 11 and 21 ms make Cell0 fire spikes at 21.20, 25.55, and 31.75 ms (rounded to nearest 0.01 ms) (raster 1 in the SpikePlot).
The Autogoad cell's delay parameter is 30 ms, so it ignores inputs that happen before t = 30 ms. Starting at t = 30 ms it monitors events generated by Cell0; note that those events are subjected to a 1 ms delay by the NetCon that projects Cell0's events to AG2. This means AG2 sees events at 22.20, 26.55, and 32.75 ms. It ignores the first two (because they arrive before t = 30 ms). The third event sets AG2's t0 variable to 32.75.
AG2's interval parameter is 12 ms, so if no events arrive before 44.75 ms AG will fire a spike.
Sure enough, AG2 receives no other events, so it generates spikes starting at 32.75 + 12 = 44.75 ms, and continuing at 12 ms intervals (56.75, 68.75, 80.75 etc.).
is similar to rig1.ses, except that in rig2.ses, AG2 makes an excitatory synapse onto NS1. This means that every time AG2 fires a spike, NS1 will generate 2 spikes--2 spikes because that's the number specified by NS1's "number" parameter. The first one will happen 1 ms after AG2's spike (1 ms because of the NetCon's delay) and the second one will be 10 ms after that (10 ms is NS1's interspike interval). And those two spikes from NS1 will make Cell0 fire a few more spikes,
but when Cell0 falls silent for 12 ms, AG2 will trigger NS1 to fire two more spikes. And the wave of excitation and spiking will move around the network for as long as you want to continue the simulation.