You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-26Lines changed: 36 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,21 @@ Please feel free to use the issues feature of GitHub if you run into problems or
6
6
7
7
Hardware Requirements and Setup
8
8
-------------------------------
9
-
This library has been written for the Arduino platform and has been successfully tested on the Arduino Unoand an Uno clone. Since the library itself does not access the hardware, there is no reason it should not run on any Arduino model of recent vintage.
9
+
This library has been written for the Arduino platform and has been successfully tested on the Arduino Uno, an Uno clone, and an Arduino Zero clone. Since the library itself does not access the hardware, there is no reason it should not run on any Arduino model of recent vintage as long as it has at least 2 kB of RAM.
10
10
11
11
How To Install
12
12
--------------
13
13
The best way to install the library is via the Arduino Library Manager, which is available if you are using Arduino IDE version 1.6.2 or greater. To install it this way, simply go to the menu Sketch > Include Library > Manage Libraries..., and then in the search box at the upper-right, type "Etherkit JTEncode". Click on the entry in the list below, then click on the provided "Install" button. By installing the library this way, you will always have notifications of future library updates, and can easily switch between library versions.
14
14
15
15
If you need to or would like to install the library in the old way, then you can download a copy of the library in a ZIP file. Download a ZIP file of the library from the GitHub repository by going to [this page](https://github.com/etherkit/JTEncode/releases) and clicking the "Source code (zip)" link under the latest release. Finally, open the Arduino IDE, select menu Sketch > Import Library... > Add Library..., and select the ZIP that you just downloaded.
16
16
17
+
RAM Usage
18
+
---------
19
+
Most of the encoding functions need to manipulate multiple arrays of symbols in RAM at the same time, and therefore are quite RAM intensive. Care has been taken to put as much data into program memory as is possible, but the encoding functions still can cause problems with the low RAM microcontrollers such as the ATmegaxx8 series. If you are using these, then please be sure to call them only once when a transmit buffer needs to be created or changed, and call them separately of other subroutine calls. When using other microcontrollers that have more RAM, such as most of the ARM ICs, this won't be as much of a problem. If you see unusual freezes, that almost certainly indicates a RAM shortage.
20
+
17
21
Example
18
22
-------
19
-
There is a simple example that is placed in your examples menu under JTEncode. Open this to see how to incorporate this library with your code. The example provided with with the library is meant to be used in conjuction with the [Etherkit Si5351A Breakout Board](https://www.etherkit.com/rf-modules/si5351a-breakout-board.html), although it could be modified to use with other synthesizers which meet the technical requirements of the JT65/JT9/JT4/WSPR/FSQ modes.
23
+
There is a simple example that is placed in your examples menu under JTEncode. Open this to see how to incorporate this library with your code. The example provided with with the library is meant to be used in conjunction with the [Etherkit Si5351A Breakout Board](https://www.etherkit.com/rf-modules/si5351a-breakout-board.html), although it could be modified to use with other synthesizers which meet the technical requirements of the JT65/JT9/JT4/WSPR/FSQ modes.
20
24
21
25
To run this example, be sure to download the [Si5351Arduino](https://github.com/etherkit/Si5351Arduino) library and follow the instructions there to connect the Si5351A Breakout Board to your Arduino. In order to trigger transmissions, you will also need to connect a momentary pushbutton from pin 12 of the Arduino to ground.
22
26
@@ -29,58 +33,58 @@ An instance of the JTEncode object is created:
29
33
On sketch startup, the mode parameters are set based on which mode is currently selected (by the DEFAULT_MODE define):
30
34
31
35
// Set the proper frequency, tone spacing, symbol count, and
32
-
// timer CTC depending on mode
36
+
// tone delay depending on mode
33
37
switch(cur_mode)
34
38
{
35
39
case MODE_JT9:
36
40
freq = JT9_DEFAULT_FREQ;
37
-
ctc = JT9_CTC;
38
41
symbol_count = JT9_SYMBOL_COUNT; // From the library defines
39
42
tone_spacing = JT9_TONE_SPACING;
43
+
tone_delay = JT9_DELAY;
40
44
break;
41
45
case MODE_JT65:
42
46
freq = JT65_DEFAULT_FREQ;
43
-
ctc = JT65_CTC;
44
47
symbol_count = JT65_SYMBOL_COUNT; // From the library defines
45
48
tone_spacing = JT65_TONE_SPACING;
49
+
tone_delay = JT65_DELAY;
46
50
break;
47
51
case MODE_JT4:
48
52
freq = JT4_DEFAULT_FREQ;
49
-
ctc = JT4_CTC;
50
53
symbol_count = JT4_SYMBOL_COUNT; // From the library defines
51
54
tone_spacing = JT4_TONE_SPACING;
55
+
tone_delay = JT4_DELAY;
52
56
break;
53
57
case MODE_WSPR:
54
58
freq = WSPR_DEFAULT_FREQ;
55
-
ctc = WSPR_CTC;
56
59
symbol_count = WSPR_SYMBOL_COUNT; // From the library defines
57
60
tone_spacing = WSPR_TONE_SPACING;
61
+
tone_delay = WSPR_DELAY;
58
62
break;
59
63
case MODE_FSQ_2:
60
64
freq = FSQ_DEFAULT_FREQ;
61
-
ctc = FSQ_2_CTC;
62
65
tone_spacing = FSQ_TONE_SPACING;
66
+
tone_delay = FSQ_2_DELAY;
63
67
break;
64
68
case MODE_FSQ_3:
65
69
freq = FSQ_DEFAULT_FREQ;
66
-
ctc = FSQ_3_CTC;
67
70
tone_spacing = FSQ_TONE_SPACING;
71
+
tone_delay = FSQ_3_DELAY;
68
72
break;
69
73
case MODE_FSQ_4_5:
70
74
freq = FSQ_DEFAULT_FREQ;
71
-
ctc = FSQ_4_5_CTC;
72
75
tone_spacing = FSQ_TONE_SPACING;
76
+
tone_delay = FSQ_4_5_DELAY;
73
77
break;
74
78
case MODE_FSQ_6:
75
79
freq = FSQ_DEFAULT_FREQ;
76
-
ctc = FSQ_6_CTC;
77
80
tone_spacing = FSQ_TONE_SPACING;
81
+
tone_delay = FSQ_6_DELAY;
78
82
break;
79
83
}
80
84
81
85
Note that the number of channel symbols for each mode is defined in the library, so you can use those defines to initialize your own symbol array sizes.
82
86
83
-
During transmit, the proper class method is chosen based on the desired mode, then the transmit symbol buffer and the other mode information is set:
87
+
Before transmit, the proper class method is chosen based on the desired mode, then the transmit symbol buffer and the other mode information is set:
84
88
85
89
// Set the proper frequency and timer CTC depending on mode
86
90
switch(cur_mode)
@@ -95,34 +99,33 @@ During transmit, the proper class method is chosen based on the desired mode, th
0 commit comments