CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Sequential Logic

8-Bit PISO: MSB-First Serial Output

MediumLogic CircuitBuild

Standard SPI peripherals require data transmission to begin with the most significant bit. A parallel-in serial-out shift register converts internal byte-wide data into a single-wire bitstream formatted for these sensors.

When load is 1, the circuit captures the 8-bit input D on the rising edge of the clock. When load is 0, the register shifts its contents on each rising edge, outputting the bits sequentially on sout. The transmission must be MSB-first: D[7] appears on sout immediately after the load cycle, followed by D[6] through D[0] on subsequent clock cycles.

| load | Action | sout (after clock edge) | |--------|--------|---------------------------| | 1 | Load | D[7] | | 0 | Shift | D[6], then D[5], etc. |

Constraints

  • Synchronous logic only: all state elements must share the same clock.
  • The serial output sout must be driven directly by the final flip-flop in the shift chain.
  • Do not reverse the bit order externally: the shift chain itself must be wired to shift from MSB to LSB.

Topics

Shift RegistersSPIData Routing

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

Sign in to solveSee what Pro unlocks

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

  • 3-bit Ripple Counter from Toggle Flip-FlopsEasy
  • D Latch from a 2:1 MUXEasy
  • 2-bit Ring CounterEasy
  • T Flip-Flop from a D Flip-FlopEasy
  • Handshake Deadlock Due to Early ResetHard
  • Reconvergence of Individually Synchronized BitsHard
  • Debug: Asynchronous Clear GlitchHard
  • Clock Gate Enable Crossing DomainsHard

Browse all problems · Learning tracks