packagePeripherals

Components that can be connected to MCU: LED, educational display, serial (UART) devices, I2C peripherals, weighing chain

Extends from Modelica.Icons.Package (Icon for standard packages).

Information

Everything here can be placed in a schematic next to an MCU:

  • generic electrical components, wired to a GPx pin like any circuit (LED);
  • an educational peripheral driven by a logical message rather than by Modelica.Electrical.Analog (Display, wired to MCU.Display0 through the causal connectors of Interfaces) — see requirements.md, decision "Périphérique d'affichage pédagogique";
  • serial devices connected electrically to two pins (Uart*), whose behaviour comes from a command table or a Python script;
  • I2C slave peripherals on an open-drain bus (I2c*), whose behaviour comes from a Python script;
  • the weighing chain (Weighing), pure Modelica.

The base classes of the serial and I2C devices, which cannot be instantiated, live in Internal.

Contents

NameDescription
LEDLED whose icon lights up according to the current flowing through it (inspired by Arduino.Components.LED, Modelica-Arduino library)
DisplayEducational 20x2 display: received text shown on the icon (2-line scrolling) and in the log
Display4x32Large educational 4x32 text screen: each message received from machine.Display(0) is written under the last line, the screen scrolls once full
Display8x32Large educational 8x32 text screen: each message received from machine.Display(0) is written under the last line, the screen scrolls once full
UartGenericDeviceExternal serial device entirely described by its parameters, without creating a dedicated class
UartEchoDeviceSerial echo device: sends back every received byte unchanged
UartTemperatureSensorSerial temperature sensor: answers AT+TEMP with the measured value, and accepts a setpoint through SET
UartGpsModuleSerial GPS module: spontaneously pushes a position frame, without being asked
UartLcd20x2Serial 20x2 display: shows on its icon the lines received on its RX pin, with scrolling
I2cGenericDeviceI2C slave peripheral whose whole behaviour comes from a Python script, without creating a dedicated class
I2cEchoDeviceTest I2C peripheral: reads back to the master what it has just written to it
I2cGroveLcdRgbGrove - LCD RGB Backlight screen (16x2): JHD1313 display controller at 0x3E and PCA9633 backlight driver at 0x62
WeighingWeighing chain: load cell body, strain gauge bridge, HX711 converter
AnalyzersMeasuring instruments: logic analyser probe (decoded frames in a text file, VCD for PulseView)
RadioRadio link: transparent radio modems connected to the UART of the microcontroller, modulated signal drawn