CW Keyer application. More...
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <util/delay.h>
#include "yack.h"
Go to the source code of this file.
Defines | |
#define | TRAINTIMEOUT 10 |
#define | PITCHREPEAT 10 |
#define | FARNSREPEAT 10 |
Functions | |
void | pitch (void) |
Pitch change mode. | |
void | setfarns (void) |
Farnsworth change mode. | |
word | lfsr (byte n) |
Simple random number generator. | |
void | rndcall (char *call) |
Randomize a callsign. | |
void | cstrain (void) |
Callsign trainer mode. | |
void | beacon (byte mode) |
Beacon mode. | |
void | commandmode (void) |
Command mode. | |
int | main (void) |
Trivial main routine. | |
Variables | |
const char txok[] | PROGMEM = "OK" |
CW Keyer application.
This file implements a sample CW keyer application by using the yack.c library. It is targeted at the ATTINY45 microcontroller but can be used for other ATMEL controllers in the same way. Note the enclosed documentation for further defails.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Definition in file main.c.
void beacon | ( | byte | mode ) |
Beacon mode.
This routine can read a beacon transmission interval up to 9999 seconds and store it in EEPROM (RECORD mode) In PLAY mode, when called in the YACKBEAT loop, it plays back message 2 in the programmed interval
mode | RECORD (read and store the beacon interval) or PLAY (beacon) |
void commandmode | ( | void | ) |
void cstrain | ( | void | ) |
Callsign trainer mode.
This implements callsign training. The keyer plays a random callsign and the user repeats it on the paddle. If a mistake happens, the error prosign is sounded, the callsign sent again and the user attempts one more time.
Definition at line 181 of file main.c.
word lfsr | ( | byte | n ) |
Simple random number generator.
The library function random number generator works fine but is a nightmare in size as it utilizes various multiplications and divisions (+600 Byte). This routine implements a LFSR (linear feedback shift register) in the Galois method which is good enough for this specific application.
n | a number between 2 and 255 |
int main | ( | void | ) |
void pitch | ( | void | ) |
void rndcall | ( | char * | call ) |