krishnax12/usb-c-control-dial
USB-C control dial PCB with an EC11 push encoder and a 16-LED ring for volume and brightness controls. Work in progress; firmware not included and not fabrication-ready.
- Version
- 0.0.3
- License
- unset
- Stars
- 1
imports/CH552T/CH552T.tsx
import objPath from "./CH552T.obj"
import stepPath from "./CH552T.step"
import type { ChipProps } from "@tscircuit/props"
const pinLabels = {
pin1: ["P3_2"],
pin2: ["P1_4"],
pin3: ["LED_OUT"],
pin4: ["P1_6"],
pin5: ["P1_7"],
pin6: ["RST"],
pin7: ["ENC_A"],
pin8: ["ENC_B"],
pin9: ["P3_1"],
pin10: ["P3_0"],
pin11: ["ENC_SW"],
pin12: ["P3_4"],
pin13: ["P3_5"],
pin14: ["USB_DP"],
pin15: ["USB_DM"],
pin16: ["XO"],
pin17: ["XI"],
pin18: ["GND"],
pin19: ["VCC"],
pin20: ["V33"],
} as const
export const CH552T = (props: ChipProps<typeof pinLabels>) => {
return (
<chip
pinAttributes={{
pin3: { isOutput: true, isUsingPushPull: true },
pin6: { isInput: true },
pin7: { isInput: true },
pin8: { isInput: true },
pin11: { isInput: true },
pin14: { isBidirectional: true },
pin15: { isBidirectional: true },
pin18: { requiresGround: true },
pin19: {
requiresPower: true,
requiresVoltage: "5V",
shouldHaveDecouplingCapacitor: true,
},
pin20: { providesPower: true, providesVoltage: "3.3V" },
}}
pinLabels={pinLabels}
supplierPartNumbers={{
jlcpcb: ["C111367"],
}}
manufacturerPartNumber="CH552T"
footprint={
<footprint>
<smtpad
portHints={["pin1"]}
pcbX="-2.925064mm"
pcbY="-2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin2"]}
pcbX="-2.275078mm"
pcbY="-2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin3"]}
pcbX="-1.625092mm"
pcbY="-2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin4"]}
pcbX="-0.975106mm"
pcbY="-2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin5"]}
pcbX="-0.324866mm"
pcbY="-2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin6"]}
pcbX="0.32512mm"
pcbY="-2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin7"]}
pcbX="0.975106mm"
pcbY="-2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin8"]}
pcbX="1.625092mm"
pcbY="-2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin9"]}
pcbX="2.275078mm"
pcbY="-2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin10"]}
pcbX="2.925064mm"
pcbY="-2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin20"]}
pcbX="-2.925064mm"
pcbY="2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin19"]}
pcbX="-2.275078mm"
pcbY="2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin18"]}
pcbX="-1.625092mm"
pcbY="2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin17"]}
pcbX="-0.975106mm"
pcbY="2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin16"]}
pcbX="-0.324866mm"
pcbY="2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin15"]}
pcbX="0.32512mm"
pcbY="2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin14"]}
pcbX="0.975106mm"
pcbY="2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin13"]}
pcbX="1.625092mm"
pcbY="2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin12"]}
pcbX="2.275078mm"
pcbY="2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<smtpad
portHints={["pin11"]}
pcbX="2.925064mm"
pcbY="2.870962mm"
width="0.3640074mm"
height="1.7420082mm"
radius="0.1820037mm"
shape="pill"
/>
<silkscreenpath
route={[
{ x: -3.326206200000115, y: -1.7713960000000952 },
{ x: -3.326206200000115, y: 1.7713959999999815 },
{ x: 3.3262061999998878, y: 1.7713959999999815 },
{ x: 3.3262061999998878, y: -1.7713960000000952 },
{ x: -3.326206200000115, y: -1.7713960000000952 },
]}
/>
<silkscreencircle
pcbX="-2.925064mm"
pcbY="-1.019048mm"
radius="0.150114mm"
/>
<silkscreencircle
pcbX="-3.559302mm"
pcbY="-2.870962mm"
radius="0.150114mm"
/>
<silkscreentext
text="{NAME}"
pcbX="-0.1905mm"
pcbY="4.556mm"
anchorAlignment="center"
fontSize="1mm"
/>
<courtyardoutline
outline={[
{ x: -3.958400000000097, y: 3.80600000000004 },
{ x: 3.5773999999998978, y: 3.80600000000004 },
{ x: 3.5773999999998978, y: -4.009199999999964 },
{ x: -3.958400000000097, y: -4.009199999999964 },
{ x: -3.958400000000097, y: 3.80600000000004 },
]}
/>
</footprint>
}
cadModel={{
objUrl: objPath,
stepUrl: stepPath,
pcbRotationOffset: 90,
modelOriginPosition: { x: 0, y: 0.000012700000070253736, z: -0.019205 },
}}
{...props}
/>
)
}