The interface for implementing Chips for the Java BreadBoard Simulator.
When implementing the simulate method you will have access to the useful
methods in
ChipAccess.
For the ChipModel to be recognised by the program it must be in package
chips, and can then be placed in the chips folder. If the model requires
other classes these do not have to be in the chips package but will need to
be placed relative to the parent of the chips folder.
Examples:
SN7400.java,
SN7470.java
Much of the code for the chip models can be easily copied from the above
example files.
| Method Summary | |
void |
setAccess(
jbreadboard.ChipAccess a) Sets the chip access object for access to useful methods |
void |
simulate() Invoked when input changes in simulation. |
void |
reset() Invoked when the simulation is reset. |
String |
getChipText() Returns the text to display on top of the chip. |
String |
getDescription()
Returns the description of the chip for the information pane. |
String |
getManufacturer
()Returns the name of the chip's Manufacturer. |
String |
getDiagram
()
Returns the filename for the pinout diagram. |
int |
getNumberOfPins
()
Returns the number of pins on one side of the chip |
boolean |
isWide()
Returns true if this chip is wide. |
String |
getPinType
(int pin)
Returns the type of the selected pin. |
String[] |
getDerivatives
()
Returns an array of the different chip derivatives. eg SN5400, SN54LS00,
SN54S00 |
int |
getDerivative
()
Returns the index of the selected derivative. |
String[] |
getPackages
()
Returns an array of the different chip packages available for the selected
derivative. |
int |
getPackage
()
Returns index of the selected package. |
void |
setDerivative
(int d)
Sets selected derivative index. |
void |
setPackage
(int p)
Sets selected package index |
| Method Detail |
public void setAccess(jbreadboard.ChipAccess a)
public void simulate()
public void reset()
public String getChipText()
public String getDescription()
public String getManufacturer()
public String getDiagram()
public int getNumberOfPins()
public boolean isWide()
public String getPinType(int pin)
public String[] getDerivatives()
public int getDerivative()
public String[] getPackages()
public int getPackage()
public void setDerivative(int d)
public void setPackage(int p)