215 lines
11 KiB
XML
215 lines
11 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 420" width="800" height="420">
|
|
<defs>
|
|
<style>
|
|
.board { fill: #1a472a; stroke: #0d2818; stroke-width: 2; }
|
|
.board-label { font-family: monospace; font-size: 14px; font-weight: bold; fill: white; }
|
|
.pin-label-white { font-family: monospace; font-size: 10px; fill: #e0e0e0; }
|
|
.title { font-family: sans-serif; font-size: 18px; font-weight: bold; fill: #333; }
|
|
.subtitle { font-family: sans-serif; font-size: 12px; fill: #666; }
|
|
.note { font-family: sans-serif; font-size: 11px; fill: #555; }
|
|
.pin { fill: #c9a227; stroke: #8b7355; stroke-width: 1; }
|
|
.sma { fill: #c9a227; stroke: #8b7355; stroke-width: 1; }
|
|
.usb { fill: #333; stroke: #222; stroke-width: 1; }
|
|
.chip { fill: #1a1a1a; stroke: #333; stroke-width: 1; }
|
|
.net-label { font-family: monospace; font-size: 11px; font-weight: bold; }
|
|
.net-data { fill: #1565c0; }
|
|
.net-power { fill: #c62828; }
|
|
.net-gnd { fill: #333; }
|
|
.net-box { stroke-width: 1.5; fill: white; rx: 3; }
|
|
.net-box-data { stroke: #1565c0; }
|
|
.net-box-power { stroke: #c62828; }
|
|
.net-box-gnd { stroke: #333; }
|
|
.code { font-family: monospace; font-size: 10px; fill: #1565c0; }
|
|
.table-header { font-family: sans-serif; font-size: 11px; font-weight: bold; fill: #333; }
|
|
.table-cell { font-family: monospace; font-size: 10px; fill: #444; }
|
|
</style>
|
|
</defs>
|
|
|
|
<!-- Title -->
|
|
<text x="400" y="28" text-anchor="middle" class="title">HMC472A Attenuator Controller Wiring</text>
|
|
<text x="400" y="46" text-anchor="middle" class="subtitle">Optimized Mapping: GPIO(n) = Step Bit (n-1)</text>
|
|
|
|
<!-- ESP32-S2 Mini Board -->
|
|
<rect x="60" y="70" width="160" height="220" rx="5" class="board"/>
|
|
<text x="140" y="92" text-anchor="middle" class="board-label">ESP32-S2 Mini</text>
|
|
|
|
<!-- USB-C -->
|
|
<rect x="115" y="62" width="50" height="12" rx="3" class="usb"/>
|
|
<text x="140" y="71" text-anchor="middle" style="font-size:7px;fill:#888;">USB-C</text>
|
|
|
|
<!-- ESP32 chip -->
|
|
<rect x="100" y="105" width="80" height="40" rx="2" class="chip"/>
|
|
<text x="140" y="130" text-anchor="middle" style="font-size:9px;fill:#666;">ESP32-S2</text>
|
|
|
|
<!-- S2 Mini Pins with net labels -->
|
|
<g transform="translate(65, 160)">
|
|
<!-- Left side pins -->
|
|
<rect x="0" y="0" width="20" height="9" class="pin"/>
|
|
<text x="25" y="8" class="pin-label-white">3V3</text>
|
|
|
|
<rect x="0" y="14" width="20" height="9" class="pin"/>
|
|
<text x="25" y="22" class="pin-label-white">GPIO1</text>
|
|
<rect x="70" y="11" width="42" height="14" class="net-box net-box-data"/>
|
|
<text x="91" y="22" text-anchor="middle" class="net-label net-data">D0</text>
|
|
|
|
<rect x="0" y="28" width="20" height="9" class="pin"/>
|
|
<text x="25" y="36" class="pin-label-white">GPIO2</text>
|
|
<rect x="70" y="25" width="42" height="14" class="net-box net-box-data"/>
|
|
<text x="91" y="36" text-anchor="middle" class="net-label net-data">D1</text>
|
|
|
|
<rect x="0" y="42" width="20" height="9" class="pin"/>
|
|
<text x="25" y="50" class="pin-label-white">GPIO3</text>
|
|
<rect x="70" y="39" width="42" height="14" class="net-box net-box-data"/>
|
|
<text x="91" y="50" text-anchor="middle" class="net-label net-data">D2</text>
|
|
|
|
<rect x="0" y="56" width="20" height="9" class="pin"/>
|
|
<text x="25" y="64" class="pin-label-white">GPIO4</text>
|
|
<rect x="70" y="53" width="42" height="14" class="net-box net-box-data"/>
|
|
<text x="91" y="64" text-anchor="middle" class="net-label net-data">D3</text>
|
|
|
|
<rect x="0" y="70" width="20" height="9" class="pin"/>
|
|
<text x="25" y="78" class="pin-label-white">GPIO5</text>
|
|
<rect x="70" y="67" width="42" height="14" class="net-box net-box-data"/>
|
|
<text x="91" y="78" text-anchor="middle" class="net-label net-data">D4</text>
|
|
|
|
<rect x="0" y="84" width="20" height="9" class="pin"/>
|
|
<text x="25" y="92" class="pin-label-white">GPIO6</text>
|
|
<rect x="70" y="81" width="42" height="14" class="net-box net-box-data"/>
|
|
<text x="91" y="92" text-anchor="middle" class="net-label net-data">D5</text>
|
|
|
|
<rect x="0" y="98" width="20" height="9" class="pin"/>
|
|
<text x="25" y="106" class="pin-label-white">GND</text>
|
|
<rect x="70" y="95" width="42" height="14" class="net-box net-box-gnd"/>
|
|
<text x="91" y="106" text-anchor="middle" class="net-label net-gnd">GND</text>
|
|
</g>
|
|
|
|
<!-- Right side 5V -->
|
|
<g transform="translate(175, 160)">
|
|
<rect x="0" y="0" width="20" height="9" class="pin"/>
|
|
<text x="-5" y="8" text-anchor="end" class="pin-label-white">5V</text>
|
|
<rect x="-47" y="-3" width="42" height="14" class="net-box net-box-power"/>
|
|
<text x="-26" y="8" text-anchor="middle" class="net-label net-power">+5V</text>
|
|
</g>
|
|
|
|
<!-- HMC472A Module Board -->
|
|
<rect x="520" y="70" width="220" height="220" rx="5" class="board"/>
|
|
<text x="630" y="92" text-anchor="middle" class="board-label">HMC472A Module</text>
|
|
|
|
<!-- HMC472A chip -->
|
|
<rect x="570" y="105" width="60" height="35" rx="2" class="chip"/>
|
|
<text x="600" y="127" text-anchor="middle" style="font-size:8px;fill:#666;">HMC472A</text>
|
|
|
|
<!-- SMA Connectors -->
|
|
<ellipse cx="545" cy="170" rx="12" ry="16" class="sma"/>
|
|
<text x="545" y="192" text-anchor="middle" style="font-size:8px;" class="pin-label-white">RF IN</text>
|
|
<ellipse cx="715" cy="170" rx="12" ry="16" class="sma"/>
|
|
<text x="715" y="192" text-anchor="middle" style="font-size:8px;" class="pin-label-white">RF OUT</text>
|
|
|
|
<!-- HMC472A Pins with net labels -->
|
|
<g transform="translate(595, 210)">
|
|
<rect x="0" y="0" width="20" height="9" class="pin"/>
|
|
<text x="25" y="8" class="pin-label-white">+5V</text>
|
|
<rect x="-47" y="-3" width="42" height="14" class="net-box net-box-power"/>
|
|
<text x="-26" y="8" text-anchor="middle" class="net-label net-power">+5V</text>
|
|
|
|
<rect x="0" y="14" width="20" height="9" class="pin"/>
|
|
<text x="25" y="22" class="pin-label-white">V6 (0.5dB)</text>
|
|
<rect x="-47" y="11" width="42" height="14" class="net-box net-box-data"/>
|
|
<text x="-26" y="22" text-anchor="middle" class="net-label net-data">D0</text>
|
|
|
|
<rect x="0" y="28" width="20" height="9" class="pin"/>
|
|
<text x="25" y="36" class="pin-label-white">V5 (1dB)</text>
|
|
<rect x="-47" y="25" width="42" height="14" class="net-box net-box-data"/>
|
|
<text x="-26" y="36" text-anchor="middle" class="net-label net-data">D1</text>
|
|
|
|
<rect x="0" y="42" width="20" height="9" class="pin"/>
|
|
<text x="25" y="50" class="pin-label-white">V4 (2dB)</text>
|
|
<rect x="-47" y="39" width="42" height="14" class="net-box net-box-data"/>
|
|
<text x="-26" y="50" text-anchor="middle" class="net-label net-data">D2</text>
|
|
|
|
<rect x="0" y="56" width="20" height="9" class="pin"/>
|
|
<text x="25" y="64" class="pin-label-white">V3 (4dB)</text>
|
|
<rect x="-47" y="53" width="42" height="14" class="net-box net-box-data"/>
|
|
<text x="-26" y="64" text-anchor="middle" class="net-label net-data">D3</text>
|
|
|
|
<rect x="0" y="70" width="20" height="9" class="pin"/>
|
|
<text x="25" y="78" class="pin-label-white">V2 (8dB)</text>
|
|
<rect x="-47" y="67" width="42" height="14" class="net-box net-box-data"/>
|
|
<text x="-26" y="78" text-anchor="middle" class="net-label net-data">D4</text>
|
|
|
|
<rect x="0" y="84" width="20" height="9" class="pin"/>
|
|
<text x="25" y="92" class="pin-label-white">V1 (16dB)</text>
|
|
<rect x="-47" y="81" width="42" height="14" class="net-box net-box-data"/>
|
|
<text x="-26" y="92" text-anchor="middle" class="net-label net-data">D5</text>
|
|
|
|
<rect x="0" y="98" width="20" height="9" class="pin"/>
|
|
<text x="25" y="106" class="pin-label-white">GND</text>
|
|
<rect x="-47" y="95" width="42" height="14" class="net-box net-box-gnd"/>
|
|
<text x="-26" y="106" text-anchor="middle" class="net-label net-gnd">GND</text>
|
|
</g>
|
|
|
|
<!-- Connection table in the middle -->
|
|
<rect x="260" y="120" width="200" height="180" rx="5" fill="#f5f5f5" stroke="#ddd"/>
|
|
<text x="360" y="140" text-anchor="middle" class="table-header">Net Connections</text>
|
|
|
|
<line x1="270" y1="148" x2="450" y2="148" stroke="#ccc"/>
|
|
|
|
<!-- Table headers -->
|
|
<text x="295" y="164" text-anchor="middle" class="table-header">Net</text>
|
|
<text x="360" y="164" text-anchor="middle" class="table-header">ESP32</text>
|
|
<text x="425" y="164" text-anchor="middle" class="table-header">HMC472A</text>
|
|
|
|
<line x1="270" y1="170" x2="450" y2="170" stroke="#ccc"/>
|
|
|
|
<!-- Table rows -->
|
|
<text x="295" y="186" text-anchor="middle" class="table-cell" style="fill:#1565c0;font-weight:bold;">D0</text>
|
|
<text x="360" y="186" text-anchor="middle" class="table-cell">GPIO1</text>
|
|
<text x="425" y="186" text-anchor="middle" class="table-cell">V6 (0.5dB)</text>
|
|
|
|
<text x="295" y="202" text-anchor="middle" class="table-cell" style="fill:#1565c0;font-weight:bold;">D1</text>
|
|
<text x="360" y="202" text-anchor="middle" class="table-cell">GPIO2</text>
|
|
<text x="425" y="202" text-anchor="middle" class="table-cell">V5 (1dB)</text>
|
|
|
|
<text x="295" y="218" text-anchor="middle" class="table-cell" style="fill:#1565c0;font-weight:bold;">D2</text>
|
|
<text x="360" y="218" text-anchor="middle" class="table-cell">GPIO3</text>
|
|
<text x="425" y="218" text-anchor="middle" class="table-cell">V4 (2dB)</text>
|
|
|
|
<text x="295" y="234" text-anchor="middle" class="table-cell" style="fill:#1565c0;font-weight:bold;">D3</text>
|
|
<text x="360" y="234" text-anchor="middle" class="table-cell">GPIO4</text>
|
|
<text x="425" y="234" text-anchor="middle" class="table-cell">V3 (4dB)</text>
|
|
|
|
<text x="295" y="250" text-anchor="middle" class="table-cell" style="fill:#1565c0;font-weight:bold;">D4</text>
|
|
<text x="360" y="250" text-anchor="middle" class="table-cell">GPIO5</text>
|
|
<text x="425" y="250" text-anchor="middle" class="table-cell">V2 (8dB)</text>
|
|
|
|
<text x="295" y="266" text-anchor="middle" class="table-cell" style="fill:#1565c0;font-weight:bold;">D5</text>
|
|
<text x="360" y="266" text-anchor="middle" class="table-cell">GPIO6</text>
|
|
<text x="425" y="266" text-anchor="middle" class="table-cell">V1 (16dB)</text>
|
|
|
|
<line x1="270" y1="272" x2="450" y2="272" stroke="#ccc"/>
|
|
|
|
<text x="295" y="288" text-anchor="middle" class="table-cell" style="fill:#c62828;font-weight:bold;">+5V</text>
|
|
<text x="360" y="288" text-anchor="middle" class="table-cell">5V</text>
|
|
<text x="425" y="288" text-anchor="middle" class="table-cell">+5V</text>
|
|
|
|
<text x="295" y="304" text-anchor="middle" class="table-cell" style="fill:#333;font-weight:bold;">GND</text>
|
|
<text x="360" y="304" text-anchor="middle" class="table-cell">GND</text>
|
|
<text x="425" y="304" text-anchor="middle" class="table-cell">GND</text>
|
|
|
|
<!-- Footer note -->
|
|
<text x="400" y="340" text-anchor="middle" class="note">D0-D5 = Step bits 0-5 (LSB to MSB)</text>
|
|
<text x="400" y="356" text-anchor="middle" class="note">Active-LOW: D=1 → GPIO LOW → Attenuate</text>
|
|
<text x="400" y="380" text-anchor="middle" class="code">GPIO.out_w1tc = (step & 0x3F) << 1</text>
|
|
|
|
<!-- Legend -->
|
|
<g transform="translate(280, 390)">
|
|
<rect x="0" y="0" width="30" height="12" class="net-box net-box-data"/>
|
|
<text x="35" y="10" class="note">Data</text>
|
|
<rect x="80" y="0" width="30" height="12" class="net-box net-box-power"/>
|
|
<text x="115" y="10" class="note">Power</text>
|
|
<rect x="160" y="0" width="30" height="12" class="net-box net-box-gnd"/>
|
|
<text x="195" y="10" class="note">Ground</text>
|
|
</g>
|
|
</svg>
|