FIGnition FUZE Hardware Reference Manual page 81

Table of Contents

Advertisement

Command(s)
Code
calcRes
dup v @ over 1+ v @ -
over res @ >r r 1 >> +
r> /
over 1+ curr @
4 + 10 / -
over res @ over *
>r over v @ r> -
>r over 1+ vNew r
swap !
r> .3sf dup .3sf
2dup swap 1+ iNew !
neg swap iNew +!
Explanation
First we calculate the current* as the
voltage difference between the top
and bottom of this resistor divided by
this resistor and subtract 10% of the
charge left over from the last itera-
tion.
Then we calculate the output voltage
according to that current, this resistor
and the input voltage.
We copy the output voltage as the
voltage below this resistor.
Then we display the output voltage
and output current.
Finally, we store the new current and
subtract the current from the current
above this resistor.
[*Actually charge is being calculated,
because the simulation is done in
discrete time intervals]

Advertisement

Table of Contents
loading

Table of Contents