Wiring Rules

One of the most confusing aspects of Virtual Breadboard to new users are the wiring rules. Because Virtual Breadboard Version 1.0 doesn't have a check for wiring it will often run a circuit that has broken the wiring rules resulting in unexpected circuit behaviour. This can be off-putting as you are uncertain as to the source of the circuit error.

When understanding the wiring model the first thing to realise is that Virtual Breadboard does not use a SPICE evaluation model. That is it doesn't resolve Voltage and Current - it only resolves Voltage. This means you cannot use electronic circuit tricks such as wired AND, you must resolve these wiring goals using special Virtual Breadboard components.

So what are the Rules? As per the User Guide there are 3 rules

1. Thou shall link only 1 link into an input pin. ( Outputs can source more than one link)

2. Thou shall link all inputs to all components

3. Thou shall use feedback components for all feedback loops

1. Thou Shall link only 1 link into an input pin.

In each evaluation cycle any one pin is either an Input or an Output. Virtual Breadboard cannot resolve more than one link driving an Input pin. Consider Example 1.VBB. In this example a LED has 4 links which are attached to a DIP4 switch array which is switching 5V from an Active DIP4 array. With any one of the DIP4 switches on you expect the LED to receive 5V and switch on. This is true for the rightmost example which is behaving as expected even though Rule 1 has been broken. The Middle example however shows how breaking Rule 1 can result in inconsistent evaluation as the LED is off even though it is clearly connected to 5V.

There are obviously many reasons to have more than one link to an input pin so Virtual Breadboard provides a special component called the JOIN component which you must use to join the multiple links into a single link. The Leftmost circuit example shows the use of the JOIN component. This circuit correctly and consistently evaluates.

An output pin on the other can can source multiple links without breaking rule 1. It is important when building Virtual Breadboard circuits to know which pins are input pins and which pins are output pins as the wiring rules are different.

Feature Component: JOIN

join2.gif (1114 bytes)

join4.gif (1265 bytes)

join8.gif (1516 bytes)

JOIN2

JOIN4

JOIN8

Use the JOIN component to merge multiple links into a single link to satisfy Rule 1 for Input Pins

Example 2

WIRERules2.gif (9194 bytes)

All Input pins require a link even for pins where open circuit is a valid state.

 

2. Thou shall link all inputs to all components

In an evaluation cycle each component waits until it knows everything about all of its inputs before it sets its output values. This means every Input pin must be linked to a voltage source. The most confusing consequence of this rule is that even components that would appear to have valid outputs for an open-circuit connection will not evaluate correctly without a link.

Virtual Breadboard resolves this conflict with the introduction of a special component - The Not Connection component or NC. The NC component is used to satisfy Rule 2 where you would normally leave the pin unconnected.

In Example 2.VBB, The pullup component is a component that expects an open-circuit connection. When it has an open-circuit at its input its value is HIGH or 5V. As this example shows, Pull-up does not correctly evaluate when it is has no input link. The three valid states for the pullup component is to be connected to HIGH, LOW or the NC component. It is not valid to leave the pin without a link as no link does not equal Open-Circuit because in VBB open-circuit is a specific state just link HIGH or LOW are specific states.

The same thing can be seen with the 4 Input OR component. VBB Logic components can accept open-circuit as an Input, however, not linked is not the same as open-circuit. When the NC component is connected to explicitly define the open-circuit connection the component evaluates correctly.

Feature Component: NC

nc.gif (959 bytes)

NC

Use the NC component to explicitly define the open-circuit state to satisfy Rule 2 where you would normally leave the pin open-circuit

Example 3

WIRERules3.gif (3876 bytes)

All Feeback Loops require Feedback components for correct evaluation.

 

 

 

3. Thou shall use feedback components for all feedback loops

Because a Virtual Breadboard component must resolve all of its inputs before it can define its outputs a component cannot function correctly if its inputs are dependant on its outputs ie that there is a feedback loop from a components outputs to its inputs.

Virtual Breadboard resolves this conflict with the introduction of the Feedback component. The feedback when placed in a component Output to Input feedback path enables circuit evaluation. One thing to note however is that the Feedback component introduces a single timestep delay back to the input. This is only important for very high frequency circuits where circuit state changes approach the a single timestep interval.

In Example 3.VBB, a Dual OR gate with its output as one of its inputs forming a feedback loop is shown. This circuit should never go LOW once it has been set HIGH. However when a Feedback component is not used in the feedback loop the circuit cannot evaluate. Where the Feedback Component is used in the feedback loop the circuit evaluates correctly.

Feature Component: FEEDBACK

feeback.gif (1030 bytes)

FEEDBACK

Use the FEEDBACK component enable feedback loops to be evaluated in Virtual Breadboard.