Skip to content
CedricWangRSPublic

About

DTC Lab — Diagnostic Trouble Code Studio. Decode DTC codes, visualize status bytes, and reference UDS services — all in your browser. Interactive bit-level status byte visualizer.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

🚨 DTC Lab — Diagnostic Trouble Code Studio

Decode DTC codes, visualize status bytes, and reference UDS services — all in your browser. Interactive bit-level status byte visualizer, ISO 14229 compliant, zero dependencies.

License: MIT Version: 1.0.0 Zero Dependencies PWA Ready Author: Cedric.Wang


💡 Why DTC Lab?

Every automotive engineer working with diagnostics deals with DTCs (Diagnostic Trouble Codes) daily — decoding hex codes, checking status byte bits, looking up UDS service IDs, and debugging NRC responses.

The problem: Currently engineers:

  • Look up DTC codes in PDF standards (slow)
  • Manually convert DTC status bytes on paper or in a calculator
  • Google UDS service codes every time
  • Keep a cheat sheet of NRC codes that's always outdated

DTC Lab solves this with four integrated tools in one page, zero install.


✨ Features

🎚️ Interactive DTC Status Byte Visualizer

  • 8 toggle cards representing each status bit (ISO 14229-1)
  • Real-time hex/binary display
  • Human-readable summary of fault state
  • Quick-select common status masks (0x2A, 0x4A, 0xFF, etc.)
  • Click any bit card to toggle and see description update instantly

🔍 DTC Code Decoder

  • Input: 3-byte hex (UDS format) or P/C/B/U code (SAE J2012)
  • Output: System (Powertrain/Chassis/Body/Network), hex code, format
  • Shows byte breakdown (high/mid/low)
  • Common DTC examples for quick reference

📋 UDS Service Reference

  • Complete ISO 14229-1 service list (0x10–0x3E)
  • Search by SID, name, or keyword
  • Shows request format, response format, and sub-functions
  • SID → Response SID mapping (0x10 → 0x50, etc.)

⚠️ NRC (Negative Response Code) Reference

  • All standard negative response codes
  • Search by code, name, or description
  • Color-coded by severity (0x78 = warning, 0x24/0x33/0x35 = error)

🚀 Quick Start

Option A: Direct open

Open index.html in any modern browser. That's it.

Option B: Local server

python3 -m http.server 8080
# or
npx serve . --port 3000

🛠️ Tech Stack

  • Pure HTML5 + CSS3 + JavaScript (ES6+)
  • CSS Custom Properties (theme system)
  • Traditional <script> loading (works with file:// protocol)
  • No frameworks, no build tools, no third-party libraries

📦 Project Structure

dtc-lab/
├── index.html              # Single-file entry
├── manifest.json           # PWA manifest
├── sw.js                   # Service Worker
├── assets/
│   ├── css/
│   │   ├── variables.css   # Design tokens
│   │   ├── base.css        # Reset
│   │   ├── layout.css      # App layout
│   │   └── components.css  # UI components
│   └── js/
│       ├── dtc-decoder.js   # DTC code decoder
│       ├── dtc-status.js   # Status byte definitions
│       ├── uds-data.js     # UDS services & NRC reference
│       ├── store.js        # localStorage wrapper
│       ├── app.js          # Main controller
│       └── main.js         # Entry point

🤝 Contributing

Contributions welcome! See CONTRIBUTING.md.

Ideas for future versions:

  • DTC snapshot data builder
  • UDS request/response message builder
  • ISO 15765-2 (ISO-TP) transport layer calculator
  • OBD-II mode/service reference
  • DTC severity classification (ASIL mapping)
  • Multi-ECU diagnostic topology viewer

📄 License

MIT License — Copyright (c) 2026 Cedric.Wang


⭐ If DTC Lab helps you, please consider giving it a Star!

About

DTC Lab — Diagnostic Trouble Code Studio. Decode DTC codes, visualize status bytes, and reference UDS services — all in your browser. Interactive bit-level status byte visualizer.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages