I need information about AX.25 bit encoding for packet radio transmission using a TNC.
My understanding is the actual data bits are sent asynchronously, which requires the data to be segmented into groups with a start bit and stop bit for each group.
The problem is when AX.25 bit stuffing adds extra zero bits to the data. For a simplified example: when sending 16 bits of data with 1 stuffed bit added for a total of 17 bits in the Tx bit stream, how are these bits sent in an asynchronous format delimited by start and stop bits?
If the original 16 bits of data are segmented into 8 bit bytes it would look like this:
start bit – 8 bits of data - stop bit, start bit – 8 bits of data - stop bit
After bit stuffing how would the 17 bits look?
start bit – 9 bits of data - stop bit, start bit – 8 bits of data - stop bit
Because of the variable 8/9 bit length an AVR USART would not decode this format.
Or would it use fixed 8 bit lengths with the 17th data bit in a third 8 bit byte (with the left over 7 bits discarded as padding)?
However the bits are sent, I understand its the receiver's job to remove any stuff bits and restore the original data from within the unique flag byte boundaries.
The demodulation of the FSK tones will be handled by a Bell 202 chip and logic levels are fed to an AVR chip. I want to know if I can use the hardware USART with a fixed word length or if I have to use a software UART that can deal with variable length words.
I have found AX.25, TNC and packet specifications on the web, but I can not find anything that goes deeply enough into the actual physical layer data encoding to answer this question.
I would also like to know if NRZ or NRZI bit coding is used for HAM packet.