Two 16F84 pics using one piezo?


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Rubicon's Avatar
    Rubicon Guest

    Default Two 16F84 pics using one piezo?

    Hello,

    How would one have two 16F84 pics share a single piezo speaker on their PORTA.1 pins?

    At the moment I have a couple on a test breadboard their PORTA.1 pins connected to a single 10uF/16V electro cap and on to a (I hope) piezo speaker. I scavenged the speaker from an old UNIDEN cordless phone and it won't work without the capacitor. All the PORTB pins are connected to two banks of LEDS that light back and forth and beep when they reach either end. It's only point is to teach me how to do this.

    If only one PIC is connected then everything works fine - startup beep and the beeps at either end but with two PICs there's only one startup beep then little clicks from the speaker.

    Sorry but I don't have the current code to post - it's on an ancient computer in the garage with a faulty floppy, yes floppy drive. I must replace that sometime.

    Any help greatly appreciated.

    Rubicon.

  2. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Smile Try a common emitter amplifier

    Hi there,

    You can try to amplify (buffer) the signal from the port pins through a single npn transistor and connect the the collectors of both to the buzzer if you are using thge sound function. If you are using a self oscillatory piezo buzzer then just and the ports using two diodes (4007 or such) and should get satisfactory result.

    Regards

    Sougata

  3. #3
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Post

    Try making the pin INPUT right after each soundgenerating command.
    You might also get away with connecting it PortA.1-capacitor-piezo-PortA.1(on other pic). This will only work if both pins are outputs and it has the potential to make very interesting sounds if both pics try to beep at the same time.

  4. #4
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    What would happen if you attached one pin to the center part of the piezo, and the other to the rim? When one is sending a tone, the other will be either at gnd potential, or b+. When the sending PIC changes, the same would be true of the other one. Even if there is a conflict where both were sending, the piezo would act as a mixer and create some wild effects. Just a thought...

  5. #5
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Exclamation

    Duh, Sorry Ingvar, I just duplicated part of your post.

  6. #6
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Cool

    Yeah, i got that "déjà vu" when i read your post.

    It must be a good idea since we both came up with it. Now all we need is that Rubicon actually tries it and reports back what it sounded like.

    /Ingvar

Similar Threads

  1. connect two pics
    By soki in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 23rd September 2008, 06:29
  2. Multiple Pics accessing single EEPROM
    By Atom058 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd February 2008, 17:22
  3. Retrieving infos from multiple PICs on a bus/chain
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th October 2007, 04:42
  4. Programming Pins of PICs?
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 15th August 2007, 18:59
  5. Self Destructing pics? Copy protection
    By Rob Martin in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd March 2004, 09:39

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts