main
Ray Publish 0.1.0 00ae8dd 6d ago
{
  "slug": "stc8g2k32s4-36i-lqfp48",
  "version": "0.1.0",
  "type": "component",
  "description": "STC Micro Microcontrollers (MCU/MPU/SOC), LQFP-48(7x7). Pinout cross-checked by two models against the datasheet, KiCad symbol/footprint/3D.",
  "tags": [
    "component",
    "embedded processors & controllers",
    "stc8g2k32s4-36i-lqfp48",
    "factory-2.0.0",
    "extractor-text"
  ],
  "dependencies": {},
  "hero": {
    "type": "image",
    "path": "docs/hero.png"
  },
  "files": [
    "page.json",
    "README.md",
    "stc8g2k32s4-36i-lqfp48.kicad_sym",
    "stc8g2k32s4-36i-lqfp48.kicad_mod",
    "stc8g2k32s4-36i-lqfp48.glb",
    "stc8g2k32s4-36i-lqfp48.step",
    "stc8g2k32s4-36i-lqfp48.lbr",
    "docs/hero.png",
    "docs/stc8g2k32s4-36i-lqfp48-datasheet.pdf",
    "viewers/symbol.html",
    "viewers/footprint.html",
    "stc8g2k32s4-36i-lqfp48-hero.glb",
    "stc8g2k32s4-36i-lqfp48-hero.overlay.json",
    "stc8g2k32s4-36i-lqfp48-etched.glb"
  ],
  "component": {
    "mpn": "STC8G2K32S4-36I-LQFP48",
    "manufacturer": "STC Micro",
    "package": "LQFP-48(7x7)",
    "pin_count": 48,
    "category": "Embedded Processors & Controllers",
    "subcategory": "Microcontrollers (MCU/MPU/SOC)",
    "datasheet": "https://jlcpcb.com/api/file/downloadByFileSystemAccessId/8588893530941239296",
    "parts": {
      "symbol": "stc8g2k32s4-36i-lqfp48.kicad_sym",
      "footprint": "stc8g2k32s4-36i-lqfp48.kicad_mod",
      "model_3d": "stc8g2k32s4-36i-lqfp48-hero.glb",
      "model_3d_plain": "stc8g2k32s4-36i-lqfp48-etched.glb",
      "model_3d_step": "stc8g2k32s4-36i-lqfp48-etched.step",
      "model_3d_step_plain": "stc8g2k32s4-36i-lqfp48.step",
      "lbr": "stc8g2k32s4-36i-lqfp48.lbr"
    },
    "distributor_links": {
      "lcsc": "C915669"
    },
    "distributor_check": {
      "checked_at": "2026-10-20T17:43:04Z",
      "source": "Component Ocean /api/assign-pns",
      "digikey": {
        "pn": null,
        "status": "no match"
      },
      "mouser": {
        "pn": null,
        "status": "no match"
      }
    },
    "pins": [
      {
        "number": "1",
        "name": "P5.3",
        "type": "bidirectional",
        "description": "Standard GPIO P5.3 (quasi-bidirectional, push-pull, open-drain or high-impedance input mode); alternate functions are PWM53 enhanced-PWM output and TxD4_2 UART4 transmit."
      },
      {
        "number": "2",
        "name": "P0.5",
        "type": "bidirectional",
        "description": "Standard GPIO P0.5 with alternate functions PWM05 enhanced-PWM output, AD5 address/data bus, ADC13 analog input, and T3CLKO Timer3 clock output."
      },
      {
        "number": "3",
        "name": "P0.6",
        "type": "bidirectional",
        "description": "Standard GPIO P0.6 with alternate functions PWM06 output, AD6 address/data bus, ADC14 analog input, T4 Timer4 external clock input, and PWMFLT2 enhanced-PWM fault-detect input."
      },
      {
        "number": "4",
        "name": "P0.7",
        "type": "bidirectional",
        "description": "Standard GPIO P0.7 with alternate functions PWM07 output, AD7 address/data bus, T4CLKO Timer4 clock output, and PWMFLT3 enhanced-PWM fault-detect input."
      },
      {
        "number": "5",
        "name": "P1.0",
        "type": "bidirectional",
        "description": "Standard GPIO P1.0 with alternate functions PWM10 output, ADC0 analog input, CCP1 PCA capture/compare/PWM, and RxD2 UART2 receive."
      },
      {
        "number": "6",
        "name": "P1.1",
        "type": "bidirectional",
        "description": "Standard GPIO P1.1 with alternate functions PWM11 output, ADC1 analog input, CCP0 PCA capture/compare/PWM, and TxD2 UART2 transmit."
      },
      {
        "number": "7",
        "name": "P4.7",
        "type": "bidirectional",
        "description": "Standard GPIO P4.7 with alternate functions PWM47 enhanced-PWM output and TxD2_2 UART2 transmit (alternate pin)."
      },
      {
        "number": "8",
        "name": "P1.2",
        "type": "bidirectional",
        "description": "Standard GPIO P1.2 with alternate functions PWM12 output, ADC2 analog input, ECI PCA external pulse input, SS SPI slave select, and T2 Timer2 external clock input."
      },
      {
        "number": "9",
        "name": "P1.3",
        "type": "bidirectional",
        "description": "Standard GPIO P1.3 with alternate functions PWM13 output, ADC3 analog input, MOSI SPI master-out/slave-in, and T2CLKO Timer2 clock output."
      },
      {
        "number": "10",
        "name": "P1.4",
        "type": "bidirectional",
        "description": "Standard GPIO P1.4 with alternate functions PWM14 output, ADC4 analog input, MISO SPI master-in/slave-out, and SDA I2C data line."
      },
      {
        "number": "11",
        "name": "P1.5",
        "type": "bidirectional",
        "description": "Standard GPIO P1.5 with alternate functions PWM15 output, ADC5 analog input, SCLK SPI clock, and SCL I2C clock line."
      },
      {
        "number": "12",
        "name": "P1.6",
        "type": "bidirectional",
        "description": "Standard GPIO P1.6 with alternate functions PWM16 output, ADC6 analog input, RxD_3 UART1 receive, MCLKO_2 master clock output, and XTALO external crystal output."
      },
      {
        "number": "13",
        "name": "P1.7",
        "type": "bidirectional",
        "description": "Standard GPIO P1.7 with alternate functions PWM17 output, ADC7 analog input, TxD_3 UART1 transmit, and XTALI external crystal/clock input."
      },
      {
        "number": "14",
        "name": "P5.4",
        "type": "bidirectional",
        "description": "Standard GPIO P5.4 that can be set by ISP download as the active-low reset pin nRST (factory default I/O); also provides MCLKO master clock output, PWM54 output and SS_3; when used as I/O its internal 4K pull-up stays on for about 6.5 ms after power-up."
      },
      {
        "number": "15",
        "name": "Vcc",
        "type": "power_in",
        "description": "Main power supply pin (AVcc is the ADC supply on the same pin); the device operates from 1.9 V to 5.5 V."
      },
      {
        "number": "16",
        "name": "ADC_VRef+",
        "type": "input",
        "description": "ADC external reference voltage input that must be driven from an external reference of 2.4 V to MCU-VCC (floating causes leakage current); the datasheet notes it may be tied directly to VCC when low accuracy is acceptable."
      },
      {
        "number": "17",
        "name": "Gnd",
        "type": "power_in",
        "description": "Ground pin for the MCU (AGnd is the ADC ground on the same pin)."
      },
      {
        "number": "18",
        "name": "P4.0",
        "type": "bidirectional",
        "description": "Standard GPIO P4.0 with alternate functions PWM40 enhanced-PWM output and MOSI_3 SPI master-out/slave-in."
      },
      {
        "number": "19",
        "name": "P3.0",
        "type": "bidirectional",
        "description": "Standard GPIO P3.0 with alternate functions PWM30 output, RxD UART1 receive and INT4 external interrupt 4 (falling edge only); P3.0 and P3.1 are weak-pull-up quasi-bidirectional after power-up, and P3.0/P3.1/P3.2 must not all be low at power-on unless USB ISP download is intended."
      },
      {
        "number": "20",
        "name": "P3.1",
        "type": "bidirectional",
        "description": "Standard GPIO P3.1 with alternate functions PWM31 output and TxD UART1 transmit; it is quasi-bidirectional after power-up and is also used for ISP download."
      },
      {
        "number": "21",
        "name": "P3.2",
        "type": "bidirectional",
        "description": "Standard GPIO P3.2 with alternate functions PWM32 output, INT0 external interrupt 0, SCLK_4 SPI clock and SCL_4 I2C clock; it is part of the P3.0/P3.1/P3.2 power-on USB-ISP check."
      },
      {
        "number": "22",
        "name": "P3.3",
        "type": "bidirectional",
        "description": "Standard GPIO P3.3 with alternate functions PWM33 output, INT1 external interrupt 1, MISO_4 SPI master-in/slave-out and SDA_4 I2C data line."
      },
      {
        "number": "23",
        "name": "P3.4",
        "type": "bidirectional",
        "description": "Standard GPIO P3.4 with alternate functions PWM34 output, T0 Timer0 external clock input, T1CLKO Timer1 clock output, ECI_2 PCA external pulse input, MOSI_4 SPI master-out and CMPO comparator output."
      },
      {
        "number": "24",
        "name": "P5.0",
        "type": "bidirectional",
        "description": "Standard GPIO P5.0 with alternate functions PWM50 enhanced-PWM output and RxD3_2 UART3 receive (alternate pin)."
      },
      {
        "number": "25",
        "name": "P5.1",
        "type": "bidirectional",
        "description": "Standard GPIO P5.1 with alternate functions PWM52 enhanced-PWM output and TxD3_2 UART3 transmit (alternate pin)."
      },
      {
        "number": "26",
        "name": "P3.5",
        "type": "bidirectional",
        "description": "Standard GPIO P3.5 with alternate functions PWM35 output, T1 Timer1 external clock input, T0CLKO Timer0 clock output, SS_4 SPI slave select, CCP0_2 PCA channel and PWMFLT fault input."
      },
      {
        "number": "27",
        "name": "P3.6",
        "type": "bidirectional",
        "description": "Standard GPIO P3.6 with alternate functions PWM36 output, INT2 external interrupt 2 (falling edge only), RxD_2 UART1 receive, CMP- comparator negative input and CCP1_2 PCA channel."
      },
      {
        "number": "28",
        "name": "P3.7",
        "type": "bidirectional",
        "description": "Standard GPIO P3.7 with alternate functions PWM37 output, INT3 external interrupt 3 (falling edge only), TxD_2 UART1 transmit, CMP+ comparator positive input and CCP2/CCP2_2 PCA channel."
      },
      {
        "number": "29",
        "name": "P4.1",
        "type": "bidirectional",
        "description": "Standard GPIO P4.1 with alternate functions PWM41 output, MISO_3 SPI master-in/slave-out and CMPO_2 comparator output."
      },
      {
        "number": "30",
        "name": "P4.2",
        "type": "bidirectional",
        "description": "Standard GPIO P4.2 with alternate functions PWM42 output and WR external bus write strobe."
      },
      {
        "number": "31",
        "name": "P4.3",
        "type": "bidirectional",
        "description": "Standard GPIO P4.3 with alternate functions PWM43 output, RxD_4 UART4 receive and SCLK_3 SPI clock."
      },
      {
        "number": "32",
        "name": "P4.4",
        "type": "bidirectional",
        "description": "Standard GPIO P4.4 with alternate functions PWM44 output, RD external bus read strobe and TxD_4 UART4 transmit."
      },
      {
        "number": "33",
        "name": "P2.0",
        "type": "bidirectional",
        "description": "Standard GPIO P2.0 with alternate functions PWM20 output and A8 address bus."
      },
      {
        "number": "34",
        "name": "P2.1",
        "type": "bidirectional",
        "description": "Standard GPIO P2.1 with alternate functions PWM21 output and A9 address bus."
      },
      {
        "number": "35",
        "name": "P2.2",
        "type": "bidirectional",
        "description": "Standard GPIO P2.2 with alternate functions PWM22 output, A10 address bus and SS_2 SPI slave select."
      },
      {
        "number": "36",
        "name": "P2.3",
        "type": "bidirectional",
        "description": "Standard GPIO P2.3 with alternate functions PWM23 output, A11 address bus and MOSI_2 SPI master-out/slave-in."
      },
      {
        "number": "37",
        "name": "P2.4",
        "type": "bidirectional",
        "description": "Standard GPIO P2.4 with alternate functions PWM24 output, A12 address bus, ECI_3 PCA external pulse input, MISO_2 SPI and I2CSDA_2 I2C data line."
      },
      {
        "number": "38",
        "name": "P2.5",
        "type": "bidirectional",
        "description": "Standard GPIO P2.5 with alternate functions PWM25 output, A13 address bus, CCP0_3 PCA channel, SCLK_2 SPI clock and I2CSCL_2 I2C clock line."
      },
      {
        "number": "39",
        "name": "P2.6",
        "type": "bidirectional",
        "description": "Standard GPIO P2.6 with alternate functions PWM26 output, A14 address bus and CCP1_3 PCA channel."
      },
      {
        "number": "40",
        "name": "P2.7",
        "type": "bidirectional",
        "description": "Standard GPIO P2.7 with alternate functions PWM27 output, A15 address bus and CCP2_3 PCA channel."
      },
      {
        "number": "41",
        "name": "P4.5",
        "type": "bidirectional",
        "description": "Standard GPIO P4.5 with alternate functions PWM45 enhanced-PWM output and ALE address latch enable."
      },
      {
        "number": "42",
        "name": "P4.6",
        "type": "bidirectional",
        "description": "Standard GPIO P4.6 with alternate functions PWM46 enhanced-PWM output and RxD2_2 UART2 receive (alternate pin)."
      },
      {
        "number": "43",
        "name": "P0.0",
        "type": "bidirectional",
        "description": "Standard GPIO P0.0 with alternate functions PWM00 output, ADC8 analog input, AD0 address/data bus and RxD3 UART3 receive."
      },
      {
        "number": "44",
        "name": "P0.1",
        "type": "bidirectional",
        "description": "Standard GPIO P0.1 with alternate functions PWM01 output, ADC9 analog input, AD1 address/data bus and TxD3 UART3 transmit."
      },
      {
        "number": "45",
        "name": "P0.2",
        "type": "bidirectional",
        "description": "Standard GPIO P0.2 with alternate functions PWM02 output, ADC10 analog input, AD2 address/data bus and RxD4 UART4 receive."
      },
      {
        "number": "46",
        "name": "P0.3",
        "type": "bidirectional",
        "description": "Standard GPIO P0.3 with alternate functions PWM03 output, ADC11 analog input, AD3 address/data bus and TxD4 UART4 transmit."
      },
      {
        "number": "47",
        "name": "P0.4",
        "type": "bidirectional",
        "description": "Standard GPIO P0.4 with alternate functions PWM04 output, ADC12 analog input, AD4 address/data bus and T3 Timer3 external clock input."
      },
      {
        "number": "48",
        "name": "P5.2",
        "type": "bidirectional",
        "description": "Standard GPIO P5.2 with alternate functions PWM52 enhanced-PWM output and RxD4_2 UART4 receive (alternate pin)."
      }
    ],
    "provenance": {
      "extractor": "extract_pins 0.3",
      "factory_chain": {
        "factory": "2.0.0",
        "extractor": "extract_pins 0.3",
        "primary_model": "claude-haiku-5-5",
        "primary_mode": "text",
        "consensus_model": "claude-sonnet-5-5",
        "consensus": "agreed",
        "guards": "pin_guards 0.1: passed",
        "guard_notes": [
          "extractor flagged: Package mismatch: the hint says LQFP-48 (7x7), but the datasheet's LQFP48 package drawing (section 4; No pinout figure or package-specific table is printed for STC8G2K32S4 alone. The LQFP48 pinout is gi; Pages 110-111 (pin descriptions for pins 26-41) are not in the supplied text. Pin numbers 26-41 come"
        ],
        "pages_sent": 127,
        "cost_usd": 1.1031,
        "at": "2026-10-20T17:40:30"
      },
      "datasheet": {
        "url": "https://jlcpcb.com/api/file/downloadByFileSystemAccessId/8588893530941239296",
        "pages": 1240,
        "sha256": "7d5e82c9f651aa92",
        "source_tier": "lcsc"
      },
      "cad": "KiCad official (CC-BY-SA 4.0)",
      "pins": {
        "total": 48,
        "described": 48,
        "cites_pages": true,
        "refuses_to_fabricate": true
      }
    },
    "viewers": {
      "symbol": "viewers/symbol.html",
      "footprint": "viewers/footprint.html"
    },
    "models_3d": [
      {
        "file": "stc8g2k32s4-36i-lqfp48.step",
        "role": "plain",
        "up": "Z",
        "units": "mm",
        "origin": "footprint origin = pad-pattern centre",
        "seat": "z = 0",
        "extents_mm": [
          9.0,
          9.0,
          1.5
        ],
        "zmin_mm": -0.0,
        "centre_offset_mm": 0.0,
        "footprint_binding": "identity",
        "sha256": "9dea352d93177c2904afd7d7b68ea8855ce1ab691f69f8b3e13655600514b6bf",
        "checked": "2026-10-20",
        "checked_by": "factory/step_pose.py (Z-up, origin, seat, binding)"
      },
      {
        "file": "stc8g2k32s4-36i-lqfp48-etched.step",
        "role": "eda",
        "up": "Z",
        "units": "mm",
        "origin": "footprint origin = pad-pattern centre",
        "seat": "z = 0",
        "extents_mm": [
          9.0,
          9.0,
          1.5
        ],
        "zmin_mm": -0.0,
        "centre_offset_mm": 0.0,
        "footprint_binding": "identity",
        "sha256": "c93ccb494f0b0f612c48c51747f0c7c0a5c5f0f975f92ae8f20628b0ffa19210",
        "checked": "2026-10-20",
        "checked_by": "factory/step_pose.py (Z-up, origin, seat, binding)"
      }
    ]
  }
}