├── .DS_Store ├── yack.png ├── README.md ├── changelog.txt ├── yack.h ├── userman.dox ├── main.c ├── Makefile ├── yack.c └── yack.sch /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhakajack/jackyack/HEAD/.DS_Store -------------------------------------------------------------------------------- /yack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhakajack/jackyack/HEAD/yack.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # jackyack 2 | A cheap open source CW keyer (ATtiny*5) 3 | 4 | This is a tiny, cheap, and open source CW keyer. It is 5 | described in detail on my blog: 6 | 7 | http://blog.templaro.com/a-tiny-and-open-source-cw-keyer/ 8 | -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | 2 | Released: V. 0.3 16.12.2010 3 | 4 | + Allow speed change anytime 5 | + Add a paddle swap function 6 | + Fix slight difference between keying and playback 7 | + Callsign training sometimes creates funny callsigns 8 | + Callsign training sometimes does not want my V! 9 | + TX INV mode needs to be initialized properly after reset 10 | + Add a function that inhibits keying in command mode 11 | + Add a callsign training function 12 | + Decoder does not understand /? Might need that for macros 13 | + Find a better way to handle command mode. 14 | + LFSR should not be called from yack code 15 | + Add a MACRO function.. Entry through command mode, Left and right paddle 16 | + Save all settings in EEPROM 17 | + Integrate dk3lj.h macro into this file 18 | + Exit even during a char 19 | + Add a Beacon function 20 | + Change DIT and DAH for speed up and down 21 | + Change default timeout to 5 seconds 22 | + Should streamline constant naming "DIT" & "DAH" 23 | + Cleanded up and rearranged code 24 | + Added functions to toggle INV, TX and sidetone bits 25 | + Moved the latches into volatile flag register 26 | + Callsigns are repeating :-) 27 | 28 | 29 | Released: V. 0.4 05.06.2011 30 | 31 | + Let the chip go to power off mode after 30 seconds of inactivity (can be revived 32 | with Dit, Dah or Command key) Power consumption is so low that no power switch is needed 33 | + Default TXINV mode is now clear after reset. This caters for keyers driven through a NPN transistor. 34 | 35 | 36 | Released: V. 0.5 37 | + Added Ultimatic and DAHPRIO modes 38 | + Modified the keying logic as timing appeared wrong 39 | + Added a Lockdown mode to prevent unwanted changes 40 | + Added functionality to prevent chip power down when beacon function is active 41 | + Extended tune mode keydown to 20 seconds 42 | + Extended pause after R in callsign practise mode 43 | + Added Farnsworth function 44 | + Pause after command keypress?? 45 | + Speed not identical in keyer and playback 46 | 47 | 48 | Released: V. 0.6 49 | + Small bug in V-Command, sounds error after Version number 50 | + Changed entire timing logic to be based on timer 1 51 | + Doubled system heartbeat to 5ms and removed all corrections now 52 | playback and iambic keying sound exactly the same 53 | + Farnsworth pause was not stored 54 | + Reintroduced inactivity timeout from command mode 55 | 56 | Released: V. 0.7 57 | + Bug in the Macro playback routine. After playing back, the routine 58 | immediately sends an OK and exits to key mode. Now it does not send the OK but returns to 59 | key mode after 15 seconds so the user gets the chance to repeat the macro in this time. 60 | 61 | Released V. 0.75 (really, just personalized preferences for DK3LJ's YACK project) 03.10.2013 62 | + Default mode Iambic A 63 | + Default side tone 700 Hz 64 | + Default keying positive 65 | + Default speed 15 wpm 66 | + Plays greeting "73" (without keying) when powered on 67 | + Replaced "OK" with "R" for command acknowledgments 68 | + Replaced "E" with "SK" when exiting command mode -------------------------------------------------------------------------------- /yack.h: -------------------------------------------------------------------------------- 1 | /* ******************************************************************** 2 | Program : yack.h 3 | Author : Jan Lategahn DK3LJ modified by Jack Welch AI4SV 4 | Purpose : definition of keyer hardware 5 | Created : 15.10.2010 6 | Update : 03.10.2013 7 | Version : 0.75 8 | 9 | Changelog 10 | --------- 11 | Version Date Change 12 | ---------------------------------------------------------------------- 13 | 14 | 15 | Todo 16 | ---- 17 | 18 | 19 | *********************************************************************/ 20 | 21 | // User configurable settings 22 | 23 | // The following settings define the hardware connections to the keyer chip 24 | 25 | // Definition of where the keyer itself is connected 26 | #define KEYDDR DDRB 27 | #define KEYPORT PORTB 28 | #define KEYINP PINB 29 | #define DITPIN 3 30 | #define DAHPIN 4 31 | 32 | // Definition of where the transceiver keyer line is connected 33 | #define OUTDDR DDRB 34 | #define OUTPORT PORTB 35 | #define OUTPIN 0 36 | 37 | // Definition of where the sidetone output is connected (beware, 38 | // this is chip dependent and can not just be changed at will) 39 | #define STDDR DDRB 40 | #define STPORT PORTB 41 | #define STPIN 1 42 | 43 | // Definition of where the control button is connected 44 | #define BTNDDR DDRB 45 | #define BTNPORT PORTB 46 | #define BTNINP PINB 47 | #define BTNPIN 2 48 | 49 | 50 | // The following defines the meaning of status bits in the yackflags and volflags 51 | // global variables 52 | 53 | // Definition of the yackflags variable. These settings get stored in EEPROM when changed. 54 | #define NOTUSED1 0b00000001 // Available 55 | #define CONFLOCK 0b00000010 // Configuration locked down 56 | #define MODE 0b00001100 // 2 bits to define keyer mode (see next section) 57 | #define SIDETONE 0b00010000 // Set if the chip must produce a sidetone 58 | #define TXKEY 0b00100000 // Set if the chip keys the transmitter 59 | #define TXINV 0b01000000 // Set if TX key line is active low 60 | #define PDLSWAP 0b10000000 // Set if DIT and DAH are swapped 61 | 62 | #define IAMBICA 0b00000000 // IAMBIC A mode 63 | #define IAMBICB 0b00000100 // IAMBIC B mode (default) 64 | #define ULTIMATIC 0b00001000 // Ultimatic Mode 65 | #define DAHPRIO 0b00001100 // Always give DAH priority 66 | 67 | #define FLAGDEFAULT IAMBICA | TXKEY | SIDETONE 68 | 69 | // Definition of volflags variable. These flags do not get stored in EEPROM. 70 | #define DITLATCH 0b00000001 // Set if DIT contact was closed 71 | #define DAHLATCH 0b00000010 // Set if DAH contact was closed 72 | #define SQUEEZED 0b00000011 // DIT and DAH = squeezed 73 | #define DIRTYFLAG 0b00000100 // Set if cfg data was changed and needs storing 74 | #define CKLATCH 0b00001000 // Set if the command key was pressed at some point 75 | #define VSCOPY 0b00110000 // Copies of Sidetone and TX flags from yackflags 76 | 77 | 78 | // The following defines timing constants. In the default version the keyer is set to operate in 79 | // 10ms heartbeat intervals. If a higher resolution is required, this can be changed to a faster 80 | // beat 81 | 82 | // YACK heartbeat frequency (in ms) 83 | #define YACKBEAT 5 84 | #define YACKSECS(n) (n*(1000/YACKBEAT)) // Beats in n seconds 85 | #define YACKMS(n) (n/YACKBEAT) // Beats in n milliseconds 86 | 87 | // Power save mode 88 | #define POWERSAVE // Comment this line if no power save mode required 89 | #define PSTIME 30 // 30 seconds until automatic powerdown 90 | #define PWRWAKE ((1<. 20 | 21 | 22 | @section intro Introduction 23 | 24 | YACK is a universal CW keyer library and application for the AVR architecture that is designed to be 25 | reusable. It consists of a set of functions to read, play, record and decode CW input from a paddle 26 | keyer (single or double lever). The library can be used to easily create keyers, CW decoders and trainers, beacons, 27 | door openers, alarm clocks and many more applications at very moderate cost. It can also be mixed with other 28 | applications in the same chip. 29 | 30 | Components of the application can be left out or included on as needed, reducing the memory footprint. The library 31 | can be found in the file yack.c 32 | 33 | To demonstrate the library, a standard keyer application has been written which can be found in main.c 34 | 35 | This document describes the operation of the keyer from a user perspective 36 | 37 | Version: 0.75 38 | 39 | @section hw Hardware 40 | 41 | As is, the library is configured to run on a ATTINY45 cpu, as shipped, with its internal oscillator at 8MHz, 42 | and prescaled to 1MHz. 43 | 44 | The ATTINY45 comes with 4KB of Flash memory and 256 Byte each for RAM and EEPROM. It can be ported to other AVR chips 45 | if these have sufficient features to support the intended application. As the library was written in C, processors without 46 | internal stack will not work with this application unless significantly rewritten. 47 | 48 | Hardware connections are defined in yack.h 49 | 50 | - Pin 1 : PB5 - RESET (Can be used for additional button) 51 | - Pin 2 : PB3 - DIT (towards GND, buffer with 10nF cap) 52 | - Pin 3 : PB4 - DAH (towards GND, buffer with 10nF cap) 53 | - Pin 4 : GND 54 | - Pin 5 : PB0 - TX key line (polarity configurable) 55 | - Pin 6 : PB1 - Sidetone (Connect a piezo disc) 56 | - Pin 7 : PB2 - Command button (towards GND) 57 | - Pin 8 : VCC (5V) 58 | 59 | @section usage Usage 60 | 61 | After reset in default mode, the keyer operates as regular IAMBIC keyer in IAMBIC A at 15 WPM 62 | (words per minute = 60 CPM), with 700 Hz side tone. By default, the transmitter keying signal is 63 | positive. 64 | 65 | @subsection speed Speed Change 66 | 67 | Speed can be changed by pressing and holding the command key while operating the DIT and DAH paddles. 68 | DIT reduces speed while DAH increases speed. The keyer plays an alternating sequence of dit and dah while 69 | changing speed without keying the transmitter. 70 | 71 | @subsection cmode Command mode 72 | 73 | Pressing the command button without changing speed will switch the keyer into command mode. This will be 74 | confirmed with the '?' character. Another press of the same button takes the keyer back into regular 75 | keyer mode and will be confirmed by the 'SK' prosign. 76 | 77 | During command mode the transceiver is never keyed and sidetone is always activated. Further 78 | functions can be accessed by keying one-letter commands as listed below. 79 | 80 | @subsubsection Version V - Version 81 | 82 | The keyer responds with the current keyer software version number 83 | 84 | @subsubsection pitch P - Pitch 85 | 86 | Allows modifying the sidetone pitch to a higher or lower level. A sequence of dits will be played 87 | and the pitch can be modified with the dit and dah paddles. If no paddle is touched for 5 seconds, 88 | the acknowledgment signal 'R' is sounded and the mode terminates, leaving the user in command mode. 89 | 90 | @subsubsection reset R - Reset 91 | 92 | All settings are returned to their default values except for the stored messages in the message buffers. 93 | Restored settings include speed and pitch, Paddle Swap, TX level inversion, sidetone and TX keyer settings. 94 | 95 | @subsubsection tune U - Tune mode 96 | 97 | The transceiver is keyed for a duration of 20 seconds for tuning purposes. Tuning mode is aborted once either 98 | DIT or DAH paddles are touched or the control key is pressed. 99 | 100 | @subsubsection ia A - IAMBIC A 101 | 102 | Keyer sets IAMBIC A as permanent keying mode. An 'R' is sounded to acknowledge the request. 103 | 104 | @subsubsection ib B - IAMBIC B 105 | 106 | Keyer sets IAMBIC B as permanent keying mode. An 'R' is sounded to acknowledge the request. 107 | 108 | @subsubsection ultimatic L - Ultimatic 109 | 110 | Sets the keyer into ULTIMATIC mode. In Ultimatic mode always the last paddle to be touched is repeated indefinitely 111 | when paddles are squeezed 112 | 113 | @subsubsection dahprio D - DAH priority mode. In squeezed state a sequence of DAHs is sent. 114 | 115 | Some of the first generation keyers exhibited this behaviour so the chip can simulate that 116 | 117 | @subsubsection swap X - Paddle swapping 118 | 119 | DIT and DAH paddles are swapped. An 'R' is sounded to acknowledge the request. 120 | 121 | @subsubsection side S - Sidetone toggle 122 | 123 | The built-in sidetone generator setting is toggled (ON -> OFF or OFF -> ON). NOTE: This setting is only of relevance 124 | for regular keying mode. Sidetone is always on in command mode. An 'R' is sounded to acknowledge the request. 125 | 126 | @subsubsection txtog K - TX Keying toggle 127 | 128 | Toggles the setting of the TX keyer output. In default state the keyer switches the output line when it is in keyer mode. 129 | Toggling this setting enables or disables that function. NOTE: Keying is always off in Command mode. An 'R' is sounded to 130 | acknowledge the request. 131 | 132 | @subsubsection farnsworth Z - Set Farnsworth pause 133 | 134 | Allows setting of an extended inter-character pause in all sending modes, which makes fast keying easier to understand. 135 | Note that this of course only influences RECEPTION, not TRANSMISSION. If you desire farnsworth mode in transmission, please 136 | manually pause during characters. 137 | 138 | @subsubsection lvtog I - TX level inverter toggle 139 | 140 | This function toggles wether the "active" level on the keyer output is VCC or GND. The default is VCC. This setting 141 | is dependent on the attached keying circuit. An 'R' is sounded to acknowledge the request. 142 | 143 | @subsubsection query W - Query current WPM speed 144 | 145 | Keyer responds with current keying speed in WPM. 146 | 147 | @subsubsection msgrec 1 and 2 - Record internal messages 1 or 2 148 | 149 | The keyer immediately responds with "1" or "2" after which a message up to 100 characters can be keyed at current WPM speed. 150 | After 5 seconds of inactivity the message is played back once and then stored in EEPROM. Choosing "1" or "2" but not keying 151 | a new message deletes the chosen message buffer content. 152 | 153 | @subsubsection msgplay E and T - Play back internal messages 1 or 2 154 | 155 | The stored messages 1 or 2 are played back with keying enabled (if configured). A press of the command key immediately 156 | returns the keyer to keyer mode so a QSO can be started. 157 | 158 | @subsubsection beacon N - Automatic Beacon 159 | 160 | The keyer responds with 'N' after which a number between 0 and 9999 can be keyed. After a 5 second timeout the keyer 161 | responds by repeating the number and 'R'. Once the keyer returns to keyer mode, the content of message buffer 2 is 162 | repeated in intervals of n seconds. The setting is preserved in EEPROM so the chip can be used as a fox hunt keyer. 163 | 164 | Returning to command mode and entering an interval of 0 (or none at all) stops beacon mode. 165 | 166 | @subsubsection lock 0 - Lock configuration 167 | 168 | The 0 command locks or unlocks the main configuration items but not speed, pitch and playback functions. 169 | 170 | @subsubsection trainer C - Callsign trainer 171 | 172 | The keyer plays a generated callsign (sidetone only) and the user must repeat it. If it was repeated correctly, 'R' is 173 | played and the next callsign is given. If a mistake was sensed, the error prosign (8 dits) is sounded and 174 | the current callsign is repeated again for the user to try once more. If nothing is keyed for 10 seconds, the keyer returns 175 | to command mode. 176 | 177 | 178 | */ -------------------------------------------------------------------------------- /main.c: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | @file main.c 4 | @brief CW Keyer application 5 | @author Jan Lategahn DK3LJ jan@lategahn.com (C) 2010 modified by Jack Welch AI4SV 6 | 7 | This file implements a sample CW keyer application by using the yack.c 8 | library. It is targeted at the ATTINY45 microcontroller but can be used 9 | for other ATMEL controllers in the same way. Note the enclosed documentation 10 | for further defails. 11 | 12 | This program is free software: you can redistribute it and/or modify 13 | it under the terms of the GNU General Public License as published by 14 | the Free Software Foundation, either version 3 of the License, or 15 | (at your option) any later version. 16 | 17 | This program is distributed in the hope that it will be useful, 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | GNU General Public License for more details. 21 | 22 | You should have received a copy of the GNU General Public License 23 | along with this program. If not, see . 24 | 25 | @version 0.75 26 | 27 | @date 15.10.2010 - Created 28 | @date 16.12.2010 - Submitted to SVN 29 | @date 03.10.2013 - Last change 30 | 31 | */ 32 | 33 | 34 | #ifndef F_CPU 35 | #error F_CPU undefined!! Please define in Makefile 36 | #endif 37 | 38 | #include 39 | #include 40 | #include 41 | #include "yack.h" 42 | 43 | // Time after which callsign training is assumed complete 44 | #define TRAINTIMEOUT 10 // 10 Seconds 45 | #define PITCHREPEAT 10 // 10 e's will be played for pitch adjust 46 | #define FARNSREPEAT 10 // 10 a's will be played for Farnsworth 47 | 48 | // Some texts in Flash used by the application 49 | const char txok[] PROGMEM = "R"; 50 | const char vers[] PROGMEM = "V0.75"; 51 | const char prgx[] PROGMEM = "SK"; 52 | const char imok[] PROGMEM = "73"; 53 | 54 | void pitch(void) 55 | /*! 56 | @brief Pitch change mode 57 | 58 | This function implements pitch change mode. A series of dots is played and pitch can 59 | be adjusted using the paddle levers. 60 | 61 | Once 10 dots have been played at the same pitch, the mode terminates 62 | */ 63 | { 64 | word timer=PITCHREPEAT; 65 | 66 | while (timer) // while not yet timed out 67 | { 68 | timer--; 69 | yackchar('E'); // play an 'e' 70 | 71 | if(!(KEYINP & (1<> 1) ^ (-(lfsr & 1u) & 0xB400u); 144 | 145 | random = lfsr >> 8; // Byte = upper byte of word 146 | 147 | while (random >= n) random -= n; // Cheap modulo :-) 148 | 149 | return random; 150 | 151 | } 152 | 153 | 154 | 155 | 156 | 157 | void rndcall(char* call) 158 | /*! 159 | @brief Randomize a callsign 160 | 161 | This creates a random callsign with 2 letters + 1 digit + 2 letters 162 | 163 | @param call a pointer to a buffer of sufficient size to store the callsign 164 | */ 165 | { 166 | byte i; 167 | 168 | // Generate a random callsign 2 Char, 1 Digit, 2 Char 169 | 170 | for (i=0;i<5;i++) 171 | { 172 | if (i == 2) 173 | call[i]=lfsr(10) + '0'; 174 | else 175 | call[i]=lfsr(26) + 'A'; 176 | 177 | } 178 | } 179 | 180 | 181 | 182 | 183 | void cstrain(void) 184 | /*! 185 | @brief Callsign trainer mode 186 | 187 | This implements callsign training. The keyer plays a random callsign and the 188 | user repeats it on the paddle. If a mistake happens, the error prosign is 189 | sounded, the callsign sent again and the user attempts one more time. 190 | */ 191 | { 192 | char call[5]; // A buffer to store the callsign 193 | char c; // The character returned by IAMBIC keyer 194 | byte i; // Counter 195 | byte n; // Playback counter 196 | word timer; // Timeout timer 197 | 198 | while(1) // Endless loop will exit throught RETURN statement only 199 | 200 | { 201 | rndcall(call); // Make up a callsign 202 | 203 | i=0; // i counts the number of chracters correctly guessed 204 | 205 | while(i<5) 206 | { 207 | if (!i) // If nothing guessed yet, play the callsign 208 | { 209 | yackdelay(2 * IWGLEN); // Give him some time to breathe b4 next callsign 210 | for (n=0;n<5;n++) 211 | { 212 | yackchar(call[n]); 213 | yackfarns(); // Add potential farnsworth delays 214 | if(yackctrlkey(TRUE)) 215 | return; // Abort if requested.. 216 | } 217 | } 218 | 219 | timer = YACKSECS(TRAINTIMEOUT); 220 | 221 | do 222 | { 223 | 224 | c=yackiambic(OFF); // Wait for a character 225 | yackbeat(); // FSM heartbeat 226 | timer--; // Countdown 227 | 228 | } while ((!c) && timer && !(yackctrlkey(FALSE))); // Stop when character or timeout 229 | 230 | if (timer == 0 || yackctrlkey(TRUE)) // If termination because of timeout 231 | return; // then return 232 | 233 | if (call[i] == c) // Was it the right character? 234 | i++; // then increment counter 235 | else 236 | { 237 | yackerror(); // Send an error prosign 238 | i=0; // And reset the counter 239 | } 240 | 241 | } 242 | 243 | yackchar ('R'); 244 | 245 | } 246 | } 247 | 248 | 249 | 250 | void beacon(byte mode) 251 | /*! 252 | @brief Beacon mode 253 | 254 | This routine can read a beacon transmission interval up to 255 | 9999 seconds and store it in EEPROM (RECORD mode) 256 | In PLAY mode, when called in the YACKBEAT loop, it plays back 257 | message 2 in the programmed interval 258 | 259 | @param mode RECORD (read and store the beacon interval) or PLAY (beacon) 260 | 261 | @see main 262 | 263 | */ 264 | { 265 | 266 | static word interval = 65000; // A dummy value that can not be reached 267 | static word timer; 268 | char c; 269 | 270 | 271 | if (interval == 65000) // 272 | interval = yackuser(READ, 1, 0); 273 | 274 | if (mode == RECORD) 275 | { 276 | interval = 0; // Reset previous settings 277 | timer = YACKSECS(DEFTIMEOUT); 278 | 279 | yackchar('N'); 280 | 281 | while(--timer) 282 | { 283 | c=yackiambic(FALSE); 284 | yackbeat(); 285 | 286 | if (c>='0' && c<='9') 287 | { 288 | interval *= 10; 289 | interval += c - '0'; 290 | timer = YACKSECS(DEFTIMEOUT); 291 | } 292 | } 293 | 294 | if (interval >= 0 && interval <= 9999) 295 | { 296 | yackuser(WRITE, 1, interval); // Record interval 297 | yacknumber(interval); // Playback number 298 | } 299 | else 300 | { 301 | yackerror(); 302 | } 303 | 304 | } 305 | 306 | 307 | if ((mode == PLAY) && interval) 308 | { 309 | 310 | #ifdef POWERSAVE 311 | 312 | // If we execute this, the interval counter is positive which means we are waiting 313 | // for a message playback. In this case we must not allow the CPU to enter sleep mode. 314 | 315 | yackpower(FALSE); // Inhibit sleep mode 316 | 317 | #endif 318 | 319 | if (timer) timer--; // Countdown until a second has expired 320 | else 321 | { 322 | timer = YACKSECS(1); // Reset timer 323 | 324 | if ((--interval)==0) // Interval was > 0. Did decrement bring it to 0? 325 | { 326 | 327 | interval = yackuser(READ, 1, 0); // Reset the interval timer 328 | yackmessage(PLAY,2); // And play message 2 329 | 330 | 331 | } 332 | 333 | } 334 | 335 | } 336 | 337 | } 338 | 339 | 340 | 341 | 342 | void commandmode(void) 343 | /*! 344 | @brief Command mode 345 | 346 | This routine implements command mode. Entries are read from the paddle 347 | and interpreted as commands. 348 | 349 | */ 350 | { 351 | 352 | char c; // Character from Morse key 353 | word timer; // Exit timer 354 | 355 | yackinhibit(ON); // Sidetone = on, Keyer = off 356 | 357 | yackchar('?'); // Play Greeting 358 | 359 | timer = YACKSECS(DEFTIMEOUT); // Time out after 10 seconds 360 | 361 | while ((yackctrlkey(TRUE)==0) && (timer-- > 0)) 362 | { 363 | 364 | c=yackiambic(OFF); 365 | if (c) timer = YACKSECS(DEFTIMEOUT); // Reset timeout if character read 366 | 367 | yackbeat(); 368 | 369 | lfsr(255); // Keep seeding the LFSR so we get different callsigns 370 | 371 | if (!yackflag(CONFLOCK)) // No Configuration lock? 372 | { 373 | switch (c) // These are the lockable configuration commands 374 | { 375 | 376 | case 'R': // Reset 377 | yackreset(); 378 | c = TRUE; 379 | break; 380 | 381 | case 'A': // IAMBIC A 382 | yackmode(IAMBICA); 383 | c = TRUE; 384 | break; 385 | 386 | case 'B': // IAMBIC B 387 | yackmode(IAMBICB); 388 | c = TRUE; 389 | break; 390 | 391 | case 'L': // ULTIMATIC 392 | yackmode(ULTIMATIC); 393 | c = TRUE; 394 | break; 395 | 396 | case 'D': // DAHPRIO 397 | yackmode(DAHPRIO); 398 | c = TRUE; 399 | break; 400 | 401 | case 'X': // Paddle swapping 402 | yacktoggle(PDLSWAP); 403 | c = TRUE; 404 | break; 405 | 406 | case 'S': // Sidetone toggle 407 | yacktoggle(SIDETONE); 408 | c = TRUE; 409 | break; 410 | 411 | case 'K': // TX keying toggle 412 | yacktoggle(TXKEY); 413 | c = TRUE; 414 | break; 415 | 416 | case 'Z': // Farnsworth pause 417 | setfarns(); 418 | c = TRUE; 419 | break; 420 | 421 | case 'I': // TX level inverter toggle 422 | yacktoggle(TXINV); 423 | c = TRUE; 424 | break; 425 | 426 | case '1': // Record Macro 1 427 | yackchar('1'); 428 | yackmessage(RECORD,1); 429 | c = TRUE; 430 | break; 431 | 432 | case '2': // Record Macro 2 433 | yackchar('2'); 434 | yackmessage(RECORD,2); 435 | c = TRUE; 436 | break; 437 | 438 | case 'N': // Automatic Beacon 439 | beacon(RECORD); 440 | c = TRUE; 441 | break; 442 | 443 | } 444 | 445 | } 446 | 447 | switch (c) // Commands that can be used anytime 448 | { 449 | 450 | case 'V': // Version 451 | yackstring(vers); 452 | c = TRUE; 453 | break; 454 | 455 | 456 | case 'P': // Pitch 457 | pitch(); 458 | c = TRUE; 459 | break; 460 | 461 | case 'U': // Tune 462 | yackinhibit(OFF); 463 | yacktune(); 464 | yackinhibit(ON); 465 | c = TRUE; 466 | break; 467 | 468 | case 'C': // Callsign training 469 | cstrain(); 470 | c = TRUE; 471 | break; 472 | 473 | case '0': // Lock changes 474 | yacktoggle(CONFLOCK); 475 | c = TRUE; 476 | break; 477 | 478 | case 'E': // Playback Macro 1 479 | yackinhibit(OFF); 480 | yackmessage(PLAY,1); 481 | yackinhibit(ON); 482 | timer = YACKSECS(MACTIMEOUT); 483 | c = FALSE; 484 | break; 485 | 486 | case 'T': // Playback Macro 2 487 | yackinhibit(OFF); 488 | yackmessage(PLAY,2); 489 | yackinhibit(ON); 490 | timer = YACKSECS(MACTIMEOUT); 491 | c = FALSE; 492 | break; 493 | 494 | case 'N': // Automatic Beacon 495 | beacon(RECORD); 496 | c = TRUE; 497 | break; 498 | 499 | case 'W': // Query WPM 500 | yacknumber(yackwpm()); 501 | c = TRUE; 502 | break; 503 | 504 | 505 | } 506 | 507 | if (c == TRUE) // If c still contains a string, the command was not handled properly 508 | yackstring(txok); 509 | else if (c) 510 | yackerror(); 511 | 512 | 513 | } 514 | 515 | 516 | yackstring(prgx); // Sign off 517 | 518 | yackinhibit(OFF); // Back to normal mode 519 | 520 | } 521 | 522 | 523 | 524 | int main(void) 525 | /*! 526 | @brief Trivial main routine 527 | 528 | Yack library is initialized, command mode is entered on request and both 529 | beacon and keyer routines are called in 10 ms intervals. 530 | 531 | @return Not relevant 532 | */ 533 | { 534 | 535 | yackinit(); // Initialize YACK hardware 536 | 537 | yackinhibit(ON); //side tone greeting to confirm the unit is alive and kicking 538 | yackstring(imok); 539 | yackinhibit(OFF); 540 | 541 | while(1) // Endless core loop of the keyer app 542 | { 543 | 544 | if (yackctrlkey(TRUE)) // If command key pressed, go to command mode 545 | commandmode(); 546 | 547 | yackbeat(); 548 | beacon(PLAY); // Play beacon if requested 549 | yackiambic(OFF); 550 | 551 | } 552 | 553 | return 0; 554 | } 555 | 556 | 557 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Hey Emacs, this is a -*- makefile -*- 2 | #---------------------------------------------------------------------------- 3 | # 4 | #---------------------------------------------------------------------------- 5 | # On command line: 6 | # 7 | # make all = Make software. 8 | # 9 | # make clean = Clean out built project files. 10 | # 11 | # make coff = Convert ELF to AVR COFF. 12 | # 13 | # make extcoff = Convert ELF to AVR Extended COFF. 14 | # 15 | # make program = Download the hex file to the device, using avrdude. 16 | # Please customize the avrdude settings below first! 17 | # 18 | # make debug = Start either simulavr or avarice as specified for debugging, 19 | # with avr-gdb or avr-insight as the front end for debugging. 20 | # 21 | # make filename.s = Just compile filename.c into the assembler code only. 22 | # 23 | # make filename.i = Create a preprocessed source file for use in submitting 24 | # bug reports to the GCC project. 25 | # 26 | # To rebuild project do "make clean" then "make all". 27 | #---------------------------------------------------------------------------- 28 | 29 | 30 | MCU=attiny45 31 | ADMCU=t45 32 | 33 | 34 | # Processor frequency. 35 | # This will define a symbol, F_CPU, in all source code files equal to the 36 | # processor frequency. You can then use this symbol in your source code to 37 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done 38 | # automatically to create a 32-bit value in your source code. 39 | # Typical values are: 40 | # F_CPU = 1000000 41 | # F_CPU = 1843200 42 | # F_CPU = 2000000 43 | # F_CPU = 3686400 44 | # F_CPU = 4000000 45 | # F_CPU = 7372800 46 | # F_CPU = 8000000 47 | # F_CPU = 11059200 48 | # F_CPU = 14745600 49 | # F_CPU = 16000000 50 | # F_CPU = 18432000 51 | # F_CPU = 20000000 52 | F_CPU = 1000000 53 | 54 | 55 | # Output format. (can be srec, ihex, binary) 56 | FORMAT = ihex 57 | 58 | 59 | # Target file name (without extension). 60 | TARGET = main 61 | 62 | 63 | # Object files directory 64 | # To put object files in current directory, use a dot (.), do NOT make 65 | # this an empty or blank macro! 66 | OBJDIR = . 67 | 68 | 69 | # List C source files here. (C dependencies are automatically generated.) 70 | SRC += $(TARGET).c yack.c 71 | 72 | # List C++ source files here. (C dependencies are automatically generated.) 73 | CPPSRC = 74 | 75 | 76 | # List Assembler source files here. 77 | # Make them always end in a capital .S. Files ending in a lowercase .s 78 | # will not be considered source files but generated files (assembler 79 | # output from the compiler), and will be deleted upon "make clean"! 80 | # Even though the DOS/Win* filesystem matches both .s and .S the same, 81 | # it will preserve the spelling of the filenames, and gcc itself does 82 | # care about how the name is spelled on its command-line. 83 | ASRC = 84 | 85 | 86 | # Optimization level, can be [0, 1, 2, 3, s]. 87 | # 0 = turn off optimization. s = optimize for size. 88 | # (Note: 3 is not always the best optimization level. See avr-libc FAQ.) 89 | OPT = s 90 | 91 | 92 | # Debugging format. 93 | # Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs. 94 | # AVR Studio 4.10 requires dwarf-2. 95 | # AVR [Extended] COFF format requires stabs, plus an avr-objcopy run. 96 | DEBUG = stabs 97 | 98 | 99 | # List any extra directories to look for include files here. 100 | # Each directory must be seperated by a space. 101 | # Use forward slashes for directory separators. 102 | # For a directory that has spaces, enclose it in quotes. 103 | EXTRAINCDIRS = 104 | 105 | 106 | # Compiler flag to set the C Standard level. 107 | # c89 = "ANSI" C 108 | # gnu89 = c89 plus GCC extensions 109 | # c99 = ISO C99 standard (not yet fully implemented) 110 | # gnu99 = c99 plus GCC extensions 111 | CSTANDARD = -std=gnu99 112 | 113 | 114 | # Place -D or -U options here for C sources 115 | CDEFS = -DF_CPU=$(F_CPU)UL 116 | 117 | 118 | # Place -D or -U options here for C++ sources 119 | CPPDEFS = -DF_CPU=$(F_CPU)UL 120 | #CPPDEFS += -D__STDC_LIMIT_MACROS 121 | #CPPDEFS += -D__STDC_CONSTANT_MACROS 122 | 123 | 124 | 125 | #---------------- Compiler Options C ---------------- 126 | # -g*: generate debugging information 127 | # -O*: optimization level 128 | # -f...: tuning, see GCC manual and avr-libc documentation 129 | # -Wall...: warning level 130 | # -Wa,...: tell GCC to pass this to the assembler. 131 | # -adhlns...: create assembler listing 132 | CFLAGS = -g$(DEBUG) 133 | CFLAGS += $(CDEFS) 134 | CFLAGS += -O$(OPT) 135 | CFLAGS += -funsigned-char 136 | CFLAGS += -funsigned-bitfields 137 | CFLAGS += -fpack-struct 138 | CFLAGS += -fshort-enums 139 | CFLAGS += -Wall 140 | CFLAGS += -Wstrict-prototypes 141 | #CFLAGS += -mshort-calls 142 | #CFLAGS += -fno-unit-at-a-time 143 | #CFLAGS += -Wundef 144 | #CFLAGS += -Wunreachable-code 145 | #CFLAGS += -Wsign-compare 146 | CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst) 147 | CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) 148 | CFLAGS += $(CSTANDARD) 149 | 150 | 151 | #---------------- Compiler Options C++ ---------------- 152 | # -g*: generate debugging information 153 | # -O*: optimization level 154 | # -f...: tuning, see GCC manual and avr-libc documentation 155 | # -Wall...: warning level 156 | # -Wa,...: tell GCC to pass this to the assembler. 157 | # -adhlns...: create assembler listing 158 | CPPFLAGS = -g$(DEBUG) 159 | CPPFLAGS += $(CPPDEFS) 160 | CPPFLAGS += -O$(OPT) 161 | CPPFLAGS += -funsigned-char 162 | CPPFLAGS += -funsigned-bitfields 163 | CPPFLAGS += -fpack-struct 164 | CPPFLAGS += -fshort-enums 165 | CPPFLAGS += -fno-exceptions 166 | CPPFLAGS += -Wall 167 | CFLAGS += -Wundef 168 | #CPPFLAGS += -mshort-calls 169 | #CPPFLAGS += -fno-unit-at-a-time 170 | #CPPFLAGS += -Wstrict-prototypes 171 | #CPPFLAGS += -Wunreachable-code 172 | #CPPFLAGS += -Wsign-compare 173 | CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst) 174 | CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) 175 | #CPPFLAGS += $(CSTANDARD) 176 | 177 | 178 | #---------------- Assembler Options ---------------- 179 | # -Wa,...: tell GCC to pass this to the assembler. 180 | # -ahlms: create listing 181 | # -gstabs: have the assembler create line number information; note that 182 | # for use in COFF files, additional information about filenames 183 | # and function names needs to be present in the assembler source 184 | # files -- see avr-libc docs [FIXME: not yet described there] 185 | # -listing-cont-lines: Sets the maximum number of continuation lines of hex 186 | # dump that will be displayed for a given single line of source input. 187 | ASFLAGS = -Wa,-adhlns=$(<:.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100 188 | 189 | 190 | #---------------- Library Options ---------------- 191 | # Minimalistic printf version 192 | PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min 193 | 194 | # Floating point printf version (requires MATH_LIB = -lm below) 195 | PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt 196 | 197 | # If this is left blank, then it will use the Standard printf version. 198 | PRINTF_LIB = 199 | #PRINTF_LIB = $(PRINTF_LIB_MIN) 200 | #PRINTF_LIB = $(PRINTF_LIB_FLOAT) 201 | 202 | 203 | # Minimalistic scanf version 204 | SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min 205 | 206 | # Floating point + %[ scanf version (requires MATH_LIB = -lm below) 207 | SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt 208 | 209 | # If this is left blank, then it will use the Standard scanf version. 210 | SCANF_LIB = 211 | #SCANF_LIB = $(SCANF_LIB_MIN) 212 | #SCANF_LIB = $(SCANF_LIB_FLOAT) 213 | 214 | 215 | MATH_LIB = -lm 216 | 217 | 218 | # List any extra directories to look for libraries here. 219 | # Each directory must be seperated by a space. 220 | # Use forward slashes for directory separators. 221 | # For a directory that has spaces, enclose it in quotes. 222 | EXTRALIBDIRS = 223 | 224 | 225 | 226 | #---------------- External Memory Options ---------------- 227 | 228 | # 64 KB of external RAM, starting after internal RAM (ATmega128!), 229 | # used for variables (.data/.bss) and heap (malloc()). 230 | #EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff 231 | 232 | # 64 KB of external RAM, starting after internal RAM (ATmega128!), 233 | # only used for heap (malloc()). 234 | #EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff 235 | 236 | EXTMEMOPTS = 237 | 238 | 239 | 240 | #---------------- Linker Options ---------------- 241 | # -Wl,...: tell GCC to pass this to linker. 242 | # -Map: create map file 243 | # --cref: add cross reference to map file 244 | LDFLAGS = -Wl,-Map=$(TARGET).map,--cref 245 | LDFLAGS += $(EXTMEMOPTS) 246 | LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS)) 247 | LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB) 248 | #LDFLAGS += -T linker_script.x 249 | 250 | 251 | 252 | #---------------- Programming Options (avrdude) ---------------- 253 | 254 | # Programming hardware: alf avr910 avrisp bascom bsd 255 | # dt006 pavr picoweb pony-stk200 sp12 stk200 stk500 256 | # 257 | # Type: avrdude -c ? 258 | # to get a full listing. 259 | # 260 | AVRDUDE_PROGRAMMER = avrisp 261 | 262 | AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex 263 | AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep 264 | 265 | 266 | # Uncomment the following if you want avrdude's erase cycle counter. 267 | # Note that this counter needs to be initialized first using -Yn, 268 | # see avrdude manual. 269 | #AVRDUDE_ERASE_COUNTER = -y 270 | 271 | # Uncomment the following if you do /not/ wish a verification to be 272 | # performed after programming the device. 273 | #AVRDUDE_NO_VERIFY = -V 274 | 275 | # Increase verbosity level. Please use this when submitting bug 276 | # reports about avrdude. See 277 | # to submit bug reports. 278 | #AVRDUDE_VERBOSE = -v -v 279 | 280 | AVRDUDE_FLAGS = -p $(ADMCU) -c $(AVRDUDE_PROGRAMMER) 281 | AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY) 282 | AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE) 283 | AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER) 284 | AVRDUDE_FLAGS += -P /dev/cu.usbserial-A9007MkN 285 | AVRDUDE_FLAGS += -b 19200 286 | 287 | 288 | #---------------- Debugging Options ---------------- 289 | 290 | # For simulavr only - target MCU frequency. 291 | DEBUG_MFREQ = $(F_CPU) 292 | 293 | # Set the DEBUG_UI to either gdb or insight. 294 | # DEBUG_UI = gdb 295 | DEBUG_UI = insight 296 | 297 | # Set the debugging back-end to either avarice, simulavr. 298 | DEBUG_BACKEND = avarice 299 | #DEBUG_BACKEND = simulavr 300 | 301 | # GDB Init Filename. 302 | GDBINIT_FILE = __avr_gdbinit 303 | 304 | # When using avarice settings for the JTAG 305 | JTAG_DEV = /dev/com1 306 | 307 | # Debugging port used to communicate between GDB / avarice / simulavr. 308 | DEBUG_PORT = 4242 309 | 310 | # Debugging host used to communicate between GDB / avarice / simulavr, normally 311 | # just set to localhost unless doing some sort of crazy debugging when 312 | # avarice is running on a different computer. 313 | DEBUG_HOST = localhost 314 | 315 | 316 | 317 | #============================================================================ 318 | 319 | 320 | # Define programs and commands. 321 | SHELL = sh 322 | CC = avr-gcc 323 | OBJCOPY = avr-objcopy 324 | OBJDUMP = avr-objdump 325 | SIZE = avr-size 326 | AR = avr-ar rcs 327 | NM = avr-nm 328 | AVRDUDE = avrdude 329 | REMOVE = rm -f 330 | REMOVEDIR = rm -rf 331 | COPY = cp 332 | WINSHELL = cmd 333 | 334 | 335 | # Define Messages 336 | # English 337 | MSG_ERRORS_NONE = Errors: none 338 | MSG_BEGIN = -------- begin -------- 339 | MSG_END = -------- end -------- 340 | MSG_SIZE_BEFORE = Size before: 341 | MSG_SIZE_AFTER = Size after: 342 | MSG_COFF = Converting to AVR COFF: 343 | MSG_EXTENDED_COFF = Converting to AVR Extended COFF: 344 | MSG_FLASH = Creating load file for Flash: 345 | MSG_EEPROM = Creating load file for EEPROM: 346 | MSG_EXTENDED_LISTING = Creating Extended Listing: 347 | MSG_SYMBOL_TABLE = Creating Symbol Table: 348 | MSG_LINKING = Linking: 349 | MSG_COMPILING = Compiling C: 350 | MSG_COMPILING_CPP = Compiling C++: 351 | MSG_ASSEMBLING = Assembling: 352 | MSG_CLEANING = Cleaning project: 353 | MSG_CREATING_LIBRARY = Creating library: 354 | 355 | 356 | 357 | 358 | # Define all object files. 359 | OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) 360 | 361 | # Define all listing files. 362 | LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) 363 | 364 | 365 | # Compiler flags to generate dependency files. 366 | GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d 367 | 368 | 369 | # Combine all necessary flags and optional flags. 370 | # Add target processor to flags. 371 | ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS) 372 | ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS) 373 | ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) 374 | 375 | 376 | # Default target. 377 | all: begin gccversion sizebefore build sizeafter end 378 | 379 | # Change the build target to build a HEX file or a library. 380 | build: elf hex eep lss sym extcoff 381 | #build: lib 382 | 383 | 384 | elf: $(TARGET).elf 385 | hex: $(TARGET).hex 386 | eep: $(TARGET).eep 387 | lss: $(TARGET).lss 388 | sym: $(TARGET).sym 389 | LIBNAME=lib$(TARGET).a 390 | lib: $(LIBNAME) 391 | 392 | 393 | 394 | # Eye candy. 395 | # AVR Studio 3.x does not check make's exit code but relies on 396 | # the following magic strings to be generated by the compile job. 397 | begin: 398 | @echo 399 | @echo $(MSG_BEGIN) 400 | 401 | end: 402 | @echo $(MSG_END) 403 | @echo 404 | 405 | 406 | # Display size of file. 407 | HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex 408 | ELFSIZE = $(SIZE) --format=avr $(TARGET).elf 409 | 410 | sizebefore: 411 | @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \ 412 | 2>/dev/null; echo; fi 413 | 414 | sizeafter: 415 | @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \ 416 | 2>/dev/null; echo; fi 417 | 418 | 419 | 420 | # Display compiler version information. 421 | gccversion : 422 | @$(CC) --version 423 | 424 | 425 | 426 | # Program the device. 427 | program: $(TARGET).hex $(TARGET).eep 428 | $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) 429 | 430 | 431 | # Generate avr-gdb config/init file which does the following: 432 | # define the reset signal, load the target file, connect to target, and set 433 | # a breakpoint at main(). 434 | gdb-config: 435 | @$(REMOVE) $(GDBINIT_FILE) 436 | @echo define reset >> $(GDBINIT_FILE) 437 | @echo SIGNAL SIGHUP >> $(GDBINIT_FILE) 438 | @echo end >> $(GDBINIT_FILE) 439 | @echo file $(TARGET).elf >> $(GDBINIT_FILE) 440 | @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE) 441 | ifeq ($(DEBUG_BACKEND),simulavr) 442 | @echo load >> $(GDBINIT_FILE) 443 | endif 444 | @echo break main >> $(GDBINIT_FILE) 445 | 446 | debug: gdb-config $(TARGET).elf 447 | ifeq ($(DEBUG_BACKEND), avarice) 448 | @echo Starting AVaRICE - Press enter when "waiting to connect" message displays. 449 | @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \ 450 | $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT) 451 | @$(WINSHELL) /c pause 452 | 453 | else 454 | @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \ 455 | $(DEBUG_MFREQ) --port $(DEBUG_PORT) 456 | endif 457 | @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE) 458 | 459 | 460 | 461 | 462 | # Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB. 463 | COFFCONVERT = $(OBJCOPY) --debugging 464 | COFFCONVERT += --change-section-address .data-0x800000 465 | COFFCONVERT += --change-section-address .bss-0x800000 466 | COFFCONVERT += --change-section-address .noinit-0x800000 467 | COFFCONVERT += --change-section-address .eeprom-0x810000 468 | 469 | 470 | 471 | coff: $(TARGET).elf 472 | @echo 473 | @echo $(MSG_COFF) $(TARGET).cof 474 | $(COFFCONVERT) -O coff-avr $< $(TARGET).cof 475 | 476 | 477 | extcoff: $(TARGET).elf 478 | @echo 479 | @echo $(MSG_EXTENDED_COFF) $(TARGET).cof 480 | $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof 481 | 482 | 483 | 484 | # Create final output files (.hex, .eep) from ELF output file. 485 | %.hex: %.elf 486 | @echo 487 | @echo $(MSG_FLASH) $@ 488 | $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@ 489 | 490 | %.eep: %.elf 491 | @echo 492 | @echo $(MSG_EEPROM) $@ 493 | -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ 494 | --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0 495 | 496 | # Create extended listing file from ELF output file. 497 | %.lss: %.elf 498 | @echo 499 | @echo $(MSG_EXTENDED_LISTING) $@ 500 | $(OBJDUMP) -h -S $< > $@ 501 | 502 | # Create a symbol table from ELF output file. 503 | %.sym: %.elf 504 | @echo 505 | @echo $(MSG_SYMBOL_TABLE) $@ 506 | $(NM) -n $< > $@ 507 | 508 | 509 | 510 | # Create library from object files. 511 | .SECONDARY : $(TARGET).a 512 | .PRECIOUS : $(OBJ) 513 | %.a: $(OBJ) 514 | @echo 515 | @echo $(MSG_CREATING_LIBRARY) $@ 516 | $(AR) $@ $(OBJ) 517 | 518 | 519 | # Link: create ELF output file from object files. 520 | .SECONDARY : $(TARGET).elf 521 | .PRECIOUS : $(OBJ) 522 | %.elf: $(OBJ) 523 | @echo 524 | @echo $(MSG_LINKING) $@ 525 | $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS) 526 | 527 | 528 | # Compile: create object files from C source files. 529 | $(OBJDIR)/%.o : %.c 530 | @echo 531 | @echo $(MSG_COMPILING) $< 532 | $(CC) -c $(ALL_CFLAGS) $< -o $@ 533 | 534 | 535 | # Compile: create object files from C++ source files. 536 | $(OBJDIR)/%.o : %.cpp 537 | @echo 538 | @echo $(MSG_COMPILING_CPP) $< 539 | $(CC) -c $(ALL_CPPFLAGS) $< -o $@ 540 | 541 | 542 | # Compile: create assembler files from C source files. 543 | %.s : %.c 544 | $(CC) -S $(ALL_CFLAGS) $< -o $@ 545 | 546 | 547 | # Compile: create assembler files from C++ source files. 548 | %.s : %.cpp 549 | $(CC) -S $(ALL_CPPFLAGS) $< -o $@ 550 | 551 | 552 | # Assemble: create object files from assembler source files. 553 | $(OBJDIR)/%.o : %.S 554 | @echo 555 | @echo $(MSG_ASSEMBLING) $< 556 | $(CC) -c $(ALL_ASFLAGS) $< -o $@ 557 | 558 | 559 | # Create preprocessed source for use in sending a bug report. 560 | %.i : %.c 561 | $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ 562 | 563 | 564 | # Target: clean project. 565 | clean: begin clean_list end 566 | 567 | clean_list : 568 | @echo 569 | @echo $(MSG_CLEANING) 570 | $(REMOVE) $(TARGET).hex 571 | $(REMOVE) $(TARGET).eep 572 | $(REMOVE) $(TARGET).cof 573 | $(REMOVE) $(TARGET).elf 574 | $(REMOVE) $(TARGET).map 575 | $(REMOVE) $(TARGET).sym 576 | $(REMOVE) $(TARGET).lss 577 | $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) 578 | $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) 579 | $(REMOVE) $(SRC:.c=.s) 580 | $(REMOVE) $(SRC:.c=.d) 581 | $(REMOVE) $(SRC:.c=.i) 582 | $(REMOVEDIR) .dep 583 | 584 | 585 | # Create object files directory 586 | $(shell mkdir $(OBJDIR) 2>/dev/null) 587 | 588 | 589 | # Include the dependency files. 590 | -include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*) 591 | 592 | 593 | # Listing of phony targets. 594 | .PHONY : all begin finish end sizebefore sizeafter gccversion \ 595 | build elf hex eep lss sym coff extcoff \ 596 | clean clean_list program debug gdb-config 597 | 598 | 599 | 600 | 601 | 602 | -------------------------------------------------------------------------------- /yack.c: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | @file yack.c 4 | @brief CW Keyer library 5 | @author Jan Lategahn DK3LJ jan@lategahn.com (C) 2011; modified by Jack Welch AI4SV 6 | 7 | @version 0.75 8 | 9 | This program is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with this program. If not, see . 21 | 22 | @date 15.10.2010 - Created 23 | @date 03.10.2013 - Last update 24 | 25 | @todo Make the delay dependent on T/C 1 26 | 27 | */ 28 | 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include "yack.h" 38 | 39 | // Forward declaration of private functions 40 | static void key( byte mode); 41 | static char morsechar(byte buffer); 42 | static void keylatch(void); 43 | 44 | // Enumerations 45 | 46 | enum FSMSTATE { 47 | IDLE, //!< Not keyed, waiting for paddle 48 | KEYED, //!< Keyed, waiting for duration of current element 49 | IEG //!< In Inter-Element-Gap 50 | }; 51 | 52 | // Module local definitions 53 | 54 | static byte yackflags; // Permanent (stored) status of module flags 55 | static byte volflags=0; // Temporary working flags (volatile) 56 | static word ctcvalue; // Pitch 57 | static word wpmcnt; // Speed 58 | static byte wpm; // Real wpm 59 | static byte farnsworth; // Additional Farnsworth pause 60 | 61 | // EEPROM Data 62 | 63 | byte magic EEMEM = MAGPAT; // Needs to contain 'A5' if mem is valid 64 | byte flagstor EEMEM = ( IAMBICA | TXKEY | SIDETONE); // Defaults 65 | word ctcstor EEMEM = DEFCTC; // Pitch = 700Hz 66 | byte wpmstor EEMEM = DEFWPM; // 15 WPM 67 | byte fwstor EEMEM = 0; // No farnsworth pause 68 | word user1 EEMEM = 0; // User storage 69 | word user2 EEMEM = 0; // User storage 70 | 71 | char eebuffer1[100] EEMEM = "message 1"; 72 | char eebuffer2[100] EEMEM = "message 2"; 73 | 74 | // Flash data 75 | 76 | //! Morse code table in Flash 77 | 78 | //! Encoding: Each byte is read from the left. 0 stands for a dot, 1 79 | //! stands for a dash. After each played element the content is shifted 80 | //! left. Playback stops when the leftmost bit contains a "1" and the rest 81 | //! of the bits are all zero. 82 | //! 83 | //! Example: A = .- 84 | //! Encoding: 01100000 85 | //! .- 86 | //! | This is the stop marker (1 with all trailing zeros) 87 | 88 | const byte morse[] PROGMEM = 89 | { 90 | 91 | 0b11111100, // 0 92 | 0b01111100, // 1 93 | 0b00111100, // 2 94 | 0b00011100, // 3 95 | 0b00001100, // 4 96 | 0b00000100, // 5 97 | 0b10000100, // 6 98 | 0b11000100, // 7 99 | 0b11100100, // 8 100 | 0b11110100, // 9 101 | 0b01100000, // A 102 | 0b10001000, // B 103 | 0b10101000, // C 104 | 0b10010000, // D 105 | 0b01000000, // E 106 | 0b00101000, // F 107 | 0b11010000, // G 108 | 0b00001000, // H 109 | 0b00100000, // I 110 | 0b01111000, // J 111 | 0b10110000, // K 112 | 0b01001000, // L 113 | 0b11100000, // M 114 | 0b10100000, // N 115 | 0b11110000, // O 116 | 0b01101000, // P 117 | 0b11011000, // Q 118 | 0b01010000, // R 119 | 0b00010000, // S 120 | 0b11000000, // T 121 | 0b00110000, // U 122 | 0b00011000, // V 123 | 0b01110000, // W 124 | 0b10011000, // X 125 | 0b10111000, // Y 126 | 0b11001000, // Z 127 | 0b00110010, // ? 128 | 0b10001100, // = 129 | 0b01010110, // . 130 | 0b00010110, // SK 131 | 0b01010100, // AR 132 | 0b10010100 // / 133 | 134 | }; 135 | 136 | 137 | // The special characters at the end of the above table can not be decoded 138 | // without a small table to define their content. # stands for SK, $ for AR 139 | 140 | // To add new characters, add them in the code table above at the end and below 141 | // Do not forget to increase the legth of the array.. 142 | 143 | const char spechar[6] PROGMEM = "?=.#$/"; 144 | 145 | 146 | 147 | // Functions 148 | 149 | // *************************************************************************** 150 | // Control functions 151 | // *************************************************************************** 152 | 153 | void yackreset (void) 154 | /*! 155 | @brief Sets all yack parameters to standard values 156 | 157 | This function resets all YACK EEPROM settings to their default values as 158 | stored in the .h file. It sets the dirty flag and calls the save routine 159 | to write the data into EEPROM immediately. 160 | */ 161 | { 162 | 163 | ctcvalue=DEFCTC; // Initialize to 700 Hz 164 | wpm=DEFWPM; // Init to default speed 165 | wpmcnt=(1200/YACKBEAT)/DEFWPM; // default speed 166 | farnsworth=0; // No Farnsworth gap 167 | yackflags = FLAGDEFAULT; 168 | 169 | volflags |= DIRTYFLAG; 170 | yacksave(); // Store them in EEPROM 171 | 172 | } 173 | 174 | 175 | void yackinit (void) 176 | /*! 177 | @brief Initializes the YACK library 178 | 179 | This function initializes the keyer hardware according to configurations in the .h file. 180 | Then it attempts to read saved configuration settings from EEPROM. If not possible, it 181 | will reset all values to their defaults. 182 | This function must be called once before the remaining fuctions can be used. 183 | */ 184 | { 185 | 186 | byte magval; 187 | 188 | // Configure DDR. Make OUT and ST output ports 189 | SETBIT (OUTDDR,OUTPIN); 190 | SETBIT (STDDR,STPIN); 191 | 192 | // Raise internal pullups for all inputs 193 | SETBIT (KEYPORT,DITPIN); 194 | SETBIT (KEYPORT,DAHPIN); 195 | SETBIT (BTNPORT,BTNPIN); 196 | 197 | magval = eeprom_read_byte(&magic); // Retrieve magic value 198 | 199 | if (magval == MAGPAT) // Is memory valid 200 | { 201 | ctcvalue = eeprom_read_word(&ctcstor); // Retrieve last ctc setting 202 | wpm = eeprom_read_byte(&wpmstor); // Retrieve last wpm setting 203 | wpmcnt=(1200/YACKBEAT)/wpm; // Calculate speed 204 | farnsworth = eeprom_read_byte(&fwstor); // Retrieve last wpm setting 205 | yackflags = eeprom_read_byte(&flagstor); // Retrieve last flags 206 | } 207 | else 208 | { 209 | yackreset(); 210 | } 211 | 212 | yackinhibit(OFF); 213 | 214 | #ifdef POWERSAVE 215 | 216 | PCMSK |= PWRWAKE; // Define which keys wake us up 217 | GIMSK |= (1< 0)) 423 | farnsworth--; 424 | 425 | if ((dir == DOWN) && (farnsworth < MAXFARN)) 426 | farnsworth++; 427 | } 428 | else // WPMSPEED 429 | { 430 | if ((dir == UP) && (wpm < MAXWPM)) 431 | wpm++; 432 | 433 | if ((dir == DOWN) && (wpm > MINWPM)) 434 | wpm--; 435 | 436 | wpmcnt=(1200/YACKBEAT)/wpm; // Calculate beats 437 | 438 | } 439 | 440 | volflags |= DIRTYFLAG; // Set the dirty flag 441 | 442 | yackplay(DIT); 443 | yackdelay(IEGLEN); // Inter Element gap 444 | yackplay(DAH); 445 | yackdelay(ICGLEN); // Inter Character gap 446 | yackfarns(); // Additional Farnsworth delay 447 | 448 | } 449 | 450 | 451 | 452 | void yackbeat (void) 453 | /*! 454 | @brief Heartbeat delay 455 | 456 | Several functions in the keyer are timing dependent. The most prominent example is the 457 | yackiambic function that implements the IAMBIC keyer finite state machine. 458 | The same expects to be called in intervals of YACKBEAT milliseconds. How this is 459 | implemented is left to the user. In a more complex application this would be done 460 | using an interrupt or a timer. For simpler cases this is a busy wait routine 461 | that delays exactly YACKBEAT ms. 462 | 463 | */ 464 | { 465 | while((TIFR & (1< MINCTC) 491 | ctcvalue = MINCTC; 492 | 493 | volflags |= DIRTYFLAG; // Set the dirty flag 494 | 495 | } 496 | 497 | 498 | 499 | 500 | void yacktune (void) 501 | /*! 502 | @brief Activates Tuning mode 503 | 504 | This produces a solid keydown for TUNEDURATION seconds. After this the TX is unkeyed. 505 | The same can be achieved by presing either the DIT or the DAH contact or the control key. 506 | 507 | */ 508 | { 509 | word timer = YACKSECS(TUNEDURATION); 510 | 511 | key(DOWN); 512 | 513 | while(timer && (KEYINP & (1<0 if flag(s) were set 552 | 553 | */ 554 | { 555 | return yackflags & flag; 556 | } 557 | 558 | 559 | 560 | void yacktoggle(byte flag) 561 | /*! 562 | @brief Toggle feature flags 563 | 564 | When passed one (or more) flags, this routine flips the according bit in yackflags and 565 | thereby enables or disables the corresponding feature. 566 | 567 | @param flag A byte where any bit to toggle is set e.g. SIDETONE 568 | @return TRUE if all was OK, FALSE if configuration lock prevented changes 569 | 570 | */ 571 | { 572 | 573 | yackflags ^= flag; // Toggle the feature bit 574 | volflags |= DIRTYFLAG; // Set the dirty flag 575 | 576 | } 577 | 578 | 579 | 580 | 581 | void yackerror (void) 582 | /*! 583 | @brief Creates a series of 8 dits 584 | 585 | The error prosign (8 dits) can not be encoded in our coding table. A call to this 586 | function produces it.. 587 | 588 | */ 589 | { 590 | byte i; 591 | 592 | for (i=0;i<8;i++) 593 | { 594 | yackplay(DIT); 595 | yackdelay(DITLEN); 596 | } 597 | yackdelay(DAHLEN); 598 | 599 | } 600 | 601 | 602 | 603 | 604 | // *************************************************************************** 605 | // CW Playback related functions 606 | // *************************************************************************** 607 | 608 | static void key(byte mode) 609 | /*! 610 | @brief Keys the transmitter and produces a sidetone 611 | 612 | .. but only if the corresponding functions (TXKEY and SIDETONE) have been set in 613 | the feature register. This function also handles a request to invert the keyer line 614 | if necessary (TXINV bit). 615 | 616 | This is a private function. 617 | 618 | @param mode UP or DOWN 619 | 620 | */ 621 | { 622 | 623 | if (mode == DOWN) 624 | { 625 | if (volflags & SIDETONE) // Are we generating a Sidetone? 626 | { 627 | OCR0A = ctcvalue; // Then switch on the Sidetone generator 628 | OCR0B = ctcvalue; 629 | 630 | // Activate CTC mode 631 | TCCR0A |= (1<='0' && c<='9') // Is it a numerical digit? 773 | code = pgm_read_byte(&morse[c-'0']); // Find it in the beginning of array 774 | 775 | if(c>='a' && c<='z') // Is it a character? 776 | code = pgm_read_byte(&morse[c-'a'+10]); // Find it from position 10 777 | 778 | if(c>='A' && c<='Z') // Is it a character in upper case? 779 | code = pgm_read_byte(&morse[c-'A'+10]); // Same as above 780 | 781 | // Last we need to handle special characters. There is a small char 782 | // array "spechar" which contains the characters for the morse elements 783 | // at the end of the "morse" array (see there!) 784 | for(i=0;i=RBSIZE) // End of buffer reached? 1054 | { 1055 | yackerror(); 1056 | i = 0; 1057 | } 1058 | 1059 | yackbeat(); // 10 ms heartbeat 1060 | } 1061 | 1062 | // Extimer has expired. Message has ended 1063 | 1064 | if(i) // Was anything received at all? 1065 | { 1066 | rambuffer[--i] = 0; // Add a \0 end marker over last space 1067 | 1068 | // Replay the message 1069 | for (n=0;n 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | <h3>SparkFun Electronics' preferred foot prints</h3> 123 | We've spent an enormous amount of time creating and checking these footprints and parts. If you enjoy using this library, please buy one of our products at www.sparkfun.com. 124 | <br><br> 125 | <b>Licensing:</b> CC v3.0 Share-Alike You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. 126 | 127 | 128 | Fits EIAJ packages (wide version of the SOIC-8). 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | >VALUE 143 | >NAME 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | <b>Dual In Line</b> 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | >VALUE 171 | >NAME 172 | 173 | 174 | 175 | 176 | 177 | >Name 178 | >Value 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | >Name 189 | >Value 190 | 191 | 192 | 193 | 194 | 195 | 196 | >NAME 197 | >VALUE 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | >Name 207 | >Value 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | >NAME 225 | >VALUE 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | >NAME 240 | >VALUE 241 | 242 | 243 | 244 | 245 | 246 | <b>CAPACITOR</b><p> 247 | chip 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | >NAME 258 | >VALUE 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | >Name 268 | >Value 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | >Name 282 | >Value 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | >NAME 294 | >VALUE 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | >NAME 306 | >VALUE 307 | 308 | 309 | 310 | 311 | 312 | CTZ3 Series land pattern for variable capacitor - CTZ3E-50C-W1-PF 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | >NAME 331 | >VALUE 332 | 333 | 334 | <h3>CAP-PTH-SMALL-KIT</h3> 335 | Commonly used for small ceramic capacitors. Like our 0.1uF (http://www.sparkfun.com/products/8375) or 22pF caps (http://www.sparkfun.com/products/8571).<br> 336 | <br> 337 | <b>Warning:</b> This is the KIT version of this package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side. 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | >NAME 392 | >VALUE 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | >Value 479 | >Name 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | >NAME 522 | >Value 523 | 524 | 525 | <b>OMRON SWITCH</b> 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | >NAME 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | >Name 576 | >Value 577 | 578 | 579 | <b>RESISTOR</b><p> 580 | chip 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | >NAME 592 | >VALUE 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | >NAME 606 | >VALUE 607 | 608 | 609 | 610 | 611 | 612 | 613 | <b>CAPACITOR</b><p> 614 | chip 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | >NAME 624 | >VALUE 625 | 626 | 627 | 628 | 629 | 630 | 631 | 1/6W Thru-hole Resistor - *UNPROVEN* 632 | 633 | 634 | 635 | 636 | 637 | 638 | >NAME 639 | >VALUE 640 | 641 | 642 | 643 | 644 | 645 | 646 | >NAME 647 | >VALUE 648 | 649 | 650 | 651 | 652 | 1/4W Resistor, 0.4" wide<p> 653 | 654 | Yageo CFR series <a href="http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf">http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf</a> 655 | 656 | 657 | 658 | 659 | 660 | 661 | >Name 662 | >Value 663 | 664 | 665 | 1/2W Resistor, 0.5" wide<p> 666 | 667 | Yageo CFR series <a href="http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf">http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf</a> 668 | 669 | 670 | 671 | 672 | 673 | 674 | >Name 675 | >Value 676 | 677 | 678 | 1W Resistor, 0.6" wide<p> 679 | 680 | Yageo CFR series <a href="http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf">http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf</a> 681 | 682 | 683 | 684 | 685 | 686 | 687 | >Name 688 | >Value 689 | 690 | 691 | 2W Resistor, 0.8" wide<p> 692 | 693 | Yageo CFR series <a href="http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf">http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf</a> 694 | 695 | 696 | 697 | 698 | 699 | 700 | >Name 701 | >Value 702 | 703 | 704 | <h3>AXIAL-0.3-KIT</h3> 705 | 706 | Commonly used for 1/4W through-hole resistors. 0.3" pitch between holes.<br> 707 | <br> 708 | 709 | <b>Warning:</b> This is the KIT version of the AXIAL-0.3 package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side. 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | >Name 721 | >Value 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | >Value 755 | >Name 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | >NAME 769 | >VALUE 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | >NAME 784 | >VALUE 785 | L 786 | R 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | >NAME 807 | >VALUE 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | >NAME 824 | >VALUE 825 | 826 | 827 | 828 | 829 | 830 | 831 | >VALUE 832 | 833 | 834 | 835 | 836 | >VALUE 837 | 838 | 839 | 840 | 841 | 842 | Atmel ATTiny45 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | <b>Capacitor</b> 881 | Standard 0603 ceramic capacitor, and 0.1" leaded capacitor. 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 998 | 999 | 1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | <b>3.5mm Audio Jack</b> 1007 | Simple 3.5mm common PCB mount audio jack. SKU: PRT-08032 1008 | 1009 | 1010 | 1011 | 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | 1051 | 1052 | 1053 | 1054 | 1055 | 1056 | 1057 | 1058 | 1059 | 1060 | 1061 | 1062 | 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | <b>Momentary Switch</b> 1076 | Button commonly used for reset or general input. Spark Fun Electronics SKU : COM-00097 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | 1083 | 1084 | 1085 | 1086 | 1087 | 1088 | 1089 | 1090 | 1091 | 1092 | 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | 1099 | 1100 | 1101 | 1102 | 1103 | 1104 | 1105 | 1106 | 1107 | 1108 | 1109 | 1110 | 1111 | 1112 | 1113 | 1114 | 1115 | 1116 | 1117 | <b>Resistor</b> 1118 | Basic schematic elements and footprints for 0603, 1206, and PTH resistors. 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | 1126 | 1127 | 1128 | 1129 | 1130 | 1131 | 1132 | 1133 | 1134 | 1135 | 1136 | 1137 | 1138 | 1139 | 1140 | 1141 | 1142 | 1143 | 1144 | 1145 | 1146 | 1147 | 1148 | 1149 | 1150 | 1151 | 1152 | 1153 | 1154 | 1155 | 1156 | 1157 | 1158 | 1159 | 1160 | 1161 | 1162 | 1163 | 1164 | 1165 | 1166 | 1167 | 1168 | 1169 | 1170 | 1171 | 1172 | 1173 | 1174 | 1175 | 1176 | 1177 | 1178 | 1179 | 1180 | 1181 | 1182 | 1183 | 1184 | 1185 | 1186 | 1187 | 1188 | 1189 | 1190 | 1191 | 1192 | 1193 | 1194 | 1195 | 1196 | 1197 | 1198 | 1199 | 1200 | 1201 | 1202 | 1203 | 1204 | 1205 | 1206 | 1207 | 1208 | 1209 | 1210 | 1211 | 1212 | 1213 | 1214 | 1215 | 1216 | 1217 | 1218 | 1219 | 1220 | 1221 | 1222 | 1223 | 1224 | 1225 | 1226 | 1227 | 1228 | 1229 | 1230 | 1231 | 1232 | 1233 | 1234 | 1235 | 1236 | 1237 | 1238 | 1239 | 1240 | 1241 | 1242 | 1243 | <b>SUPPLY SYMBOL</b> 1244 | 1245 | 1246 | 1247 | 1248 | 1249 | 1250 | 1251 | 1252 | 1253 | 1254 | 1255 | 1256 | <b>SUPPLY SYMBOL</b> 1257 | 1258 | 1259 | 1260 | 1261 | 1262 | 1263 | 1264 | 1265 | 1266 | 1267 | 1268 | 1269 | 1270 | 1271 | <b>Speakers and Buzzers</b><p> 1272 | <ul>Distributors: 1273 | <li>Buerklin 1274 | <li>Spoerle 1275 | <li>Schukat 1276 | </ul> 1277 | <author>Created by librarian@cadsoft.de</author> 1278 | 1279 | 1280 | <b>Piezoelectric Acoustic Transducer</b><p> 1281 | Source: Panbasonic .. 2SC1685.pdf 1282 | 1283 | 1284 | 1285 | >NAME 1286 | >VALUE 1287 | 1288 | 1289 | 1290 | <b>Piezoelectric Acoustic Transducer</b><p> 1291 | Source: Panbasonic .. 2SC1685.pdf 1292 | 1293 | 1294 | 1295 | >NAME 1296 | >VALUE 1297 | 1298 | 1299 | 1300 | <b>Piezoelectric Acoustic Transducer</b><p> 1301 | Source: Panbasonic .. 2SC1685.pdf 1302 | 1303 | 1304 | 1305 | >NAME 1306 | >VALUE 1307 | 1308 | 1309 | 1310 | <b>Piezoelectric Acoustic Transducer</b><p> 1311 | Source: Panbasonic .. 2SC1685.pdf 1312 | 1313 | 1314 | 1315 | >NAME 1316 | >VALUE 1317 | 1318 | 1319 | 1320 | 1321 | 1322 | 1323 | 1324 | 1325 | 1326 | 1327 | 1328 | 1329 | 1330 | 1331 | 1332 | 1333 | 1334 | 1335 | 1336 | 1337 | 1338 | 1339 | 1340 | 1341 | 1342 | 1343 | 1344 | 1345 | >NAME 1346 | >VALUE 1347 | 1348 | 1349 | 1350 | 1351 | 1352 | 1353 | <b>Piezoelectric Acoustic Transducer</b><p> 1354 | Source: Panbasonic .. 2SC1685.pdf 1355 | 1356 | 1357 | 1358 | 1359 | 1360 | 1361 | 1362 | 1363 | 1364 | 1365 | 1366 | 1367 | 1368 | 1369 | 1370 | 1371 | 1372 | 1373 | 1374 | 1375 | 1376 | 1377 | 1378 | 1379 | 1380 | 1381 | 1382 | 1383 | 1384 | 1385 | 1386 | 1387 | 1388 | 1389 | 1390 | 1391 | 1392 | 1393 | 1394 | 1395 | 1396 | 1397 | 1398 | 1399 | 1400 | 1401 | 1402 | 1403 | 1404 | 1405 | 1406 | 1407 | 1408 | 1409 | 1410 | 1411 | 1412 | 1413 | 1414 | 1415 | 1416 | 1417 | 1418 | 1419 | 1420 | 1421 | 1422 | <b>TO-92</b><p> 1423 | grid 5.08 mm 1424 | 1425 | 1426 | 1427 | 1428 | 1429 | 1430 | 1431 | 1432 | 1433 | 1434 | 1435 | 1436 | 1437 | 1438 | >NAME 1439 | >VALUE 1440 | 1441 | 1442 | 1443 | 1444 | 1445 | 1446 | 1447 | 1448 | 1449 | 1450 | 1451 | 1452 | 1453 | 1454 | >NAME 1455 | >VALUE 1456 | 1457 | 1458 | 1459 | 1460 | 1461 | 1462 | 1463 | 1464 | <b>NPN TRANSISTOR</b> 1465 | Big oval pads 1466 | 1467 | 1468 | 1469 | 1470 | 1471 | 1472 | 1473 | 1474 | 1475 | 1476 | 1477 | 1478 | 1479 | 1480 | 1481 | 1482 | 1483 | 1484 | 1485 | <b>Conrad Connectors</b><p> 1486 | <author>Created by librarian@cadsoft.de</author> 1487 | 1488 | 1489 | <b>Cinch Einbauprintbuchse</b>, ( RCA Jack ) RM 7.5 x 10 mm<p> 1490 | Artikel-Nr.: 736880 - 49<br> 1491 | Source: http://www.produktinfo.conrad.com/datenblaetter/725000-749999/736880-da-01-de-Cinch-Einbaubuchse.pdf 1492 | 1493 | 1494 | 1495 | 1496 | 1497 | 1498 | 1499 | 1500 | 1501 | 1502 | 1503 | 1504 | 1505 | 1506 | 1507 | 1508 | 1509 | 1510 | 1511 | >NAME 1512 | >VALUE 1513 | 1514 | 1515 | 1516 | 1517 | 1518 | >NAME 1519 | >VALUE 1520 | 1521 | 1522 | 1523 | 1524 | 1525 | 1526 | 1527 | 1528 | <b>Cinch Connector</b> ( RCA Jack ) 1529 | 1530 | 1531 | 1532 | 1533 | 1534 | 1535 | 1536 | 1537 | 1538 | 1539 | 1540 | 1541 | 1542 | 1543 | 1544 | 1545 | 1546 | 1547 | 1548 | 1549 | 1550 | 1551 | 1552 | 1553 | 1554 | 1555 | 1556 | 1557 | 1558 | 1559 | 1560 | 1561 | 1562 | 1563 | 1564 | 1565 | 1566 | 1567 | 1568 | 1569 | 1570 | 1571 | 1572 | 1573 | 1574 | 1575 | 1576 | 1577 | 1578 | 1579 | 1580 | 1581 | 1582 | 1583 | 1584 | 1585 | 1586 | 1587 | 1588 | 1589 | 1590 | 1591 | 1592 | 1593 | 1594 | 1595 | 1596 | 1597 | 1598 | 1599 | 1600 | 1601 | 1602 | 1603 | 1604 | 1605 | 1606 | 1607 | 1608 | 1609 | 1610 | 1611 | 1612 | 1613 | 1614 | 1615 | 1616 | 1617 | 1618 | 1619 | 1620 | 1621 | 1622 | 1623 | 1624 | 1625 | 1626 | 1627 | 1628 | 1629 | 1630 | 1631 | 1632 | 1633 | 1634 | 1635 | 1636 | 1637 | 1638 | 1639 | 1640 | 1641 | 1642 | 1643 | 1644 | 1645 | 1646 | 1647 | 1648 | 1649 | 1650 | 1651 | 1652 | 1653 | 1654 | 1655 | 1656 | 1657 | 1658 | 1659 | 1660 | 1661 | 1662 | 1663 | 1664 | 1665 | 1666 | 1667 | 1668 | 1669 | 1670 | 1671 | 1672 | 1673 | 1674 | 1675 | 1676 | 1677 | 1678 | 1679 | 1680 | 1681 | 1682 | 1683 | 1684 | 1685 | 1686 | 1687 | 1688 | 1689 | 1690 | 1691 | 1692 | 1693 | 1694 | 1695 | 1696 | 1697 | 1698 | 1699 | 1700 | 1701 | 1702 | 1703 | 1704 | 1705 | 1706 | 1707 | 1708 | 1709 | 1710 | 1711 | 1712 | 1713 | 1714 | 1715 | 1716 | 1717 | 1718 | 1719 | 1720 | 1721 | 1722 | 1723 | 1724 | 1725 | 1726 | 1727 | 1728 | 1729 | 1730 | 1731 | --------------------------------------------------------------------------------