Skip to main content
Importing Modules and Chips

Using the tscircuit TI Library

Overview

The @tsci/tscircuit.ti package provides ready-to-use Texas Instruments reference subcircuits for tscircuit. Each export is a reusable <subcircuit /> that bundles the TI chip together with its supporting components, connectors, and nets.

Install the library in a local tscircuit project:

bun add @tsci/tscircuit.ti

Then import the TI subcircuit you want to place:

import { INA237Subcircuit } from "@tsci/tscircuit.ti"

All current component exports end with Subcircuit.

Place a TI Subcircuit

This example places the INA237Subcircuit current, voltage, and power monitor on a small board.

import { INA237Subcircuit } from "@tsci/tscircuit.ti"

export default () => (
<board width="18mm" height="14mm">
<INA237Subcircuit name="INA237" />
</board>
)
Schematic Circuit Preview

Connect to a Pin Inside the Subcircuit

Imported TI parts are subcircuits. To connect an external component to a pin inside the subcircuit, start the selector with the placed subcircuit name, then select the internal component and pin.

In this example, R11.pin1 connects to the SCL pin on the internal J1 connector inside the INA237 subcircuit:

import { INA237Subcircuit } from "@tsci/tscircuit.ti"

export default () => (
<board width="22mm" height="16mm">
<INA237Subcircuit name="INA237" />
<resistor
name="R11"
resistance="1k"
footprint="0402"
pcbX={7}
pcbY={-3}
connections={{
pin1: ".INA237 .J1 .SCL",
}}
/>
</board>
)
Schematic Circuit Preview

The selector ".INA237 .J1 .SCL" means:

  • .INA237 selects the placed INA237 subcircuit
  • .J1 selects the internal connector named J1
  • .SCL selects the SCL pin on that connector

You can use the same pattern for other exported TI subcircuits and their internal parts. For example, ".INA237 .U1 .VS" selects the VS pin on the internal U1 chip.

If you want a deeper refresher on selector syntax, see Port and Net Selectors.

Available Exports

The package currently exports these reusable TI subcircuits:

  • BQ24074Subcircuit
  • BQ25895Subcircuit
  • BQ27441G1Subcircuit
  • CC2340R5Subcircuit
  • CC3235SFSubcircuit
  • DRV8833Subcircuit
  • DRV8876Subcircuit
  • HDC2080Subcircuit
  • HDC3020Subcircuit
  • HDC3022Subcircuit
  • INA237Subcircuit
  • MSPM0G3507Subcircuit
  • TMP1075Subcircuit
  • TPS22919Subcircuit
  • TPS62933Subcircuit
  • TPS63802Subcircuit
  • TPS7A02Subcircuit
  • TPSM82823Subcircuit

The package also exports:

  • TiSubcircuitComponents to access the full map of exported TI subcircuits
  • TiSubcircuitName as a union of the export names
  • TiSubcircuitComponent as a type for any exported TI subcircuit component