Niharika0104/AND-Circuit-Board

A tscircuit package created by Niharika0104.

Usage: To import and use the "@tsci/Niharika0104.XD74LS08_AND_CHIP" component: 1. Import the component: ```tsx import { useXD74LS08 } from "@tsci/Niharika0104.XD74LS08_AND_CHIP" ``` 2. Use the component in your circuit: ```tsx const U1 = useXD74LS08("U1") <U1 pcbX={0} pcbY={2} schX={8} schY={0} VCC="net.VBUS" GND="net.GND" /> ``` The component provides these pins: - A1, B1: First AND gate inputs - Y1: First AND gate output - A2, B2: Second AND gate inputs - Y2: Second AND gate output - A3, B3: Third AND gate inputs - Y3: Third AND gate output - A4, B4: Fourth AND gate inputs - Y4: Fourth AND gate output - VCC: Power supply - GND: Ground

Version
0.0.1
License
unset
Stars
0

dist/index.js

PCBPCB preview for dist/index.js
SchematicSchematic preview for dist/index.js
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _Niharika = require("@tsci/Niharika0104.XD74LS08_AND_CHIP");
var _seveibar = require("@tsci/seveibar.smd-usb-c");
var _seveibar2 = require("@tsci/seveibar.push-button");
var _core = require("@tscircuit/core");
var _default = () => {
  const U1 = (0, _Niharika.useXD74LS08)("U1");
  const USBC = (0, _seveibar.useUsbC)("USBC");
  const Button1 = (0, _seveibar2.usePushButton)("SW1");
  const Button2 = (0, _seveibar2.usePushButton)("SW2");
  const R1 = (0, _core.useResistor)("R1", {
    resistance: "1k",
    footprint: "0603"
  });
  const R2 = (0, _core.useResistor)("R2", {
    resistance: "1k",
    footprint: "0603"
  });
  const R3 = (0, _core.useResistor)("R3", {
    resistance: "1k",
    footprint: "0603"
  });
  const R4 = (0, _core.useResistor)("R4", {
    resistance: "1k",
    footprint: "0603"
  });
  const LED1 = (0, _core.useLed)("LED1", {
    footprint: "0603"
  });
  const LED2 = (0, _core.useLed)("LED2", {
    footprint: "0603"
  });
  const LED3 = (0, _core.useLed)("LED3", {
    footprint: "0603"
  });
  const LED4 = (0, _core.useLed)("LED4", {
    footprint: "0603"
  });
  return /*#__PURE__*/React.createElement("board", {
    width: "30mm",
    height: "42mm"
  }, /*#__PURE__*/React.createElement(U1, {
    pcbX: 0,
    pcbY: 2,
    schX: 8,
    schY: 0,
    VCC: "net.VBUS",
    GND: "net.GND"
  }), /*#__PURE__*/React.createElement(USBC, {
    GND1: "net.GND",
    pcbX: -8,
    pcbY: -15,
    VBUS1: "net.VBUS",
    schX: 0,
    schY: 0
  }), /*#__PURE__*/React.createElement(Button1, {
    pcbX: -6,
    pcbY: -6,
    schX: 5,
    schY: -5,
    pin3: "net.VBUS",
    pin1: "net.GND"
  }), /*#__PURE__*/React.createElement(Button2, {
    pcbX: 8,
    pcbY: -6,
    schX: 5,
    schY: 5,
    pin3: "net.VBUS",
    pin1: "net.GND"
  }), /*#__PURE__*/React.createElement(R1, {
    pcbX: -6,
    pcbY: 8,
    schX: 12,
    schY: -6,
    left: U1.Y1
  }), /*#__PURE__*/React.createElement(LED1, {
    pcbX: -6,
    pcbY: 11,
    schX: 14,
    schY: -6,
    neg: "net.GND"
  }), /*#__PURE__*/React.createElement(R2, {
    pcbX: 6,
    pcbY: 8,
    schX: 12,
    schY: -3,
    left: U1.Y2
  }), /*#__PURE__*/React.createElement(LED2, {
    pcbX: 6,
    pcbY: 11,
    schX: 14,
    schY: -3,
    neg: "net.GND"
  }), /*#__PURE__*/React.createElement(R3, {
    pcbX: -6,
    pcbY: 14,
    schX: 12,
    schY: 0,
    left: U1.Y3
  }), /*#__PURE__*/React.createElement(LED3, {
    pcbX: -6,
    pcbY: 17,
    schX: 14,
    schY: 0,
    neg: "net.GND"
  }), /*#__PURE__*/React.createElement(R4, {
    pcbX: 6,
    pcbY: 14,
    schX: 12,
    schY: 3,
    left: U1.Y4
  }), /*#__PURE__*/React.createElement(LED4, {
    pcbX: 6,
    pcbY: 17,
    schX: 14,
    schY: 3,
    neg: "net.GND"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.A1,
    to: ".SW1 > .pin2"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.B1,
    to: ".SW1 > .pin2"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.A2,
    to: ".SW2 > .pin2"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.B2,
    to: ".SW2 > .pin2"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.A3,
    to: ".SW1 > .pin2"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.B3,
    to: ".SW2 > .pin2"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.A4,
    to: "net.VBUS"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.B4,
    to: "net.VBUS"
  }), /*#__PURE__*/React.createElement("trace", {
    from: R1.pin2,
    to: LED1.pos
  }), /*#__PURE__*/React.createElement("trace", {
    from: R2.pin2,
    to: LED2.pos
  }), /*#__PURE__*/React.createElement("trace", {
    from: R3.pin2,
    to: LED3.pos
  }), /*#__PURE__*/React.createElement("trace", {
    from: R4.pin2,
    to: LED4.pos
  }));
};
exports.default = _default;