#picaxe 28x2 ' * *** ******************************************************************** ' * *** PICAXE Morse Keyer ' * *** Iambic A Version 1 ' * *** Chris Pearson, G5VZ ' * *** May 2012 ' * *** ******************************************************************** symbol ditLength = 10 symbol dahLength = 30 symbol silencePeriod = 10 symbol betweenCharacters = 30 symbol sideTone = 100 symbol silentTone = 0 ' * *** ******************************************************************** high b.7 ' Blink LED pause 100 low b.7 pause 50 high b.7 ' ' Send FB ' sound B.6, (sideTone, ditLength) sound B.6, (silentTone, silencePeriod) sound B.6, (sideTone, ditLength) sound B.6, (silentTone, silencePeriod) sound B.6, (sideTone, dahLength) sound B.6, (silentTone, silencePeriod) sound B.6, (sideTone, ditLength) sound B.6, (silentTone, betweenCharacters) sound B.6, (sideTone, dahLength) sound B.6, (silentTone, silencePeriod) sound B.6, (sideTone, ditLength) sound B.6, (silentTone, silencePeriod) sound B.6, (sideTone, ditLength) sound B.6, (silentTone, silencePeriod) sound B.6, (sideTone, ditLength) ' * *** ******************************************************************** main: do touch16 A.0,w0 ; read value into w0 if w0 > 600 then gosub senddit else endif touch16 A.1,w0 ; read value into w0 if w0 > 600 then gosub sendDah else endif loop end ' * *** ******************************************************************** ' ' Subroutines ' senddit: low b.7 sound B.6, (sideTone, dahLength) high b.7 sound B.6, (silentTone, silencePeriod) return sendDah: low b.7 sound B.6, (sideTone, ditLength) high b.7 sound B.6, (silentTone, silencePeriod) return ' * *** ********************************************************************