modelPartialUartPins

Electrical side of a serial device: TX output and RX input on two pins, common ground, optional VCC pin - shared by the serial devices and the radio modems

Extends from PartialSupplyPin (Supply of a peripheral: optional GND and VCC pins, internal supply rail - GND shown and ideal internal supply VOH by default).

Information

Electrical side shared by the external serial devices (Internal.Devices.PartialUartDevice) and the radio modems (Internal.Devices.PartialRadioModem): TX is a push-pull output (voltage source at the supply voltage or VOL, behind ROut; supply: Internal.Devices.PartialSupplyPin, ideal VOH or the VCC pin), RX a high-impedance input with a weak pull-up and an input capacitance, read against the halfway threshold. useTxPin unchecked removes the TX pin (a device that never transmits, such as Peripherals.UartLcd20x2): the output stage then stays unconnected, nothing else changes. The derived class assigns txLevel in its when and reacts to change(rxBoolIn).

Parameters

TypeNameDefaultDescription
Electrical › Supply
BooleanuseSupplyPin (from PartialSupplyPin)falseShow the VCC supply pin: the peripheral is supplied by the circuit (its high levels follow VCC, its consumption IQ is drawn from VCC) - unchecked: ideal internal supply VOH, nothing to wire
Modelica.Units.SI.VoltageVOH (from PartialSupplyPin)Interfaces.VOHLogic high voltage: ideal internal supply, high level of the outputs and of the pull-ups - with the VCC pin, the voltage of VCC is used instead
Modelica.Units.SI.CurrentIQ (from PartialSupplyPin)1e-3Current drawn from VCC by the peripheral (quiescent consumption, outputs excluded)
BooleanuseGroundPin (from PartialSupplyPin)trueShow the GND pin - unchecked: the peripheral is referenced to the simulation ground (0 V), nothing to wire
Electrical › Levels
Modelica.Units.SI.VoltageVOLInterfaces.VOLLogic low voltage
Modelica.Units.SI.VoltageVIHInterfaces.VIHThreshold above which an input reads high
Modelica.Units.SI.VoltageVILInterfaces.VILThreshold below which an input reads low
Electrical › Impedances
Modelica.Units.SI.ResistanceROutInterfaces.ROutOutput series resistance
Modelica.Units.SI.ResistanceRPullUp1e6Pull-up of the RX input to the supply
Electrical › Pins
BooleanuseTxPintrueShow the TX pin - unchecked for a device that never transmits (its output stage then stays unconnected)

Connectors

TypeNameDefaultDescription
Modelica.Electrical.Analog.Interfaces.NegativePinGND (from PartialSupplyPin)Common reference (ground), to be connected to the microcontroller's one - shown when useGroundPin is checked
Modelica.Electrical.Analog.Interfaces.PositivePinVCC (from PartialSupplyPin)Supply of the peripheral (e.g. 3V3(OUT) of a Raspberry Pi Pico) - shown when useSupplyPin is checked
Modelica.Electrical.Analog.Interfaces.PositivePinTXTransmission of the device - to be connected to the receive pin of the microcontroller - shown when useTxPin is checked
Modelica.Electrical.Analog.Interfaces.PositivePinRXReception of the device - to be connected to the transmit pin of the microcontroller