Giter Club home page Giter Club logo

nrz-decode's Introduction

NRZ Decoder

This project provides the scaffold to build a basic non-return-to-zero decoder.

Waveform

Task

The file decode.py provides a simple framework and several unit tests for a decoder. It can be invoked as (assuming that your system Python 3 interpretter is python3):

python3 decode.py message.wav

Invoked in this way, it will decode the data in message.wav and return it as a string.

The tests are implemented as doctests and can be run using:

python3 -m doctest decode.py

They can also be run by invoking make test assuming that GNU make or equivelent is in your path.

Protocol Description

The included message.wav file is a playable sound file that encodes a message using the following scheme (very similar to RS232). It is encoded using 16 bits per sample and a sample rate of 44.1k samples per second.

The message is first encoded using UTF-8 and then split into bytes. Prior to sending a byte, a single start bit (0) is transmitted followed by the 8 bits in the byte, beginning with the least significant bit. A stop bit (1) is sent at the end of each byte.

The transmission uses a baud rate of 300.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.