Academic

1-Wire digital thermometer in VHDL on FPGA

ENSEEIHT · Two-person lab project · M1 · 2023 – 2024

Complete VHDL synchronous system on Nexys A7 FPGA (Artix-7). 6 FSMs for 1-Wire communication with DS18S20. 7-segment display, 0.5°C precision, validated on oscilloscope.

6
FSMs designed
0.5°C
Precision
480 µs
1-Wire reset

01Context

Two-person lab project at ENSEEIHT: a low-level serial protocol where every timing is a matter of microseconds.

02Technical pipeline

  1. FSM Init (480 µs reset)
  2. FSM Write0/Write1
  3. FSM Write8b (ROM/RAM)
  4. FSM Read (15 µs)
  5. Master Protocol
  6. Double Dabble → 7-seg

03What I did

  1. Clock edge synchronization buffer (INPUT_SYNC, RST_SYNC) and centralized system timer management (start/end vectors, clk_1s pulse).

  2. FSM Init: 1-Wire reset sequence (480 µs pull-down, DS18S20 presence detection).

  3. FSM Write0/Write1: 1-bit write on 1-Wire bus with precise timings (1 µs / 60 µs).

  4. FSM Write8b: 8-bit command transmission (Skip ROM 0xCC, Convert T 0x44, Read Scratchpad 0xBE).

  5. FSM Read: 1-bit read from DS18S20 (1 µs pull-down, sampling at 15 µs).

  6. FSM Master Protocol: full orchestration (Init → ROM → RAM → 9-bit temperature reading).

  7. Display: Double Dabble (BCD), negative handling (two’s complement), 7-segment multiplexing.

  8. Timing and 1-Wire sequence validation on Keysight oscilloscope.

04Measured results

6
FSMs implemented
0.5°C
Display precision
480 µs
1-Wire reset
1 µs
Write bit timing
15 µs
Read sampling

05Challenges

  • Critical 1-Wire timings (µs precision) on Artix-7 FPGA
  • Indexing bug in the Write8b FSM (index incremented before the bit is sent), identified while validating the master protocol
  • Async/sync reset synchronization: async stop, restart on clock edge

Want to talk it through?

Happy to go into the technical choices, the measurements and what I would do differently.

Get in touch