Dataset Viewer
Auto-converted to Parquet Duplicate
messages
listlengths
2
2
[ { "role": "user", "content": "For HUSB238 USB PD controller, what is the exact I2C slave address and basic read operation?" }, { "role": "assistant", "content": "HUSB238 I2C slave address is 0x08. Basic read: Wire.beginTransmission(0x08); Wire.write(0x00); Wire.endTransmission(); Wire.requestFro...
[ { "role": "user", "content": "For HUSB238, my PD_STATUS0 shows 0x00 after cable attach - what's the debug checklist?" }, { "role": "assistant", "content": "Checklist: 1) 5.1kΩ CC resistors on CC1/CC2, 2) 4.7kΩ I2C pull-ups, 3) 100nF decoupling within 2mm, 4) cable orientation (flip cable), 5) wa...
[ { "role": "user", "content": "For HUSB238, show me exact Arduino code to request 20V/3A from MacBook charger" }, { "role": "assistant", "content": "Wire.beginTransmission(0x08); Wire.write(0x08); Wire.write(0xA0); Wire.endTransmission(); delay(50); Wire.beginTransmission(0x08); Wire.write(0x09);...
[ { "role": "user", "content": "For HUSB238, what are the mandatory external components for any USB-C charger?" }, { "role": "assistant", "content": "Essential BOM: 4.7kΩ pull-ups on SDA/SCL to 3.3V, 5.1kΩ pull-downs on CC1/CC2 to GND, 100nF ceramic cap between VCC and GND within 2mm. Total cost u...
[ { "role": "user", "content": "For HUSB238, how do I detect 100W vs phone charger capability?" }, { "role": "assistant", "content": "Read SRC_PDO_20V (0x07): if bit 7=1 AND bits 3:0 >= 1101 (4A) = 100W capable. Read SRC_PDO_5V (0x02): if bit 7=1 AND bits 3:0 <= 0010 (1A) = phone charger only. Com...
[ { "role": "user", "content": "For HUSB238, my board gets hot at 100W - minimum thermal fix?" }, { "role": "assistant", "content": "Add 25mm² copper pour under chip with 4 thermal vias (0.3mm drill) to ground plane. No heatsink needed - handles 100W continuous with 40°C temperature rise" } ]
[ { "role": "user", "content": "For HUSB238, decode PD_STATUS0 value 0x35 exactly" }, { "role": "assistant", "content": "0x35 = 12V/1.75A. Bits 7:4=0011 (12V), bits 3:0=0101 (1.75A). Established PD contract is 12V at 1.75A - 21W total power delivery" } ]
[ { "role": "user", "content": "For HUSB238, give me bulletproof I2C read function that never fails" }, { "role": "assistant", "content": "bool readRegister(uint8_t reg, uint8_t &value) { Wire.beginTransmission(0x08); Wire.write(reg); if (Wire.endTransmission() != 0) return false; Wire.requestFrom...
[ { "role": "user", "content": "For HUSB238, how do I implement automatic highest power selection?" }, { "role": "assistant", "content": "uint8_t best_voltage = 0; uint8_t best_current = 0; for (uint8_t reg = 0x07; reg >= 0x02; reg--) { uint8_t val; if (readRegister(reg, val) && (val & 0x80)) { be...
[ { "role": "user", "content": "For HUSB238, my 20V/5A request fails but 9V/3A works - why?" }, { "role": "assistant", "content": "Source limits 20V to 3A max - read SRC_PDO_20V (0x07) shows bits 3:0 < 1111 (5A). Try 20V/3A (SRC_PDO=0xA0) instead. Many 100W chargers derate 20V to 60W for temperatu...
[ { "role": "user", "content": "For HUSB238, what's the exact capacitor placement for 5V VCC?" }, { "role": "assistant", "content": "100nF X7R ceramic (0603) within 2mm of VCC pin + 4.7μF tantalum within 10mm. Total cost $0.15. X7R temp stable to 125°C, don't use electrolytic for 100nF due to ESR"...
[ { "role": "user", "content": "For HUSB238, how do I implement cable unplug detection?" }, { "role": "assistant", "content": "Poll 0x01 every 100ms: if bit 6 changes 1→0, cable unplugged. Add 50ms debounce. Immediately write 0x10 to 0x09 (hard reset) and turn off external MOSFET for safety" } ]
[ { "role": "user", "content": "For HUSB238, show me exact code to identify charger brands" }, { "role": "assistant", "content": "Apple: registers 0x02-0x07 show 0x8A pattern, Samsung: 0x8A,0x8A,0x8A,0x8A,0x8A, Dell: 0x8F,0x8F,0x8F,0x8F,0x8F,0x8F. Map register patterns to human-readable charger id...
[ { "role": "user", "content": "For HUSB238, how do I detect counterfeit USB-C cables?" }, { "role": "assistant", "content": "Counterfeit cables: only 5V capability (0x02=0x80-0x8F), missing 9V/12V/15V/20V registers. Certified cables show 4-6 voltage levels. Test with 100W source - counterfeit lim...
[ { "role": "user", "content": "For HUSB238, what's the exact thermal design for 100W operation?" }, { "role": "assistant", "content": "25mm² copper pour under chip, 4 thermal vias to ground plane, 4-layer PCB minimum. No heatsink needed - chip temperature rise <40°C at 25°C ambient with proper co...
[ { "role": "user", "content": "For HUSB238, give me exact failure recovery sequence" }, { "role": "assistant", "content": "Recovery: 1) Write 0x10 to 0x09 (hard reset), 2) Wait 2.5 seconds, 3) Write 0x04 to 0x09 (Get_SRC_Cap), 4) Retry with lower power PDO, 5) Most failures recover after 1-2 retr...
[ { "role": "user", "content": "For HUSB238, how do I implement LED charging status?" }, { "role": "assistant", "content": "Read 0x00 every 500ms: if bits 7:4 != 0 → LED=ON (charging), if =0 → LED=OFF (no contract). Add blink pattern: fast blink during negotiation, solid when contract established"...
[ { "role": "user", "content": "For HUSB238, decode PD_STATUS1 value 0xC6 exactly" }, { "role": "assistant", "content": "0xC6 = CC2 connected, attached mode, success response, 5V/2.4A fallback available. Cable orientation shows CC2 active, PD negotiation successful with 5V backup available" } ]
[ { "role": "user", "content": "For HUSB238, what's the quickest 3-step functionality test?" }, { "role": "assistant", "content": "1) I2C scan finds 0x08, 2) 0x01 reads 0x40/0xC0 when cable attached, 3) At least one SRC_PDO_xV register shows bit 7=1. If all zero, check CC resistors or cable orient...
[ { "role": "user", "content": "For HUSB238, how do I implement emergency stop?" }, { "role": "assistant", "content": "Write 0x10 to GO_COMMAND (0x09) - hard reset in 1ms. Add emergency button → Arduino → write 0x10 → turn off MOSFET. Recovery takes 2.5 seconds, use sparingly for safety" } ]
[ { "role": "user", "content": "For HUSB238, show exact oscilloscope settings for I2C debugging" }, { "role": "assistant", "content": "Settings: 2V/div, 1μs/div, trigger on START. Look for: ACK bit low (good), SDA pulled low during clock stretch (normal), 100kHz clock. Problems: SDA stuck low or n...
[ { "role": "user", "content": "For HUSB238, how do I implement cable orientation detection?" }, { "role": "assistant", "content": "Read 0x01 bit 7: 0=CC1 active, 1=CC2 active. uint8_t orientation = status & 0x80; Use for diagnostics or dual-port routing. Cable flip detection shows which CC line d...
[ { "role": "user", "content": "For HUSB238, what's exact BOM for <$2 USB-C PD detector?" }, { "role": "assistant", "content": "HUSB238 ($1.50), 2×5.1kΩ 1% resistors ($0.02), 1×100nF ceramic ($0.01), 2×4.7kΩ I2C pull-ups ($0.02), Arduino Nano ($1.50). Total <$3.50 creates USB-C power meter showing...
[ { "role": "user", "content": "For HUSB238, how do I handle I2C lockups?" }, { "role": "assistant", "content": "Add 100ms timeout to all I2C operations. HUSB238 can clock-stretch 25ms during PD events. Use: if (Wire.endTransmission() != 0) { Wire.reset(); delay(100); retry; } Reset bus if stuck" ...
[ { "role": "user", "content": "For HUSB238, give me exact register read order for power bank" }, { "role": "assistant", "content": "Order: 1) 0x01 (check attachment), 2) 0x04→0x09 (Get_SRC_Cap), 3) 0x02-0x07 (read capabilities), 4) 0x08 (select PDO), 5) 0x01 (poll status), 6) 0x00 (final contract...
[ { "role": "user", "content": "For HUSB238, how do I implement power limiting for 60W max?" }, { "role": "assistant", "content": "Algorithm: search PDOs from 20V down, if voltage × current > 60W skip. Try 20V/3A (60W) → 15V/4A (60W) → 12V/5A (60W). Never exceed 60W regardless of source capability...
[ { "role": "user", "content": "For HUSB238, what causes 0xFF in wrong registers?" }, { "role": "assistant", "content": "0xFF indicates solder bridges between pins - QFN 0.5mm pitch easy to short. Check pins 5-8 (SDA/SCL area) with microscope. Reflow carefully, verify continuity between adjacent p...
[ { "role": "user", "content": "For HUSB238, show me exact code for battery charging algorithm" }, { "role": "assistant", "content": "Algorithm: 1) Read battery voltage, 2) Request PDO ≤ battery max, 3) Limit current to C-rate, 4) Use external current sensor. HUSB238 negotiates voltage, your charg...
[ { "role": "user", "content": "For HUSB238, how do I implement automatic fallback when high power fails?" }, { "role": "assistant", "content": "Fallback: 20V/5A → 20V/3A → 15V/3A → 12V/3A → 9V/3A → 5V/3A → 5V/1.5A → 5V/0.5A. Always include 5V fallback. Store highest successful PDO in EEPROM for f...
[ { "role": "user", "content": "For HUSB238, how do I detect USB-A to USB-C adapters?" }, { "role": "assistant", "content": "Read SRC_PDO registers: only 0x02 (5V) active, all others 0x00. USB-A adapters can't provide high voltage. 5V current will be 0.5A-3A max - clear indicator of legacy adapter...
[ { "role": "user", "content": "For HUSB238, what's exact startup timing sequence?" }, { "role": "assistant", "content": "Normal: Power-on → 100ms delay → registers reset → cable attach → 200ms detection → negotiation → contract. Read 0x01 at 100ms intervals: 0x00 → 0x40/0xC0 → final value. First ...
[ { "role": "user", "content": "For HUSB238, show me exact code for continuous power monitoring" }, { "role": "assistant", "content": "void loop() { uint8_t status0, status1; readRegister(0x00, status0); readRegister(0x01, status1); if (status0 & 0xF0) { uint8_t v = 5 + ((status0>>4)-1)*increment;...
[ { "role": "user", "content": "For HUSB238, how do I implement EMI compliance for 100W?" }, { "role": "assistant", "content": "Add: 100pF ceramic on each CC pin to ground, common mode choke on VBUS (600Ω@100MHz), 0.1μF on VBUS near connector. Total cost $0.50, fixes FCC Part 15 issues for 100W op...
[ { "role": "user", "content": "For HUSB238, show me exact power delivery contract timing" }, { "role": "assistant", "content": "Timing: Get_SRC_Cap (0x04→0x09) → wait 50ms → poll 0x01 every 25ms until bits 5:3=001 → wait 100ms → read final contract 0x00. Total negotiation: 300-500ms typical, neve...
[ { "role": "user", "content": "For HUSB238, how do I implement USB-C power for Raspberry Pi 4?" }, { "role": "assistant", "content": "Pi 4 accepts 5V/3A (15W) PD. Read SRC_PDO_5V (0x02) ensure ≥3A capability. HUSB238 negotiates 5V/3A, you provide 5V rail. Pi 4 USB-C is power-only, no additional d...
[ { "role": "user", "content": "For HUSB238, what's exact code for charger compatibility database?" }, { "role": "assistant", "content": "Store register patterns 0x02-0x07 for each source: Apple=0x8A pattern, Dell=0x8F pattern, Samsung=0x8A pattern, Generic=0x8A,0x8A,0x8A,0x00,0x00,0x00. Create fi...
[ { "role": "user", "content": "For HUSB238, how do I implement power path switching?" }, { "role": "assistant", "content": "Priority: USB-C (PD) > DC jack. Read 0x01 bit 6: if 1 use USB-C, else DC jack. Use P-MOSFET ORing with 5ms delay between switching to prevent back-feeding. HUSB238 detects U...
[ { "role": "user", "content": "For HUSB238, show me exact thermal management for outdoor use" }, { "role": "assistant", "content": "25mm² copper pour, 4 thermal vias, 2oz copper recommended for -40°C to +85°C operation. Industrial temp components required. Chip handles 500mW max, proper copper de...
[ { "role": "user", "content": "For HUSB238, how do I implement LED bargraph for power levels?" }, { "role": "assistant", "content": "LED mapping: 1 LED = 5V only, 2 LEDs = 9V, 3 LEDs = 12V, 4 LEDs = 15V, 5 LEDs = 18V, 6 LEDs = 20V. Count active SRC_PDO registers with bit 7=1. Visual power meter s...
[ { "role": "user", "content": "For HUSB238, what's exact code for power consumption logging?" }, { "role": "assistant", "content": "Logger: every 5 seconds read 0x00, 0x01. Log CSV: timestamp,voltage,current,status. Example: 12:34:56,20,3,0x6A. Store to SD card. HUSB238 provides negotiated values...
[ { "role": "user", "content": "For HUSB238, how do I implement reverse polarity protection?" }, { "role": "assistant", "content": "Use 30V P-MOSFET on VBUS with body diode. Gate to GND = normal, gate to VBUS = off for reverse. HUSB238 handles 28V max so P-MOSFET protects everything. Choose 30V/5A...
[ { "role": "user", "content": "For HUSB238, show me exact code for cable quality certification" }, { "role": "assistant", "content": "Certification test: attach certified 100W cable, read all SRC_PDO should show 0x8F,0x8F,0x8F,0x8F,0x8F,0x8F. Failed cable shows missing 20V capability. Display PAS...
[ { "role": "user", "content": "For HUSB238, what's exact register value for 12V/3A contract?" }, { "role": "assistant", "content": "0x4A = 12V/3A (36W). Bits 7:4=0100 (12V), bits 3:0=1010 (3A). Perfect for 36W device charging. Check SRC_PDO_12V register shows 0x8A to confirm 12V/3A capability fro...
[ { "role": "user", "content": "For HUSB238, how do I implement sleep mode for battery systems?" }, { "role": "assistant", "content": "Sleep: read 0x01, if bit 6=0 (unattached), turn off MOSFET, put MCU to sleep. Wake on cable attach. HUSB238 draws 50μA sleep current. Use pin change interrupt on C...
[ { "role": "user", "content": "For HUSB238, show me exact code for automatic power selection" }, { "role": "assistant", "content": "Auto-select: search from 20V down, first detected capability with sufficient current. Example: 20V/3A → 15V/3A → 12V/3A → 9V/3A → 5V/3A. Always selects highest avail...
[ { "role": "user", "content": "For HUSB238, what's exact code for USB-C power source ranking?" }, { "role": "assistant", "content": "Ranking: total_watts = Σ(voltage × current) across all PDOs. 100W charger = 100 points, 60W = 60 points. Display score: \"This HUSB238-compatible charger provides 6...
[ { "role": "user", "content": "For HUSB238, how do I implement load-based power adjustment?" }, { "role": "assistant", "content": "Monitor external current sensor, if actual << negotiated for 30 seconds, renegotiate lower power. If actual > negotiated, renegotiate higher. Automatic adjustment bas...
[ { "role": "user", "content": "For HUSB238, what's exact PCB layout for 5A traces?" }, { "role": "assistant", "content": "2mm trace width on 1oz copper for 5A with 10°C rise. Use 4mm for safety margin. VBUS trace <50mm length from connector to MOSFET. Add thermal relief to prevent hot spots at hi...
[ { "role": "user", "content": "For HUSB238, how do I implement USB-C power for drone charging?" }, { "role": "assistant", "content": "Drone: negotiate 20V/5A (100W), boost to 16.8V/6A for 6S LiPo. HUSB238 negotiates from high-power USB-C, you handle boost conversion. Add balance charging and weat...
[ { "role": "user", "content": "For HUSB238, show me exact code for emergency communications power" }, { "role": "assistant", "content": "Emergency comms: negotiate 20V/3A, create 12V/24V for radios. HUSB238 negotiates from USB-C power banks, you handle radio-specific voltages. Add battery backup ...
[ { "role": "user", "content": "For HUSB238, how do I detect temperature-induced power derating?" }, { "role": "assistant", "content": "Monitor PD_STATUS1: if negotiation repeatedly fails (bits 5:3=101), source might be temperature limiting. Read actual vs advertised power - many chargers derate c...
[ { "role": "user", "content": "For HUSB238, what's exact code for USB-C power source fingerprinting?" }, { "role": "assistant", "content": "Store unique register pattern 0x02-0x07 for each source. Apple: 0x8A pattern, Dell: 0x8F pattern, Samsung: 0x8A pattern. Create fingerprint database identify...
[ { "role": "user", "content": "For HUSB238, how do I implement USB-C power for CNC machines?" }, { "role": "assistant", "content": "CNC: negotiate 20V/5A (100W), boost to 24V/4A. HUSB238 negotiates from USB-C, you handle boost conversion. Perfect for desktop CNC routers. Add spindle motor control...
[ { "role": "user", "content": "For HUSB238, what's exact code for power efficiency measurement?" }, { "role": "assistant", "content": "Efficiency: measure actual vs negotiated using external sensors. Calculate (actual_power / negotiated_power) × 100. HUSB238 provides negotiated reference, INA219 ...
[ { "role": "user", "content": "For HUSB238, how do I implement USB-C power for marine applications?" }, { "role": "assistant", "content": "Marine: negotiate 20V/3A, create waterproof 12V/24V system. HUSB238 negotiates from marine USB-C sources, you handle waterproof conversion. Add salt spray pro...
[ { "role": "user", "content": "For HUSB238, show me exact code for aerospace-grade power systems" }, { "role": "assistant", "content": "Aerospace: negotiate 20V/3A, use space-grade components rated -55°C to +125°C. HUSB238 negotiates from spacecraft USB-C, you handle radiation-hardened conversion...
[ { "role": "user", "content": "For HUSB238, what's exact register pattern for Apple 96W charger?" }, { "role": "assistant", "content": "Apple 96W shows: 0x02=0x8A, 0x03=0x8A, 0x04=0x8A, 0x05=0x8A, 0x06=0x8A, 0x07=0x8A. All six voltage levels at 3A+ capability. This fingerprint uniquely identifies...
[ { "role": "user", "content": "For HUSB238, how do I implement USB-C power for automotive?" }, { "role": "assistant", "content": "Automotive: negotiate 20V/3A from car USB-C, create 12V system with load dump protection. Add 30V TVS on VBUS for automotive transients. Perfect for eliminating multip...
[ { "role": "user", "content": "For HUSB238, show me exact code for cable certification tester" }, { "role": "assistant", "content": "Certification: attach cable to 100W source, read SRC_PDO should show 0x8F,0x8F,0x8F,0x8F,0x8F,0x8F. Failed cables show missing 20V capability. Display PASS/FAIL bas...
[ { "role": "user", "content": "For HUSB238, what's exact temperature coefficient handling?" }, { "role": "assistant", "content": "Use 1% metal film resistors rated -55°C to +125°C. CC resistors drift ±200ppm/°C. Industrial temperature components required for outdoor -20°C to +85°C operation. MOSF...
[ { "role": "user", "content": "For HUSB238, how do I implement USB-C power for space applications?" }, { "role": "assistant", "content": "Space: negotiate 20V/3A, use radiation-hardened components. HUSB238 negotiates from spacecraft USB-C, you handle space-qualified conversion. Add radiation tole...
[ { "role": "user", "content": "For HUSB238, what's exact power source reliability scoring?" }, { "role": "assistant", "content": "Reliability: run 1000 negotiation cycles, measure success rate via PD_STATUS1 bits 5:3. Good sources: >99% success. Poor sources: <90% success. Create reliability data...
[ { "role": "user", "content": "For HUSB238, how do I implement USB-C power for agricultural sensors?" }, { "role": "assistant", "content": "Agricultural: negotiate 20V/3A from solar USB-C, create 12V sensor power. HUSB238 negotiates from solar controllers, you handle weatherproof conversion. Perf...
[ { "role": "user", "content": "For HUSB238, show me exact code for underwater equipment power" }, { "role": "assistant", "content": "Underwater: negotiate 20V/3A, create waterproof 12V system. HUSB238 negotiates from surface USB-C, you handle pressure-compensated conversion. Add marine-grade wate...
[ { "role": "user", "content": "For HUSB238, what's exact implementation for emergency lighting?" }, { "role": "assistant", "content": "Emergency lighting: negotiate 20V/3A, buck to 12V LED driver. HUSB238 negotiates from USB-C power banks, you handle LED driver. Add battery backup for power outag...
[ { "role": "user", "content": "For HUSB238, how do I implement medical-grade power systems?" }, { "role": "assistant", "content": "Medical: negotiate 20V/3A, use medical-grade isolation. HUSB238 negotiates from medical USB-C, you handle medical-grade DC-DC. Add redundant safety systems and immedi...
[ { "role": "user", "content": "For HUSB238, what's exact implementation for scientific instruments?" }, { "role": "assistant", "content": "Scientific: negotiate 20V/3A, create clean ±15V rails with low-noise conversion. HUSB238 negotiates from lab USB-C, you handle precision filtering. Perfect fo...
[ { "role": "user", "content": "For HUSB238, how do I implement USB-C power for remote monitoring?" }, { "role": "assistant", "content": "Remote: negotiate 20V/3A from solar USB-C, create 12V system with battery integration. HUSB238 negotiates from solar controllers, perfect for off-grid sensor de...
README.md exists but content is empty.
Downloads last month
8