pub morse_char_sb(c) | key, idx, startbit '' Output character c in Morse code on LED key := ucase(c) ' convert to upper case idx := lookdown(key : "A".."Z", "%".."9") ' if alpha-numeric (or extended numeric, for prosigns) if (idx > 0) key := byte[@Alphas_sb][idx-1] ' convert to Morse pinwrite(55..48, (!(key))) ' Just for my LED bar array display startbit := 0 ' Start bit not found repeat 8 if startbit == 0 ' do for eight bits if (key & %1000_0000) == 0 ' skip all leading zeros key <<= 1 next else ' Found the start bit key <<= 1 startbit := 1 next ' skip it too led.on() if (key & %1000_0000) waitms(DAH_TIME) else waitms(DIT_TIME) led.off() key <<= 1 waitms(DIT_TIME) elseif (key == " ") waitms(WRD_TIME)