Ops! I forgot the little detail of finding a morse code coded with 0 and 1 in such a table... Well, if the conversion is made "on the fly", it seems rather easy. All we need is the length of the morse symbol. And that's just a counter. Comparison will have to be more complicated, since the key to find a letter will consist of the symbol and the length... We could have several tables like this: Length 1: E T Length 2: A I M N Length 3: D G K O R S U W Length 4: B C F H J L P Q V X Y Z Length 5: 0 1 2 3 4 5 6 7 8 9 Or maybe someone can come up with a logical operation to combine the length and the code, producing an unique key... Nuno. Nuno Pedrosa wrote: > > I am a scout, and was thinking of this recently, to use in my Palm 3. > > In morse, there are 3 symbols: dot, dash and space. > > You can't translate a morse message like: > > ......-...-..--- > > Without pauses, you will have many possible combinations! > It could be possible to generate the most probable message, but > it would be very difficult to get the exact one! > > .... . .-.. .-.. --- > > Having the symbols separated and encoded like Gavin said, > why not just implementing a 2-way table? > > To detect the symbols, we could have 3 configurable times: > > - dot time > - hash time > - space time > > Use a TMR and a pin with interrupt on change. Measure the > value and the length of the value. Doesn't seem very hard, > but, then again, I'm just talking... 8) > > By the way, for those who don't have a morse table handy, > I said > > h e l l o > > Comments, anyone? > > Nuno. > > Gavin Jackson wrote: > > > > The first thing that comes to mind is to decode the > > dot dash dash dot into 0110 with a '1' representing > > dash and a '0' representing the dot. Then store a > > table in the PIC and do a simple compare through > > the table until a match is found. The only problem > > I see with this method is trying to tell the difference > > between a J ( . - - - ) and a 2 ( . . - - - ) which would be > > 0111 and 00111 respectively. > > > > Maybe this gives you some other ideas. > > > > Regards > > > > Gavin > > -- > ---- ~~~~~~ -------- Nuno Filipe Freitas Pedrosa > -- ~~~~ ~~ ----- SIEMENS S.A. Portugal TEL: +351 1 4242454 > - ~~~~ ~~ ---- mailto:Nuno.Pedrosa@oen.siemens.de > - ~~~~ ~~ ---- "Smile, and tomorrow will be a better day!" > ======================================================================= -- ---- ~~~~~~ -------- Nuno Filipe Freitas Pedrosa -- ~~~~ ~~ ----- SIEMENS S.A. Portugal TEL: +351 1 4242454 - ~~~~ ~~ ---- mailto:Nuno.Pedrosa@oen.siemens.de - ~~~~ ~~ ---- "Smile, and tomorrow will be a better day!" =======================================================================