legacy-circuit-mockups

作者: github

HTML5 Canvas麵包板電路模擬圖,適用於復古運算與老式電子專案。支援40多種元件,包括W65C02S微處理器、555定時器、28C256 EEPROM、W65C22 VIA、7400系列邏輯閘,以及LED、電阻、電容等被動元件。在20像素網格系統上渲染電路,具備元件旋轉、導線顏色編碼及接腳參考表,以實現精確的佈局可視化。包含常見專案的逐步工作流程:LED電路、555...

npx skills add https://github.com/github/awesome-copilot --skill legacy-circuit-mockups

Legacy Circuit Mockups

A skill for creating breadboard circuit mockups and visual diagrams for retro computing and electronics projects. This skill leverages HTML5 Canvas drawing mechanisms to render interactive circuit layouts featuring vintage components like the 6502 microprocessor, 555 timer ICs, EEPROMs, and 7400-series logic gates.

When to Use This Skill

  • User asks to "create a breadboard layout" or "mockup a circuit"
  • User wants to visualize component placement on a breadboard
  • User needs a visual reference for building a 6502 computer
  • User asks to "draw a circuit" or "diagram electronics"
  • User wants to create educational electronics visuals
  • User mentions Ben Eater tutorials or retro computing projects
  • User asks to mockup 555 timer circuits or LED projects
  • User needs to visualize wire connections between components

Prerequisites

  • Understanding of component pinouts from bundled reference files
  • Knowledge of breadboard layout conventions (rows, columns, power rails)

Supported Components

Microprocessors & Memory

ComponentPinsDescription
W65C02S40-pin DIP8-bit microprocessor with 16-bit address bus
28C25628-pin DIP32KB parallel EEPROM
W65C2240-pin DIPVersatile Interface Adapter (VIA)
6225628-pin DIP32KB static RAM

Logic & Timer ICs

ComponentPinsDescription
NE5558-pin DIPTimer IC for timing and oscillation
740014-pin DIPQuad 2-input NAND gate
740214-pin DIPQuad 2-input NOR gate
740414-pin DIPHex inverter (NOT gate)
740814-pin DIPQuad 2-input AND gate
743214-pin DIPQuad 2-input OR gate

Passive & Active Components

ComponentDescription
LEDLight emitting diode (various colors)
ResistorCurrent limiting (configurable values)
CapacitorFiltering and timing (ceramic/electrolytic)
CrystalClock oscillator
SwitchToggle switch (latching)
ButtonMomentary push button
PotentiometerVariable resistor
PhotoresistorLight-dependent resistor

Grid System

// Standard breadboard grid: 20px spacing
const gridSize = 20;
const cellX = Math.floor(x / gridSize) * gridSize;
const cellY = Math.floor(y / gridSize) * gridSize;

Component Rendering Pattern

// All components follow this structure:
{
  type: 'component-type',
  x: gridX,
  y: gridY,
  width: componentWidth,
  height: componentHeight,
  rotation: 0,  // 0, 90, 180, 270
  properties: { /* component-specific data */ }
}

Wire Connections

// Wire connection format:
{
  start: { x: startX, y: startY },
  end: { x: endX, y: endY },
  color: '#ff0000'  // Wire color coding
}

Step-by-Step Workflows

Creating a Basic LED Circuit Mockup

  1. Define breadboard dimensions and grid
  2. Place power rail connections (+5V and GND)
  3. Add LED component with anode/cathode orientation
  4. Place current-limiting resistor
  5. Draw wire connections between components
  6. Add labels and annotations

Creating a 555 Timer Circuit

  1. Place NE555 IC on breadboard (pins 1-4 left, 5-8 right)
  2. Connect pin 1 (GND) to ground rail
  3. Connect pin 8 (Vcc) to power rail
  4. Add timing resistors and capacitors
  5. Wire trigger and threshold connections
  6. Connect output to LED or other load

Creating a 6502 Microprocessor Layout

  1. Place W65C02S centered on breadboard
  2. Add 28C256 EEPROM for program storage
  3. Place W65C22 VIA for I/O
  4. Add 7400-series logic for address decoding
  5. Wire address bus (A0-A15)
  6. Wire data bus (D0-D7)
  7. Connect control signals (R/W, PHI2, RESB)
  8. Add reset button and clock crystal

Component Pinout Quick Reference

555 Timer (8-pin DIP)

PinNameFunction
1GNDGround (0V)
2TRIGTrigger (< 1/3 Vcc starts timing)
3OUTOutput (source/sink 200mA)
4RESETActive-low reset
5CTRLControl voltage (bypass with 10nF)
6THRThreshold (> 2/3 Vcc resets)
7DISDischarge (open collector)
8VccSupply (+4.5V to +16V)

W65C02S (40-pin DIP) - Key Pins

PinNameFunction
8VDDPower supply
21VSSGround
37PHI2System clock input
40RESBActive-low reset
34RWBRead/Write signal
9-25A0-A15Address bus
26-33D0-D7Data bus

