element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Code Exchange
  • Technologies
  • More
Code Exchange
Forum Two Tone Paging Code
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Code Exchange to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 3 replies
  • Subscribers 47 subscribers
  • Views 618 views
  • Users 0 members are here
  • paging
  • ii
  • call
  • quick
  • tones
Related

Two Tone Paging Code

Former Member
Former Member over 10 years ago

Hello everyone! I am new to programming and need some pointers.

 

I am trying to write a program that generates tones. I know how I want the program to work, but I have no clue on how to write the code.

 

The program needs to generate 2 tones, which are defined by the user input. The first tone is one second long, followed by a three second tone.

The user input follows the Motorola general encoding plan found here in table 1 http://www.midians.com/pdf/tone-signaling-charts.pdf .

 

I am programming a RaspberryPi model B using Python.

 

I would like to have a code that based on a 3 digit user input, would generate tone A and tone B. Tone A is 1 second long and Tone B is 3 seconds long.

 

The 1st digit would select the plan, i.e. which "Reed Groups" the tone are selected from. The 2nd and 3rd digit selects the tone from each Reed Group.

 

Examples;

 

A 394 would generate a 1 sec / 3 sec tone of (539.0 Hz / 707.3 Hz).

A 703 would generate a 1 sec / 3 sec tone of (321.7 Hz / 651.9 Hz).

 

Any help would be greatly appreciated!

 

James

  • Sign in to reply
  • Cancel

Top Replies

  • shabaz
    shabaz over 10 years ago +1
    The DAC as mentioned by Ambrogio will work. There is also an in-built audio output on the RPI which you could use if you choose. From what you say, it sounds like you only want one tone at a time? In that…
  • amgalbu
    0 amgalbu over 10 years ago

    Hi

    I think you will need a breakout board with DAC like this one

    https://learn.adafruit.com/mcp4725-12-bit-dac-with-raspberry-pi/using-the-adafruit-library

     

    Then adding the logic should be a trivial task... should you have difficulties, just ask!!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 10 years ago

    The DAC as mentioned by Ambrogio will work. There is also an in-built audio output on the RPI which you could use if you choose.

    From what you say, it sounds like you only want one tone at a time?

    In that case, perhaps you could just script what you want, e.g. if Python allows you to call any arbitrary program, then try speaker-test (it has parameters for frequency and period).

    There are other ways to do what you want - e.g. create your own tones on-the-fly perhaps, or even use stored audio files since SD cards have plenty of space.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • amgalbu
    0 amgalbu over 10 years ago

    Definitely if you need to generate one tone at a time the solution proposedby shabaz is easier... my initial thought was that you were going to generate two tones at the same time (somtething like DTMF).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube