Skip to content

AFSK tone reversal #6

Description

@W4KRL

If you listen to the audio output of pin 2 using the Hello World example, you will notice that the preamble has a high pitch on every other transmission. Printing the first bit of each message looks like this:

MYCALL-1>APRS,WIDE2-1:>Hello World !!
1
MYCALL-1>APRS,WIDE2-1:>Hello World !!
0
MYCALL-1>APRS,WIDE2-1:>Hello World !!
1
MYCALL-1>APRS,WIDE2-1:>Hello World !!
0
MYCALL-1>APRS,WIDE2-1:>Hello World !!
1

The AFSK tones must be reversed on each transmission. Is this the expected operation?

Also, the comment says that the crc is calculated with 0x1024 but the code uses 0x8408:

/*

  • This function will calculate CRC-16 CCITT for the FCS (Frame Check Sequence)
  • as required for the HDLC frame validity check.
  • Using 0x1021 as polynomial generator. The CRC registers are initialized with
  • 0xFFFF
    */
    void calc_crc(bool in_bit)
    {
    unsigned short xor_in;

xor_in = crc ^ in_bit; // bitwise XOR
crc >>= 1;

if(xor_in & 0x01)
crc ^= 0x8408;
.
.
.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions