Code Description - FIGnition FUZE Hardware Reference Manual

Table of Contents

Advertisement

1.32!
0.37!
1.62!
0.34!
etc to the bottom of the screen where it says:
2.95!
0.21!
more>>
Pressing any key refreshes it with a new list which stabilizes at the bottom with:
2.98!
0.20!
more>>
Pressing keys just repeats that line on new screens. If you keep pressing
quickly, it'll eventually break out of the program.
What the numbers mean is that at the bottom of R1 the voltage is 2.98v (approximately 3v)
and that the overall current is 0.2A. This is correct according to the rules:
Current = InputVolts / (R1+R2) = 5 / (10+15) = 0.2A
PotentialVoltage = InputVolts x R2 / (R1+R2) = 5 x 15 / (10+15) = 3v.
You can create other setups using the setRes and >res commands. First define the num-
ber of resistors using setRes: e.g.
Now define each resistor value using >res. For example,
<exe>. This defines three 10Ω resistors in series. Finally, run the simulation by typing
resSim <exe>
(you'll notice in this case there is too much text to fit on a line and the last
current value is displayed on a second line). After a few pages of numbers, the values sta-
bilize to:
Volts1!
Current1! Volts2!
3.29!
0.17!
Again, the calculations are (approximately) correct:
Current = InputVolts / (R1+R2+R3) = 5 / (10+10+10) = 0.16666A
There are two potential voltages to consider, the one between R1 and R2 and the one be-
tween R2 and R3:
PDFromR2toGnd = InputVolts x (R2+R3) / (R1+R2+R3) = 5 x 15 / (10+15) = 3.33v
PDFromR3toGnd = InputVolts x R3 / (R1+R2+R3) = 5 x 15 / (10+15) = 1.666v
resSim can simulate up to 10 resistors in series, but the 16-bit calculations will become
more inaccurate when you add more resistors.

Code Description

The main part of the code is the command calcRes.
0.01!
0.06
0.00!
0.11
0.00!
0.20
0.00!
0.20
3 setRes <exe>
Current2! Volts3!
1.62!
0.17!
.
10 >res 10 >res 10 >res
Current3
0.00!
0.16
<space>

Advertisement

Table of Contents
loading

Table of Contents