28C256 EEPROM (28-pin DIP) - Key Pins

PinNameFunction
14GNDGround
28VCCPower supply
20CEChip enable (active-low)
22OEOutput enable (active-low)
27WEWrite enable (active-low)
1-10, 21-26A0-A14Address inputs
11-19I/O0-I/O7Data bus

Formulas Reference

Resistor Calculations

  • Ohm's Law: V = I × R
  • LED Current: R = (Vcc - Vled) / Iled
  • Power: P = V × I = I² × R

555 Timer Formulas

Astable Mode:

  • Frequency: f = 1.44 / ((R1 + 2×R2) × C)
  • High time: t₁ = 0.693 × (R1 + R2) × C
  • Low time: t₂ = 0.693 × R2 × C
  • Duty cycle: D = (R1 + R2) / (R1 + 2×R2) × 100%

Monostable Mode:

  • Pulse width: T = 1.1 × R × C

Capacitor Calculations

  • Capacitive reactance: Xc = 1 / (2πfC)
  • Energy stored: E = ½ × C × V²

Color Coding Conventions

Wire Colors

ColorPurpose
Red+5V / Power
BlackGround
YellowClock / Timing
BlueAddress bus
GreenData bus
OrangeControl signals
WhiteGeneral purpose

LED Colors

ColorForward Voltage
Red1.8V - 2.2V
Green2.0V - 2.2V
Yellow2.0V - 2.2V
Blue3.0V - 3.5V
White3.0V - 3.5V

Build Examples

Build 1 — Single LED

Components: Red LED, 220Ω resistor, jumper wires, power source

Steps:

  1. Insert black jumper wire from power GND to row A5
  2. Insert red jumper wire from power +5V to row J5
  3. Place LED with cathode (short leg) in row aligned with GND
  4. Place 220Ω resistor between power and LED anode

Build 2 — 555 Astable Blinker

Components: NE555, LED, resistors (10kΩ, 100kΩ), capacitor (10µF)

Steps:

  1. Place 555 IC straddling center channel
  2. Connect pin 1 to GND, pin 8 to +5V
  3. Connect pin 4 to pin 8 (disable reset)
  4. Wire 10kΩ between pin 7 and +5V
  5. Wire 100kΩ between pins 6 and 7
  6. Wire 10µF between pin 6 and GND
  7. Connect pin 3 (output) to LED circuit

Troubleshooting

IssueSolution
LED doesn't lightCheck polarity (anode to +, cathode to -)
Circuit doesn't powerVerify power rail connections
IC not workingCheck VCC and GND pin connections
555 not oscillatingVerify threshold/trigger capacitor wiring
Microprocessor stuckCheck RESB is HIGH after reset pulse

References

Detailed component specifications are available in the bundled reference files:

來自 github 的更多技能

console-rendering
github
在 Go 中使用基於結構體標籤的控制台渲染系統的說明
official
acquire-codebase-knowledge
github
當使用者明確要求對現有程式碼庫進行映射、文件化或入門引導時,使用此技能。觸發詞如「映射此程式碼庫」、「文件化…」等提示。
official
acreadiness-assess
github
Run the AgentRC readiness assessment on the current repository and produce a static HTML dashboard at reports/index.html. Wraps `npx github:microsoft/agentrc…
official
acreadiness-generate-instructions
github
透過 AgentRC 指令命令生成量身打造的 AI 代理指令檔案。產生 .github/copilot-instructions.md(預設,建議用於 VS Code 中的 Copilot…
official
acreadiness-policy
github
幫助使用者選取、撰寫或套用 AgentRC 政策。政策可透過停用不相關的檢查、覆寫影響/等級、設定…來自訂整備度評分。
official
add-educational-comments
github
為程式碼檔案添加教育性註解,將其轉化為有效的學習資源。根據三個可設定的知識層級(初學者、中級、進階)調整解釋深度與語氣。若未提供檔案,會自動請求提供,並以編號清單對應以便快速選取。僅透過教育性註解將檔案擴充最多125%(嚴格上限:400行新註解;超過1,000行的檔案上限為300行)。保留檔案編碼、縮排風格、語法正確性及……
official
adobe-illustrator-scripting
github
使用 ExtendScript (JavaScript/JSX) 編寫、除錯及最佳化 Adobe Illustrator 自動化腳本。適用於建立或修改操控…的腳本時。
official
agent-governance
github
宣告式政策、意圖分類與稽核軌跡,用於控制AI代理工具存取與行為。可組合的治理政策定義允許/封鎖的工具、內容過濾器、速率限制與核准要求——以配置而非程式碼形式儲存。語意意圖分類在工具執行前,透過基於模式的訊號偵測危險提示(資料外洩、權限提升、提示注入)。工具層級治理裝飾器在函式層級強制執行政策……
official