1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Hoping someone will help me with code concerning timer

Discussion in 'Arduino' started by flat5, Apr 17, 2015.

  1. flat5

    flat5 Member

    Joined:
    Oct 26, 2008
    Messages:
    866
    Likes:
    8
    Location:
    Amsterdam
    "The last parameter is timeout...."
    Yes, well, moving on...
    What does the 136 do in your code? Why is it there?
     
  2. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,310
    Likes:
    914
    Location:
    Rochdale UK
    68us high time... I'm assuming 68us low time ( frequency )
     
  3. flat5

    flat5 Member

    Joined:
    Oct 26, 2008
    Messages:
    866
    Likes:
    8
    Location:
    Amsterdam
    I find the ratio of the dit/dah time to be correct but otherwise useless.

    This is what the scope sees on the collector of the mic preamp.
    This point goes to D7 on the Arduino.
    Scope shows one cycle ~2.3 ms. However tone freq. is 1029 Hz. and wpm = 20.
    scope on mic preamp1.jpg
    I could re-bias the transistor but will wait till the NE567 (s) arrive and then play with the preamp.
     
    Last edited: Apr 20, 2015
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,310
    Likes:
    914
    Location:
    Rochdale UK

    Then your results are ok.. Your dit's are three times shorter than your dah's.. Why do you deem them useless..

    If you are trying to receive 20WPM with an average of 5 characters per word... around 1 and 1/2 characters per second... If the timeout in pulsein() was reduced to 250mS you should be able to receive characters and process them..
     
  6. flat5

    flat5 Member

    Joined:
    Oct 26, 2008
    Messages:
    866
    Likes:
    8
    Location:
    Amsterdam
  7. flat5

    flat5 Member

    Joined:
    Oct 26, 2008
    Messages:
    866
    Likes:
    8
    Location:
    Amsterdam
    Last edited: Apr 21, 2015
  8. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,310
    Likes:
    914
    Location:
    Rochdale UK
  9. flat5

    flat5 Member

    Joined:
    Oct 26, 2008
    Messages:
    866
    Likes:
    8
    Location:
    Amsterdam
    Last edited: Apr 20, 2015

Share This Page