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 subcircuits. Import the part you need, place it on a board, then connect other components to pins inside that subcircuit with selector strings.

Install the library in a local tscircuit project:

bun add @tsci/tscircuit.ti

Then import a component from the package:

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

Preview a TI Part

This example places an BQ24074 current, voltage, and power monitor 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, use the component name followed by the internal part and pin selector.

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

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

export default () => (
<board>
<BQ24074Subcircuit name="BQ24074" />
<resistor
name="R11"
resistance="1k"
footprint="0402"
pcbX={7}
pcbY={-3}
connections={{
pin1: ".BQ24074 .J1 .SCL",
}}
/>
</board>
)
Schematic Circuit Preview

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

  • .BQ24074 selects the placed BQ24074 subcircuit
  • .J1 selects the internal pinheader inside that subcircuit
  • .SCL selects the SCL pin on that pinheader

Use the same pattern for other exported TI parts and their internal pins.