The model of the LED is identified by the type specifier LED.
Syntax: |
---|
.MODEL <model name> LED [model parameters] |
Specify the simulation mode
The animated LED is a device in which the color changes when one of the following conditions occurs:
- When the current through the diode equals or exceeds the values specified in the parameter ILOW.
- When the voltage across its two terminals equals or exceeds the values specified in the parameter VLOW.
- When a high logical state is applied to the anode and a low logical state is applied to the cathode.
The parameter SIMMODE specifies the model to be used.
SIMMODE=DIODE
The device is a light emitting diode whose color appears when the current through the diode equals or exceeds the values specified in the parameter ILOW. To model LED using diodes, you must specify a value for the following model parameters:
Parameter | Description |
---|---|
SIMMODE | Specify DIODE for this parameter. |
DMODEL | Specify the SPICE model name of the diode or directly the parameters of the diode model (enclose the list of parameters in quotation marks). If the diode model is not specified, the default model is used. |
ILOW, IBRIGHT, IBURNED | These parameters allow you to specify the current levels corresponding to the different LED states. These parameters are optional. If not specified, the default values are used.
The LED is colorOFF if the level of current is less than ILOW. |
SIMMODE=RES
In certain cases may be convenient use a resistor to model the LED, in which case the color appears when the voltage across its two terminals equals or exceeds the values specified in the parameter VLOW. To model LED using resistors, you must specify a value for the following model parameters:
Parameter | Description |
---|---|
SIMMODE | Specify RES for this parameter. |
RES | Resistance. Default = 1MΩ. |
VLOW, VBRIGHT, VBURNED | These parameters allow you to specify the levels of voltage corresponding to the different LED states. These parameters are optional. If not specified, the default values are used.
The LED is colorOFF if the voltage across its two terminals is less than
VLOW. |
SIMMODE=DIGITAL
If the LED is connected directly to digital devices it may be convenient to simulate the LED in digital mode. To model the LED in digital mode, you must specify a value for the following parameters:
Parameter | Description | Default |
---|---|---|
SIMMODE | Specify DIGITAL for this parameter. | |
IN_MODE | Inputs mode. | IN |
IOMODEL | The name of an I/O model, which describes the device’s loading and driving characteristics. | DGTDEFIOMODEL |
When the LED is modeled in digital mode, the power supply nodes of the device can also be specified. Power nodes must be specified in the SPICE attributes of the component. Specify a value for the attributes: POWER_NODE and GROUND_NODE.
Specify the color
The following parameters allow you to specify the colors corresponding to the different LED states. These parameters are optional. If not specified, the default values are used.
Parameter | Description |
---|---|
COLOR | This parameter allows you to specify one of the predefined colors: RED, ORANGE, YELLOW, GREEN, BLUE, WHITE, LCD. Default = RED. |
COLOROFF | This parameter allows you to specify the color of the LED in off state. Represent a 32-bit ARGB color. |
COLORLOW | This parameter allows you to specify the color of the LED in low state. Represent a 32-bit ARGB color. |
COLORBRIGHT | This parameter allows you to specify the color of the LED in bright state. Represent a 32-bit ARGB color. |
COLORBURNED | This parameter allows you to specify the color of the LED in burned state. Represent a 32-bit ARGB color. |
GRADIENT | This parameter indicates that the color change is gradual from one state to another. Values: ON or OFF. Default = ON. |
Example
.model ledred led (simmode=diode dmodel="IS=93.2P RS=42M N=3.73 BV=4 IBV=10U CJO=2.97P VJ=.75 M=.333 TT=4.32U" ilow=1m ibright=15m iburned=100m color=red)