13.1 Resistor Network CW121004-02.CIR * First SPICE example for PHY2028 * Lines starting with * are comments Lines starting with 'whitespace' are ignored, beware! Unrecognised/junk/invisible characters cause baffling error messages **** CIRCUIT TOPOLOGY DEFINITION SECTION * R1 is a 1 kohm resistor joining node 1 to node 2. Note that * 'K' is the 'scale factor' equal to 1000 R1 1 2 1K * Spice converts all entities in this section to lower-case * so that the above line is the same as "r1 1 2 1k". * The ground node must always be given the identifier 0 (zero) * Every spice circuit must have at least one connection to node 0 * because otherwise it is impossible to calculate the voltages. * The 'R' in 470R is not a legal scale factor and is ignored: R2 2 0 470R R3 2 3 220R R4 3 0 1.5K * VDD is the voltage source called DD. The positive node of a * voltage source is listed first (i.e. 1 in this case). * The next parameters specify that the source is DC and produces * 10V, but note that SPICE ignores the V, it is a comment * intended to make the file easier to understand. VDD 1 0 DC 12V **** CONTROL STATEMENTS SECTION .CONTROL * All commands in this section *are* case-sensitive. This means * that "print r1" is *not* equivalent to "print R1". It was therefore * unwise of me to use upper case element names above. echo "There are no commands in this file..." echo " ...except the ones used to print this message." .ENDC **** OUTPUT STATEMENTS * The last line in the file must always be: .END