Skip to content

Commit 94b3649

Browse files
authored
Merge pull request #592 from jhauga/legacy-circuit-mockups
New skill for building legacy hardware circuit mockups
2 parents 5fb41da + 0f57cee commit 94b3649

22 files changed

Lines changed: 5365 additions & 0 deletions

docs/README.skills.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Skills differ from other primitives by supporting bundled assets (scripts, code
2727
| [azure-role-selector](../skills/azure-role-selector/SKILL.md) | When user is asking for guidance for which role to assign to an identity given desired permissions, this agent helps them understand the role that will meet the requirements with least privilege access and how to apply that role. | `LICENSE.txt` |
2828
| [azure-static-web-apps](../skills/azure-static-web-apps/SKILL.md) | Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development, configuring staticwebapp.config.json, adding Azure Functions APIs to SWA, or setting up GitHub Actions CI/CD for Static Web Apps. | None |
2929
| [github-issues](../skills/github-issues/SKILL.md) | Create, update, and manage GitHub issues using MCP tools. Use this skill when users want to create bug reports, feature requests, or task issues, update existing issues, add labels/assignees/milestones, or manage issue workflows. Triggers on requests like "create an issue", "file a bug", "request a feature", "update issue X", or any GitHub issue management task. | `references/templates.md` |
30+
| [legacy-circuit-mockups](../skills/legacy-circuit-mockups/SKILL.md) | Generate breadboard circuit mockups and visual diagrams using HTML5 Canvas drawing techniques. Use when asked to create circuit layouts, visualize electronic component placements, draw breadboard diagrams, mockup 6502 builds, generate retro computer schematics, or design vintage electronics projects. Supports 555 timers, W65C02S microprocessors, 28C256 EEPROMs, W65C22 VIA chips, 7400-series logic gates, LEDs, resistors, capacitors, switches, buttons, crystals, and wires. | `references/28256-eeprom.md`<br />`references/555.md`<br />`references/6502.md`<br />`references/6522.md`<br />`references/6C62256.md`<br />`references/7400-series.md`<br />`references/assembly-compiler.md`<br />`references/assembly-language.md`<br />`references/basic-electronic-components.md`<br />`references/breadboard.md`<br />`references/common-breadboard-components.md`<br />`references/connecting-electronic-components.md`<br />`references/emulator-28256-eeprom.md`<br />`references/emulator-6502.md`<br />`references/emulator-6522.md`<br />`references/emulator-6C62256.md`<br />`references/emulator-lcd.md`<br />`references/lcd.md`<br />`references/minipro.md`<br />`references/t48eeprom-programmer.md` |
3031
| [make-skill-template](../skills/make-skill-template/SKILL.md) | Create new Agent Skills for GitHub Copilot from prompts or by duplicating this template. Use when asked to "create a skill", "make a new skill", "scaffold a skill", or when building specialized AI capabilities with bundled resources. Generates SKILL.md files with proper frontmatter, directory structure, and optional scripts/references/assets folders. | None |
3132
| [microsoft-code-reference](../skills/microsoft-code-reference/SKILL.md) | Look up Microsoft API references, find working code samples, and verify SDK code is correct. Use when working with Azure SDKs, .NET libraries, or Microsoft APIs—to find the right method, check parameters, get working examples, or troubleshoot errors. Catches hallucinated methods, wrong signatures, and deprecated patterns by querying official docs. | None |
3233
| [microsoft-docs](../skills/microsoft-docs/SKILL.md) | Query official Microsoft documentation to understand concepts, find tutorials, and learn how services work. Use for Azure, .NET, Microsoft 365, Windows, Power Platform, and all Microsoft technologies. Get accurate, current information from learn.microsoft.com and other official Microsoft websites—architecture overviews, quickstarts, configuration guides, limits, and best practices. | None |
Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
---
2+
name: legacy-circuit-mockups
3+
description: 'Generate breadboard circuit mockups and visual diagrams using HTML5 Canvas drawing techniques. Use when asked to create circuit layouts, visualize electronic component placements, draw breadboard diagrams, mockup 6502 builds, generate retro computer schematics, or design vintage electronics projects. Supports 555 timers, W65C02S microprocessors, 28C256 EEPROMs, W65C22 VIA chips, 7400-series logic gates, LEDs, resistors, capacitors, switches, buttons, crystals, and wires.'
4+
---
5+
6+
# Legacy Circuit Mockups
7+
8+
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.
9+
10+
## When to Use This Skill
11+
12+
- User asks to "create a breadboard layout" or "mockup a circuit"
13+
- User wants to visualize component placement on a breadboard
14+
- User needs a visual reference for building a 6502 computer
15+
- User asks to "draw a circuit" or "diagram electronics"
16+
- User wants to create educational electronics visuals
17+
- User mentions Ben Eater tutorials or retro computing projects
18+
- User asks to mockup 555 timer circuits or LED projects
19+
- User needs to visualize wire connections between components
20+
21+
## Prerequisites
22+
23+
- Understanding of component pinouts from bundled reference files
24+
- Knowledge of breadboard layout conventions (rows, columns, power rails)
25+
26+
## Supported Components
27+
28+
### Microprocessors & Memory
29+
30+
| Component | Pins | Description |
31+
|-----------|------|-------------|
32+
| W65C02S | 40-pin DIP | 8-bit microprocessor with 16-bit address bus |
33+
| 28C256 | 28-pin DIP | 32KB parallel EEPROM |
34+
| W65C22 | 40-pin DIP | Versatile Interface Adapter (VIA) |
35+
| 62256 | 28-pin DIP | 32KB static RAM |
36+
37+
### Logic & Timer ICs
38+
39+
| Component | Pins | Description |
40+
|-----------|------|-------------|
41+
| NE555 | 8-pin DIP | Timer IC for timing and oscillation |
42+
| 7400 | 14-pin DIP | Quad 2-input NAND gate |
43+
| 7402 | 14-pin DIP | Quad 2-input NOR gate |
44+
| 7404 | 14-pin DIP | Hex inverter (NOT gate) |
45+
| 7408 | 14-pin DIP | Quad 2-input AND gate |
46+
| 7432 | 14-pin DIP | Quad 2-input OR gate |
47+
48+
### Passive & Active Components
49+
50+
| Component | Description |
51+
|-----------|-------------|
52+
| LED | Light emitting diode (various colors) |
53+
| Resistor | Current limiting (configurable values) |
54+
| Capacitor | Filtering and timing (ceramic/electrolytic) |
55+
| Crystal | Clock oscillator |
56+
| Switch | Toggle switch (latching) |
57+
| Button | Momentary push button |
58+
| Potentiometer | Variable resistor |
59+
| Photoresistor | Light-dependent resistor |
60+
61+
### Grid System
62+
63+
```javascript
64+
// Standard breadboard grid: 20px spacing
65+
const gridSize = 20;
66+
const cellX = Math.floor(x / gridSize) * gridSize;
67+
const cellY = Math.floor(y / gridSize) * gridSize;
68+
```
69+
70+
### Component Rendering Pattern
71+
72+
```javascript
73+
// All components follow this structure:
74+
{
75+
type: 'component-type',
76+
x: gridX,
77+
y: gridY,
78+
width: componentWidth,
79+
height: componentHeight,
80+
rotation: 0, // 0, 90, 180, 270
81+
properties: { /* component-specific data */ }
82+
}
83+
```
84+
85+
### Wire Connections
86+
87+
```javascript
88+
// Wire connection format:
89+
{
90+
start: { x: startX, y: startY },
91+
end: { x: endX, y: endY },
92+
color: '#ff0000' // Wire color coding
93+
}
94+
```
95+
96+
## Step-by-Step Workflows
97+
98+
### Creating a Basic LED Circuit Mockup
99+
100+
1. Define breadboard dimensions and grid
101+
2. Place power rail connections (+5V and GND)
102+
3. Add LED component with anode/cathode orientation
103+
4. Place current-limiting resistor
104+
5. Draw wire connections between components
105+
6. Add labels and annotations
106+
107+
### Creating a 555 Timer Circuit
108+
109+
1. Place NE555 IC on breadboard (pins 1-4 left, 5-8 right)
110+
2. Connect pin 1 (GND) to ground rail
111+
3. Connect pin 8 (Vcc) to power rail
112+
4. Add timing resistors and capacitors
113+
5. Wire trigger and threshold connections
114+
6. Connect output to LED or other load
115+
116+
### Creating a 6502 Microprocessor Layout
117+
118+
1. Place W65C02S centered on breadboard
119+
2. Add 28C256 EEPROM for program storage
120+
3. Place W65C22 VIA for I/O
121+
4. Add 7400-series logic for address decoding
122+
5. Wire address bus (A0-A15)
123+
6. Wire data bus (D0-D7)
124+
7. Connect control signals (R/W, PHI2, RESB)
125+
8. Add reset button and clock crystal
126+
127+
## Component Pinout Quick Reference
128+
129+
### 555 Timer (8-pin DIP)
130+
131+
| Pin | Name | Function |
132+
|:---:|:-----|:---------|
133+
| 1 | GND | Ground (0V) |
134+
| 2 | TRIG | Trigger (< 1/3 Vcc starts timing) |
135+
| 3 | OUT | Output (source/sink 200mA) |
136+
| 4 | RESET | Active-low reset |
137+
| 5 | CTRL | Control voltage (bypass with 10nF) |
138+
| 6 | THR | Threshold (> 2/3 Vcc resets) |
139+
| 7 | DIS | Discharge (open collector) |
140+
| 8 | Vcc | Supply (+4.5V to +16V) |
141+
142+
### W65C02S (40-pin DIP) - Key Pins
143+
144+
| Pin | Name | Function |
145+
|:---:|:-----|:---------|
146+
| 8 | VDD | Power supply |
147+
| 21 | VSS | Ground |
148+
| 37 | PHI2 | System clock input |
149+
| 40 | RESB | Active-low reset |
150+
| 34 | RWB | Read/Write signal |
151+
| 9-25 | A0-A15 | Address bus |
152+
| 26-33 | D0-D7 | Data bus |
153+
154+
### 28C256 EEPROM (28-pin DIP) - Key Pins
155+
156+
| Pin | Name | Function |
157+
|:---:|:-----|:---------|
158+
| 14 | GND | Ground |
159+
| 28 | VCC | Power supply |
160+
| 20 | CE | Chip enable (active-low) |
161+
| 22 | OE | Output enable (active-low) |
162+
| 27 | WE | Write enable (active-low) |
163+
| 1-10, 21-26 | A0-A14 | Address inputs |
164+
| 11-19 | I/O0-I/O7 | Data bus |
165+
166+
## Formulas Reference
167+
168+
### Resistor Calculations
169+
170+
- **Ohm's Law:** V = I × R
171+
- **LED Current:** R = (Vcc - Vled) / Iled
172+
- **Power:** P = V × I = I² × R
173+
174+
### 555 Timer Formulas
175+
176+
**Astable Mode:**
177+
178+
- Frequency: f = 1.44 / ((R1 + 2×R2) × C)
179+
- High time: t₁ = 0.693 × (R1 + R2) × C
180+
- Low time: t₂ = 0.693 × R2 × C
181+
- Duty cycle: D = (R1 + R2) / (R1 + 2×R2) × 100%
182+
183+
**Monostable Mode:**
184+
185+
- Pulse width: T = 1.1 × R × C
186+
187+
### Capacitor Calculations
188+
189+
- Capacitive reactance: Xc = 1 / (2πfC)
190+
- Energy stored: E = ½ × C × V²
191+
192+
## Color Coding Conventions
193+
194+
### Wire Colors
195+
196+
| Color | Purpose |
197+
|-------|---------|
198+
| Red | +5V / Power |
199+
| Black | Ground |
200+
| Yellow | Clock / Timing |
201+
| Blue | Address bus |
202+
| Green | Data bus |
203+
| Orange | Control signals |
204+
| White | General purpose |
205+
206+
### LED Colors
207+
208+
| Color | Forward Voltage |
209+
|-------|-----------------|
210+
| Red | 1.8V - 2.2V |
211+
| Green | 2.0V - 2.2V |
212+
| Yellow | 2.0V - 2.2V |
213+
| Blue | 3.0V - 3.5V |
214+
| White | 3.0V - 3.5V |
215+
216+
## Build Examples
217+
218+
### Build 1 — Single LED
219+
220+
**Components:** Red LED, 220Ω resistor, jumper wires, power source
221+
222+
**Steps:**
223+
224+
1. Insert black jumper wire from power GND to row A5
225+
2. Insert red jumper wire from power +5V to row J5
226+
3. Place LED with cathode (short leg) in row aligned with GND
227+
4. Place 220Ω resistor between power and LED anode
228+
229+
### Build 2 — 555 Astable Blinker
230+
231+
**Components:** NE555, LED, resistors (10kΩ, 100kΩ), capacitor (10µF)
232+
233+
**Steps:**
234+
235+
1. Place 555 IC straddling center channel
236+
2. Connect pin 1 to GND, pin 8 to +5V
237+
3. Connect pin 4 to pin 8 (disable reset)
238+
4. Wire 10kΩ between pin 7 and +5V
239+
5. Wire 100kΩ between pins 6 and 7
240+
6. Wire 10µF between pin 6 and GND
241+
7. Connect pin 3 (output) to LED circuit
242+
243+
## Troubleshooting
244+
245+
| Issue | Solution |
246+
|-------|----------|
247+
| LED doesn't light | Check polarity (anode to +, cathode to -) |
248+
| Circuit doesn't power | Verify power rail connections |
249+
| IC not working | Check VCC and GND pin connections |
250+
| 555 not oscillating | Verify threshold/trigger capacitor wiring |
251+
| Microprocessor stuck | Check RESB is HIGH after reset pulse |
252+
253+
## References
254+
255+
Detailed component specifications are available in the bundled reference files:
256+
257+
- [555.md](references/555.md) - Complete 555 timer IC specification
258+
- [6502.md](references/6502.md) - MOS 6502 microprocessor details
259+
- [6522.md](references/6522.md) - W65C22 VIA interface adapter
260+
- [28256-eeprom.md](references/28256-eeprom.md) - AT28C256 EEPROM specification
261+
- [6C62256.md](references/6C62256.md) - 62256 SRAM details
262+
- [7400-series.md](references/7400-series.md) - TTL logic gate pinouts
263+
- [assembly-compiler.md](references/assembly-compiler.md) - Assembly compiler specification
264+
- [assembly-language.md](references/assembly-language.md) - Assembly language specification
265+
- [basic-electronic-components.md](references/basic-electronic-components.md) - Resistors, capacitors, switches
266+
- [breadboard.md](references/breadboard.md) - Breadboard specifications
267+
- [common-breadboard-components.md](references/common-breadboard-components.md) - Comprehensive component reference
268+
- [connecting-electronic-components.md](references/connecting-electronic-components.md) - Step-by-step build guides
269+
- [emulator-28256-eeprom.md](references/emulator-28256-eeprom.md) - Emulating 28256-eeprom specification
270+
- [emulator-6502.md](references/emulator-6502.md) - Emulating 6502 specification
271+
- [emulator-6522.md](references/emulator-6522.md) - Emulating 6522 specification
272+
- [emulator-6C62256.md](references/emulator-6C62256.md) - Emulating 6C62256 specification
273+
- [emulator-lcd.md](references/emulator-lcd.md) - Emulating a LCD specification
274+
- [lcd.md](references/lcd.md) - LCD display interfacing
275+
- [minipro.md](references/minipro.md) - EEPROM programmer usage
276+
- [t48eeprom-programmer.md](references/t48eeprom-programmer.md) - T48 programmer reference

0 commit comments

Comments
 (0)