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 { BQ24074Subcircuit } from "@tsci/tscircuit.ti"

All current component exports end with Subcircuit.

Place a TI Subcircuit

This example places the BQ24074Subcircuit single-cell Li-ion charger on a small board.

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

export default () => (
<board width="18mm" height="14mm">
<BQ24074Subcircuit name="BQ24074" />
</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 OUT pin on the internal U1 charger chip inside the BQ24074 subcircuit:

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

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

The selector ".BQ24074 .U1 .OUT" means:

  • .BQ24074 selects the placed BQ24074 subcircuit
  • .U1 selects the internal charger chip named U1
  • .OUT selects the OUT pin on that chip

You can use the same pattern for other exported TI subcircuits and their internal parts. For example, ".BQ24074 .J1 .DC_PLUS" selects the DC_PLUS pin on the internal J1 input connector.

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