Skip to content

SimenFjellstad/Single-Line-Data-Transfer-Protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Single-Line-Data-Transfer-Protocol

##Disclaimer: This is still a work in progress, and may often not work with older code A data transfer protocol utilizing only a single line for transfer. The data signal type is based upon a Return-to-zero coding, although it is positively flipped, so we have two positive voltages, instead of a positive and a negative voltage. These voltages are as following:
5V: Defines a logic 1 in signal.
2.5V: Defines a logic 0 in signal.
0V: Idle, or "NULL"

##Group description:
Pre-amble:
Bits for "wakeup" and validating that we're at the start of a package. In NDD it is an easy pattern going "101010...". This is also considered a safety addition to the code as we won't get corrupted data from starting listening mid-package.

Address:
The adress is a code telling who this data is for. It is composed of 4 bits, meaning up to 16 listeners can be added to this system. If the address is not matching the receiver's address, the package is thrown away.

Pack Counter:
This is one of the safety features of the NDD Singleline system. The package counter is taking this "package code" and checking if this is the next one in line. If not, the package is thrown away. For this to accept wrong package, 7 consecutive packages have to be dropped.

Data Length:
The datalength bits is an indicator of how many bytes of data this package contains. The numbers are 0 indexed, so a code of 0b00 tells us that only 1 byte of data is coming. This system goes up to 4 bytes of data with the code 0b11 given.

Data:
The data bits are the payload we actually want to carry on. The data length ranges from 1-4 bytes. The format of this data varies as the recievers expect different formats.

Parity:
The parity bit is another safety feature of the SinglelineDTP. It is used for error detection where we count the number of 0b1 bits. And as we want to achieve an odd number one, the parity bit is et accordingly. Ex. of we have a total of 8 0b1 bits before the parity, the parity bit is set to 0b1 to achive an odd number.

Reset bits:
The reset bits' function is not that much. They are only here to help the program get some space before receiving the next package.

Singleline Basic
Pre-amble
12 bits
Address
4 bits
Pack Counter
3 bit
Data
8 bits
Parity
1 bit
Reset
3 bits (0)
1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 0 0
NaN 0x1 0x5 0xA9 0 Zero

About

A data transfer protocol utilizing only a single line for transfer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages