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 -------------------------- vulcan@ihug.co.nz ICQ# 18675389 http://www.geocities.com/TheTropics/Cabana/2625 -------------------------- Sent: Wednesday, 04, November, 1998 01:08 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: Morse Decoder Life is sometimes curious. Last weekend I spent most of the weekend designing a protoboard and software to use as a base for - yes you've guessed it a Morse Decoder! The stripboard prototype has a 4*20 LCD (cos I got one very cheap) driven by a 74164 and 3 16F84 pins and a 24LC65 using 2 more of the pins. All the 3 wire- LCD software works OK and all the I2C to the 24LC65 now works. Basic idea is to detect interrupt on PORTB and try to figure out dot, dash (or space equivalents) and then use the 24LC65 to hold both menu options and a sparse lookup table for the Morse. That way pretty much all the PIC processing can go into figuring out dot/dash. I had planned initially just to attach a key to PORTB for testing - then play around with an electret mike passing thru some bandpass filter to a 567 tone decoder - but since my electronic skills are very poor I might need some help here! Anyone worked on any morse decoding algorithms wants to share ideas then fine - pls let me know - probably best to my reader direct and if there is interest I'll summarize here later Brian Brian Jones Technical Planner Java Technology Centre IBM Hursley