Shop OBEX P1 Docs P2 Docs Learn Events
DTMF to Iambic Morse Code? — Parallax Forums

DTMF to Iambic Morse Code?

MikeyMustangMikeyMustang Posts: 22
edited 2008-10-23 22:16 in BASIC Stamp
Hello
·First let me say I am an Extreme Newbie when it comes to the Basic Stamp or any other programming for that matter...please be patient.
·I am working on a project to decode DTMF (0-9,#,*) and convert them to iambic Morse code. Iambic is where the dash would output one pin and the dit on another pin and in combination would result in a Morse character.
·I have the schematic done and wanted someone to confirm it and I have some code (not finished) which I barrowed from a fellow ham (K2FS) with his permission which might be a good start?
·What this project does is program an SI570· frequency chip via Skype. I have a working circuit (thanks to Doug Hall K4DSP) that takes a Iambic paddle input to program an I2C SI570 chip... for instance if I want 14.200mhz· would "paddle in" 14 period 200 K· in Morse code...I know what you are thinking why not go DTMF to I2C?? Remember I am an extreme newbie!
·What I want to be able to do is call my Skype via my cell type in 14*200# and be able to program and listen to my radio on that frequency.
Questions I have
1. How would I use pins 18 (P13)dash and 19 (P14)DIT to be keyed Iambic (dash on one pin and dit on the other combined to make a Morse character?
Would I code the output pins like this for number 1 (.----) ?
CWONE:
start :····· high 19·········· Do I use p14?
························· DIT
············ pause 50
············ high 18·········· Do I use p13?
························· DAH
············ pause 150
············ high 18
························· DAH
············ pause 150
············ high 18
························· DAH
············ pause 150
············ high 18
························· DAH
············ pause 150
············ goto start
·····
2. How would I send *(star dtmf) to = period (.-.-.-) would it be 85 01010101?
3. How would I send #(pound dtmf) to = K assuming (163)?
4. what does this code do ?
·tentozero:
·· if dtmf <>· 10 then fixten
·· dtmf = 0······················· 'Change a received "10" to a "0"
·fixten:
return

·I have included the schematic and some very ruff unfinished code that may contain some unwanted code. I was wondering if someone would point me in the right direction.
·Your help is GREATLY appreciated!

Mike WA3O
HTTP://WW.MIKEYMUSTANG.COM
1444 x 1648 - 153K

Comments

  • NR1XNR1X Posts: 111
    edited 2008-10-13 23:40
    first need a clear idea of what you want to do?? do you want to :
    step one: RX DTMF store to variable
    step two: SEND CW where charecter sent = DTMF variable
    if this is what you want to do then its fairly simple.. i have never played with a paddle keyer so youll need to tell me this.. does the duration on the pins need to be differant?? or will a high signal on dot pin be the the same as the dash pin?
    the first thing to do is test and be sure that you copy and decode dtmf correctly.. do you have a good handle on how the 8870 works?? (looks like a cm8870)
  • MikeyMustangMikeyMustang Posts: 22
    edited 2008-10-13 23:56
    Yes I want to· key in 14*200# then I want the Basic Stamp to output 14 period 200 K in CW on 2 pins of the Basic Stamp·DITS being on one pin and DAHS being on the other.

    To answer the other question on a paddle keyer one side is dits and the other dahs. Its tuff to explain but...if you hold the dahs it will continue to send dashes and you can insert the dits...or you can tap the dit and get a dit and tap the dah and get the dah...so if you if you tap the dit once and tap the dah 3 times afterwards you will get a "J"...make sence?

    Thanks

    Mike WA3O
  • NR1XNR1X Posts: 111
    edited 2008-10-14 01:44
    do you have dtmf decoder working?? i have attached some code.. theres alot of stuff commented out, cause the code originaly used an lcd display but i changed it to send to debug terminal.. it should work with your wiring.. the cm8880 is a bit more complicated than the 8870... you are using the 8880 witch can send dtmf and decode dtmf.. try this program and see if your rxing dtmf .. as far as the keyer goes im still a little in the dark on this.. could you do the same thing sending your code via a straight key?? it would be simpler and use only one output from the stamp..
  • MikeyMustangMikeyMustang Posts: 22
    edited 2008-10-14 20:54
    I got the DTMF working and today I put threw together some code that might work (i might have to mess with timming). Please take a look at my file and maybe it will better explain what I am trying to do...I will build the circuit up as soon as possible and verify if it works. It would be nice to run it on some kind of emulator...is there such a thing for the BS2?

    Thanks

    Mike WA3O
  • NR1XNR1X Posts: 111
    edited 2008-10-14 23:01
    i really dont know.. if there is an emulator for the bs2 , but i bet that someone does and will chime in.. also your code looks like it will decode dtmf and send cw. will it work right off, i do not know because i have never played with a cw keyer. im pretty new at this stuff but have playe alot with dtmf using the cm8880 and 8870..
  • MikeyMustangMikeyMustang Posts: 22
    edited 2008-10-14 23:32
    ok well I got it to work I have some timing issues to work out but all should be ok...one big question is the every 7 seconds the outputs play the last digit heard so i need to some how clear it after so many digits ? should be easy to fix...I have attached the code it needs cleaned up and commented better but works I need to figure out how to stop the last digit heard loop?

    Thanks for your help

    Mike WA3O
  • MikeyMustangMikeyMustang Posts: 22
    edited 2008-10-22 23:04
    Guys and Gals:
    ·
    ·
    ·I have the program working fairly well but now I want to step it up a notch. The program works well with single digit inputs. I now want to feed strings of DTMF in to do more functions.· For instance I would like to send 123 to do something and single digits 1 and 2 and 3 to do something else… so, I need to store the DTMF digits and do a count to see how many I have and then· do something with them. Can someone tell me how to go about doing this? I have included my code that I am running now and the schematic.
    ·
    Thanks
    ·
    Mike WA3O
    1444 x 1648 - 159K
  • NR1XNR1X Posts: 111
    edited 2008-10-22 23:34
    Check out this code.. You should be able to break it down and "recycle" it.. be carefull though, im not sure what you have connected to you I/o's..... this is just a good starting point.. its a kindof a dtmf combo lock . originaly written to run a dtmf operated voice mail box for use on two meters... let me know if it werks 4 u....73 de KB1NRB
  • MikeyMustangMikeyMustang Posts: 22
    edited 2008-10-23 22:16
    Can anyone else comment on this please?

    What I want to do is press one digit DTMF say digit 1 and key a realy but if I hit 1,1 do a tone and say 1,1,1 flash a light.
    I assume I have to store the DTMF string...count the number of digits and if one digit and the number one key relay....if 2 digits and the DTMF 1,1 do a tone... and if the string is 3 digits long and a DTMF 1,1,1 flash the light. Any ideas?

    thanks

    Mike

    WA3O
Sign In or Register to comment.