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.cjs
PCB
Schematic
'use strict';
var core = require('@tscircuit/core');
function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
const pinLabels$2 = {
8: 'Y3',
9: 'A3',
10: 'B3',
11: 'Y4',
12: 'A4',
13: 'B4',
14: 'VCC',
7: 'GND',
6: 'Y2',
5: 'B2',
4: 'A2',
3: 'Y1',
2: 'B1',
1: 'A1'
};
const pinNames$1 = Object.values(pinLabels$2);
const XD74LS08 = props => {
return /*#__PURE__*/React.createElement("chip", _extends$2({}, props, {
cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=6b6b50c2df41487e996f6ddc22ac8c46&pn=C521139",
rotationOffset: {
x: 0,
y: 0,
z: 0
},
positionOffset: {
x: 0,
y: 0,
z: 0
}
},
pinLabels: pinLabels$2,
supplierPartNumbers: {
"jlcpcb": ["C521139"]
},
manufacturerPartNumber: "XD74LS08",
footprint: /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("smtpad", {
portHints: ['1'],
pcbX: "-3.810000000000059mm",
pcbY: "-2.733801999999855mm",
width: "0.5949949999999999mm",
height: "1.9675094mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ['2'],
pcbX: "-2.5400000000000773mm",
pcbY: "-2.733801999999855mm",
width: "0.5949949999999999mm",
height: "1.9675094mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ['3'],
pcbX: "-1.2700000000000955mm",
pcbY: "-2.733801999999855mm",
width: "0.5949949999999999mm",
height: "1.9675094mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ['4'],
pcbX: "0mm",
pcbY: "-2.733801999999855mm",
width: "0.5949949999999999mm",
height: "1.9675094mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ['5'],
pcbX: "1.2699999999999818mm",
pcbY: "-2.733801999999855mm",
width: "0.5949949999999999mm",
height: "1.9675094mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ['6'],
pcbX: "2.5399999999999636mm",
pcbY: "-2.733801999999855mm",
width: "0.5949949999999999mm",
height: "1.9675094mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ['7'],
pcbX: "3.8099999999999454mm",
pcbY: "-2.733801999999855mm",
width: "0.5949949999999999mm",
height: "1.9675094mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ['14'],
pcbX: "-3.810000000000059mm",
pcbY: "2.7338019999999688mm",
width: "0.5949949999999999mm",
height: "1.9675094mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ['13'],
pcbX: "-2.5400000000000773mm",
pcbY: "2.7338019999999688mm",
width: "0.5949949999999999mm",
height: "1.9675094mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ['12'],
pcbX: "-1.2700000000000955mm",
pcbY: "2.7338019999999688mm",
width: "0.5949949999999999mm",
height: "1.9675094mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ['11'],
pcbX: "0mm",
pcbY: "2.7338019999999688mm",
width: "0.5949949999999999mm",
height: "1.9675094mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ['10'],
pcbX: "1.2699999999999818mm",
pcbY: "2.7338019999999688mm",
width: "0.5949949999999999mm",
height: "1.9675094mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ['9'],
pcbX: "2.5399999999999636mm",
pcbY: "2.7338019999999688mm",
width: "0.5949949999999999mm",
height: "1.9675094mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ['8'],
pcbX: "3.8099999999999454mm",
pcbY: "2.7338019999999688mm",
width: "0.5949949999999999mm",
height: "1.9675094mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -4.401210399999968,
y: -1.5214091999999937
}, {
x: -4.401210399999968,
y: 1.5214092000001074
}, {
x: 4.401210400000082,
y: 1.5214092000001074
}, {
x: 4.401210400000082,
y: -1.5214091999999937
}, {
x: -4.401210399999968,
y: -1.5214091999999937
}]
}))
}));
};
const useXD74LS08 = core.createUseComponent(XD74LS08, pinNames$1);
function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
const pinLabels$1 = {
1: ["GND1", "A1"],
2: ["GND2", "B12"],
3: ["VBUS1", "A4"],
4: ["VBUS2", "B9"],
5: ["SBU2", "B8"],
6: ["CC1", "A5"],
7: ["DM2", "B7"],
8: ["DP1", "A6"],
9: ["DM1", "A7"],
10: ["DP2", "B6"],
11: ["SBU1", "A8"],
12: ["CC2", "B5"],
13: ["VBUS1", "A9"],
14: ["VBUS2", "B4"],
15: ["GND1", "A12"],
16: ["GND2", "B1"]
};
/**
* USB Type C connector (C165948)
*/
const SmdUsbC = props => {
return /*#__PURE__*/React.createElement("chip", _extends$1({}, props, {
cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=2a4bc2358b36497d9ab2a66ab6419ba3&pn=C165948",
rotationOffset: {
x: 0,
y: 0,
z: 180
},
positionOffset: {
x: 0,
y: -2.5,
z: 0
}
},
pinLabels: pinLabels$1,
supplierPartNumbers: {
jlcpcb: ["C165948"]
},
schPortArrangement: {
leftSide: {
pins: [],
direction: "top-to-bottom"
},
rightSide: {
pins: ["VBUS1", "VBUS2", "DP1", "DP2", "DM1", "DM2", "CC1", "CC2", "SBU1", "SBU2"],
direction: "top-to-bottom"
},
bottomSide: {
pins: ["GND1", "GND2"],
direction: "left-to-right"
}
},
schPinStyle: {
pin8: {
topMargin: 0.4
},
pin6: {
topMargin: 0.4
},
pin11: {
topMargin: 0.2
},
pin2: {
rightMargin: 1
}
},
manufacturerPartNumber: "TYPE-C-31-M-12",
footprint: /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("hole", {
pcbX: "-2.8999180000000706mm",
pcbY: "1.180611049999925mm",
diameter: "0.7500111999999999mm"
}), /*#__PURE__*/React.createElement("hole", {
pcbX: "2.8999180000000706mm",
pcbY: "1.180611049999925mm",
diameter: "0.7500111999999999mm"
}), /*#__PURE__*/React.createElement("platedhole", {
portHints: ["alt_2"],
pcbX: "4.32511199999999mm",
pcbY: "-2.7740863499999477mm",
outerHeight: "1.7999964mm",
outerWidth: "1.1999975999999999mm",
innerHeight: "1.3999972mm",
innerWidth: "0.7999983999999999mm",
height: "1.3999972mm",
shape: "pill"
}), /*#__PURE__*/React.createElement("platedhole", {
portHints: ["alt_1"],
pcbX: "4.32511199999999mm",
pcbY: "1.4057376499998782mm",
outerHeight: "1.9999959999999999mm",
outerWidth: "1.1999975999999999mm",
innerHeight: "1.5999968mm",
innerWidth: "0.7999983999999999mm",
height: "1.5999968mm",
shape: "pill"
}), /*#__PURE__*/React.createElement("platedhole", {
portHints: ["alt_0"],
pcbX: "-4.32511199999999mm",
pcbY: "1.4057376499998782mm",
outerHeight: "1.9999959999999999mm",
outerWidth: "1.1999975999999999mm",
innerHeight: "1.5999968mm",
innerWidth: "0.7999983999999999mm",
height: "1.5999968mm",
shape: "pill"
}), /*#__PURE__*/React.createElement("platedhole", {
portHints: ["alt_3"],
pcbX: "-4.32511199999999mm",
pcbY: "-2.7740863499999477mm",
outerHeight: "1.7999964mm",
outerWidth: "1.1999975999999999mm",
innerHeight: "1.3999972mm",
innerWidth: "0.7999983999999999mm",
height: "1.3999972mm",
shape: "pill"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["B8"],
pcbX: "-1.7500600000000759mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["A5"],
pcbX: "-1.2499339999999393mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["B7"],
pcbX: "-0.7500619999999572mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["A6"],
pcbX: "-0.2499359999999342mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["A7"],
pcbX: "0.2499359999999342mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["B6"],
pcbX: "0.7500619999999572mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["A8"],
pcbX: "1.2496799999998984mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["B5"],
pcbX: "1.7500600000000759mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["A1"],
pcbX: "-3.3500060000000076mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["B12"],
pcbX: "-3.0500319999999874mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["A4"],
pcbX: "-2.5499059999999645mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["B9"],
pcbX: "-2.249932000000058mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["B4"],
pcbX: "2.249932000000058mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["A9"],
pcbX: "2.5501600000000053mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["B1"],
pcbX: "3.050032000000101mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["A12"],
pcbX: "3.3500060000000076mm",
pcbY: "2.449087049999889mm",
width: "0.29999939999999997mm",
height: "1.2999973999999999mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -4.4689776000000165,
y: -1.40071475000002
}, {
x: -4.4689776000000165,
y: 0.4621974499998487
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 4.471009600000116,
y: -5.119096950000085
}, {
x: -4.4689776000000165,
y: -5.119096950000085
}, {
x: -4.4689776000000165,
y: -3.6377943500000356
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 4.471009600000116,
y: -1.4010703500000545
}, {
x: 4.471009600000116,
y: 0.4625530499999968
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 4.471009600000116,
y: -5.119096950000085
}, {
x: 4.471009600000116,
y: -3.6374387500002285
}]
}))
}));
};
const useUsbC = core.createUseComponent(SmdUsbC, pinLabels$1);
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
const pinLabels = {
"pin1": "pin1",
"pin2": "pin2",
"pin3": "pin3",
"pin4": "pin4"
};
const pinNames = Object.values(pinLabels);
const PushButton = props => {
return /*#__PURE__*/React.createElement("pushbutton", _extends({}, props, {
cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=6ef04b62f1e945518af209609f65fa6f&pn=C110153",
rotationOffset: {
x: 0,
y: 0,
z: 0
},
positionOffset: {
x: 0,
y: 0,
z: 3.1
}
},
pinLabels: pinLabels,
schPinSpacing: 0.75,
schPortArrangement: {
leftSide: {
direction: "top-to-bottom",
pins: [1, 3]
},
rightSide: {
direction: "bottom-to-top",
pins: [4, 2]
}
},
supplierPartNumbers: {
jlcpcb: ["C110153"]
},
footprint: /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("platedhole", {
portHints: ["4"],
pcbX: "3.2499299999998357mm",
pcbY: "-2.249932000000058mm",
outerDiameter: "1.9999959999999999mm",
holeDiameter: "1.3000228mm",
shape: "circle"
}), /*#__PURE__*/React.createElement("platedhole", {
portHints: ["2"],
pcbX: "3.2499299999998357mm",
pcbY: "2.249932000000058mm",
outerDiameter: "1.9999959999999999mm",
holeDiameter: "1.3000228mm",
shape: "circle"
}), /*#__PURE__*/React.createElement("platedhole", {
portHints: ["1"],
pcbX: "-3.2499299999999494mm",
pcbY: "2.249932000000058mm",
outerDiameter: "1.9999959999999999mm",
holeDiameter: "1.3000228mm",
shape: "circle"
}), /*#__PURE__*/React.createElement("platedhole", {
portHints: ["3"],
pcbX: "-3.2499299999999494mm",
pcbY: "-2.249932000000058mm",
outerDiameter: "1.9999959999999999mm",
holeDiameter: "1.3000228mm",
shape: "circle"
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -2.2743160000001126,
y: -2.999994000000015
}, {
x: 2.274315999999999,
y: -2.999994000000015
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -2.999994000000129,
y: 1.0999978000000965
}, {
x: -2.999994000000129,
y: -0.999998000000005
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 3.0999937999998792,
y: 1.0279888000000028
}, {
x: 3.0999937999998792,
y: -1.0999977999999828
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -1.99999600000001,
y: 2.999994000000015
}, {
x: 2.274315999999999,
y: 2.999994000000015
}]
}))
}));
};
const usePushButton = core.createUseComponent(PushButton, pinNames);
var index = () => {
const U1 = useXD74LS08("U1");
const USBC = useUsbC("USBC");
const Button1 = usePushButton("SW1");
const Button2 = usePushButton("SW2");
const R1 = core.useResistor("R1", {
resistance: "1k",
footprint: "0603"
});
const R2 = core.useResistor("R2", {
resistance: "1k",
footprint: "0603"
});
const R3 = core.useResistor("R3", {
resistance: "1k",
footprint: "0603"
});
const R4 = core.useResistor("R4", {
resistance: "1k",
footprint: "0603"
});
const LED1 = core.useLed("LED1", {
footprint: "0603"
});
const LED2 = core.useLed("LED2", {
footprint: "0603"
});
const LED3 = core.useLed("LED3", {
footprint: "0603"
});
const LED4 = 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
}));
};
module.exports = index;