---
title: "concurrent-data-capture"
url: "https://maker.wiznet.io/scarlet/projects/harout-concurrent-data-capture/"
markdown_url: "https://maker.wiznet.io/scarlet/projects/harout-concurrent-data-capture/md"
type: "UCC: User Created Content"
author: "harout"
author_url: "https://github.com/harout/concurrent-data-capture"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "harout"
original_url: "https://github.com/harout/concurrent-data-capture"
published: "2023-07-03"
language: "en"
likes: 0
views: 158
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# concurrent-data-capture

> working project to capture data from multiple ADCs

Original author: harout (source: https://github.com/harout/concurrent-data-capture)

## Article

The module's inputs and outputs are as follows:

- clk: clock signal

- miso: Master In Slave Out (MISO) pin

- instruction_input_valid: Signal indicating the validity of the instruction input

- instruction_input: the input instruction

- data_input_valid: signal indicating the validity of the data input

- data_input: input data

- flush_requested: signal requesting to flush data to the TX buffer

- mosi: Master Out Slave In (MOSI) pin

- spi_clk: SPI clock

- spi_chip_select_n: SPI chip select signal

- data_read: read data (UDP response, etc.)

- data_read_valid: signal indicating the validity of the read data

- is_available: signal indicating whether the module is in an available state

Inside the module, always blocks are used to define behavior. Each always block operates on the rising edge of the clock, and controls the state and various signals using conditional and assignment statements.

The main states are STATE_IDLE, STATE_SENDING_COMMAND, STATE_INITIALIZING, STATE_PUSHING_DATA, etc. Depending on each state, the SPI clock (spi_clk), chip selection signal (spi_chip_select _n), instructions, data, etc. are manipulated and read. In addition, state transitions and conditional statements are used to handle the initialization process, data push process, and read data processing.

Also, the part reading the MISO pin operates on the rising edge of the SPI clock, and the part setting the MOSI pin operates on the falling edge of the SPI clock.

The module manages communication with the WIZnet5500 chip and implements basic operations that perform UDP packet transmission functions.

---

Source: https://maker.wiznet.io/scarlet/projects/harout-concurrent-data-capture/
