#define NUM_ENTRIES(ARRAY) (sizeof(ARRAY) / sizeof(ARRAY)) The version encoded here is a six element encoding to include some punctuation characters. If you're interested I can post the code the generates the 'a_decode' table based on the 'morse' table which would allow you to add or remove the morse characters you wish to allow. Original thread: morse decoder problem - #9 by nickgammon - Programming Questions - Arduino ForumĮxample of decoding a morse 'C' string using a lookup table. It auto-adjusts to the sending speed after a bit of time "learning" the length of a dot and dash. (millis () - lastPulse) >= (dotLength * 2) & If (pinState = HIGH & width >= (wordLength - FUZZ_FACTOR)) If (pinState = HIGH & width >= (dashLength - FUZZ_FACTOR)) Volatile unsigned int widths īyte pinState = digitalRead (SIGNAL_PIN) Here it is from my sketches folder: // Morse code decoderĬonst int SIGNAL_COUNT = 6 // maximum number of dots/dashes in a letter Alternatively you could connect a microphone with a preamplifier to the input to 'hear' morse from virtually any nearby source.I seem to remember writing a decoder a while back. The audio input can be fed directly from any suitable audio output (speaker, aux or headphone socket) on your radio. The WPM=xx value on the LCD is the calculated wpm speed of the incoming morse. Values are: FO (Off), F5 (5 wpm spacing) or F8 (8 wpm spacing). The farnsworth setting is displayed as Fx where x is the selection for the spacing between characters. This allows a student to learn to recognise the pattern of the incoming characters at a more relistic speedspeed while still allowing enough time to think between characters. Farnsworth settings are used for morse training by sending morse characters at a higher speed (say 10 wpm) while the character spacing is around 5 or 8 wpm. Press the Fansworth switch to set the Farnsworth value. The default value of 201 represents a tone frequency of around 400Hz. The filter value is displayed on the LCD as T=xxx where xxx is the filter value. The function will sweep up and down until a lock is made on the incoming tone frequency. Press the SWEEP (Right) switch to tune the digital pot attached to the LM567 tone decoder. Increase the value on noisy signals to improve readability. The larger the value the greater the delay. The filter introduces a delay when reading the morse input in order to reduce the effect of noise pulses on the input signal.The filter value is displayed on the LCD as Fl=x where x is the filter value from 0 to 8. Press the FILTER (Left) switch to adjust the noise filter value. INSTRUCTIONS FOR USE OF THE MORSE DECODER So if you are in a situation where after a while you cannot seem to correctly decode morse, simply press the sweep button which will retune the decoder input frequency to the current tone value AND reset the timers and default values. To correct this I simply reset these values whenever the SWEEP button is pressed. I found that the values of the 'startUpTime' and 'startDownTime' variables became very large whenever there was a delay in receiving any morse input. Budd also indicated the reset should be used occasionally. The only way to fix it was to press the reset button. This was most apparent when there had been no morse input for a while. When running the original WB7FHC version it used to get itself into a mode where it would no longer decode morse. Ive also removed the sidetone and speaker connection as I prefer a softer sine-wave side tone which I can generate externally. These include a 'live' adjustable farnsworth setting, a much faster sweep tuning function by reducing the tuning range, and changes to the general operation and LCD layout. I have made some software changes to suit my circumstances. The CW decoder uses the same basic LM567 circuit designed by Budd Churchward WB7FHC which is connected to an Arduino Nano. A Morse Code Decoder based on WB7FHC's Simple Morse Code Decoder.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |