Splitting data and rebuilding it?

Status
Not open for further replies.

limlik

New Member
I am playing with a wireless transmitter that sends info in packets of 8 bits, the issue is that I need to send larger amounts of data than 8 bits. What is a good method of splitting things up and then putting them back together in the right order, for and example: I have three separate numbers that I have to send out: 700, 1000, 1500, They have to be split up and then reassembled in a nice way, How should I go about this? All three numbers are separate integers that on the transmitting side need to be put into 8 bit pieces and on the receiving side need to be recombined and set as the proper int. Try not to just throw a piece of code up here if you are willing to help. I am also trying to learn more about this stuff.
 
The concept would be to break each numbers into 8-bit bytes, and send them one byte at a time. For 1500 you need 11 bits or 2 bytes for a number in binary form, and also 2 bytes if in BCD form. You could use a serial-to-parallel shift register to output the number one byte at a time. At the receiving end you use a parallel-to-serial SR to convert back to the bytes in series.

How are these numbers being generated, are they binary, BCD?
 
Last edited:
If you have more than 8 bits to send at at time you just send more than 8 bits... If you want to be basic there's really nothing complicated to do. If one of those bytes is dropped though the receiver could get confused. Generally this is alleviated using a simple frame. Basically it sends a pre-amble byte or set of bytes which tell the receiver that the following data will be the start of a new data string, often with error detection and correction bytes along with it. For example you could send UUU to signify the start of a packet, receive however many bytes you're expecting and then stop and wait for the UUU again. It can be as simple or as complicated as you want it to be.
 
Yes, the biggest problem is synchronization (Google keywords) between the transmitter and receiver. If the two get out of step, there has to be something unique in the data sequence such that receiver can figure out which is the first byte in the sequence.

A second problem is to make the data transmission tolerant of noise, such as using parity, checksum, redundancy.

This is all about Digital Communication Theory
 
Check out my PIC tutorials, you should be using Manchester coding (or something similar), and this is a packet based system - simply increase the size of your packets to match what you require.
 
Depends on the transmitter/receiver that he's using Nigel, many of tx/rx modules you can get nowdays do all that work for you.
 
Depends on the transmitter/receiver that he's using Nigel, many of tx/rx modules you can get nowdays do all that work for you.

Hardly 'many' - you can specifically buy modules with it in-built, but the vast majority don't - and in which case he wouldn't be asking this question, as he would already have a packet system.
 
He does, it's just 8bit, lets not argue, let the original poster decide how this conversation should progress, as neither you nor me has any clue what he actually has unless someone is holding out on information. limlik if you would care to share the details of the module you're using that might be helpful at this stage.
 
I think Time Division Multiplexing at both Receiver and Transmitter end, by properly selecting the sampling rate to cater desired number of bits and can be synchronized at both ends in a coherent way.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…