gokul/wireless-calculator

A USB‑C rechargeable battery-powered controller board with MCP73871 Li‑ion charging, TPS63070 buck‑boost and LDO power regulation, ATmega328P and ESP32‑S3 control, LCD/keypad user interface, status LEDs, and UART/programming connectors.

Version
0.0.1
License
ISC
Stars
0

lib/lcd.tsx

import { Fragment } from "react";
import lcdEnvelope from "./lcd-envelope.obj";
import type { ChipProps } from "@tscircuit/props";
// DISPLAY VISIONS DOGS102-6, manufacturer drawing page 10, top view.
export const Lcd = (props: ChipProps) => (
  <chip
    {...props}
    manufacturerPartNumber="EA DOGS102N-6"
    cadModel={{
      objUrl: lcdEnvelope,
      modelOriginPosition: { x: 0, y: 0, z: 0 },
    }}
    pinAttributes={{
      pin20: { requiresGround: true },
      pin21: { requiresGround: true },
      pin22: { requiresPower: true },
      pin23: { requiresPower: true },
    }}
    pinLabels={{
      pin15: "VLCD",
      pin16: "VB1N",
      pin17: "VB0N",
      pin18: "VB0P",
      pin19: "VB1P",
      pin20: "GND1",
      pin21: "GND2",
      pin22: "VDD2",
      pin23: "VDD1",
      pin24: "MOSI",
      pin25: "SCK",
      pin26: "CD",
      pin27: "RST",
      pin28: "CS",
    }}
    footprint={
      <footprint>
        {Array.from({ length: 14 }, (_, i) => (
          <Fragment key={i}>
            <platedhole
              portHints={[`pin${28 - i}`]}
              pcbX={-16.51 + i * 2.54}
              pcbY={19.05}
              holeDiameter={0.8}
              outerDiameter={1.5}
              shape="circle"
            />
          </Fragment>
        ))}
        {[1, 2, 13, 14].map((n) => (
          <Fragment key={n}>
            <platedhole
              portHints={[`pin${n}`]}
              pcbX={-16.51 + (n - 1) * 2.54}
              pcbY={-19.05}
              holeDiameter={0.8}
              outerDiameter={1.5}
              shape="circle"
            />
          </Fragment>
        ))}
        <silkscreenrect width={39} height={39.5} />
        <courtyardrect width={40} height={40.5} />
      </footprint>
    }
  />
);