Decode NOAA Weather Radio SAME codes

HerrProfessor:

This is what I have discovered:

First off, the XR-2211 generates a glitch sometimes, when transitioning between tones. Sometimes its on the leading edge, sometimes on the trailing edge and sometimes on both. I'm not sure if its the components that I selected or a trait of the XR-2211. On top of this the bit timings are not equal. A single low is approximately twice as long as a single high. However, this appears to only apply to the first received bit of multiple high's. (The timing on the first bit is short, the the rest are at the correct spacing.)

I've tried multiple sync methods and so far, I can always sync to the preamble. I can get most of the message up to somewhere around 200+ characters or I get nothing at all beyond the preamble - nowhere in between thus far!

Secondly, you cannot print while you are receiving. You have to set a flag at the end of carrier detect to signal that you have received characters. After you print the buffer, clear the flag and the received buffer. This is an example:

if (same_available == 1) // If there is a SAME message, print it out.
{
for (int i = 0; i < same_rx_buffer_index; i++)
{
Serial.print(same_rx_buffer*, HEX);*

  • Serial.print(" ");*

  • }*

  • Serial.println();*

  • for (int i = 0; i < sizeof(same_rx_buffer); i++) // Clear out the entire SAME buffer.*
    same_rx_buffer = 0x00;
    * same_available = 0;
    _
    }*_
    Capture as bytes instead of characters and you can see that you are at least receiving something. Only send one message to the Arduino, not three message spaced one second apart. This way, you have time to print out and analyze what you received.
    I've made only one change to my original components so far, change the carrier detect cap to 4.7 uf. It completely eliminates voice falsing and has negligable effect on synchronizing to the preamble.
    I don't think using digitalRead() makes a difference, for now.
    I know my posts have been few and far between lately, but we are going to succeed at this!
    Ray