If you're using a pic then you can drive 4 with 8 pins. Connect between two pins and reverse the signal on each pin so you get 10V pk-to-pk signal. Or use an amplifier.
A piezo tweeter has a VERY rough frequency response that is full of resonances with no sounds in between. A response curve is heavily smoothed to make it look good but it still sounds awful.
A single transistor as an amplifier produces extreme distortion without having a lot of negative feedback and a piezo has no resistance so the transistor will still need a resistor as its DC load for it to do anything.
To be fair he's given us no idea what he's trying to do, so a single transistor 'might' be all that's required.
However, seeing as he specifed 'tweeters' (and lot's of them), rather than piezo beepers, I imagine he's wanting considerable power - so you couldn't bridge PIC pins to do it, neither enough voltage nor current.
Can anybody give us a shred of useful information?
What voltages are available for the circuit and the piezo devices?
What is the current required or power rating of the devices?
What is the operating frequency you want to deliver to the devices?
Piezo part number / manufacturer / datasheet / website ? ? ?
An audio power amplifier that can drive a 4 ohm load can drive 15 paralleled piezo tweeters up to 20kHz.
Piezo tweeters were used 50 years ago. I am surprized that they are still being sold as replacements. I found them at Parts Express at a very low price but with absolutely no audio spec's. Reviews say, "Not for hifi".
An audio power amplifier that can drive a 4 ohm load can drive 15 paralleled piezo tweeters up to 20kHz.
Piezo tweeters were used 50 years ago. I am surprized that they are still being sold as replacements. I found them at Parts Express at a very low price but with absolutely no audio spec's. Reviews say, "Not for hifi".
As always, you've overly critical, while not 'HiFi' they have been used in millions of PA and instrument cabinets over the decades, and perform perfectly acceptably in that role. In fact no doubt you have many recordings that feature such devices, you wouldn't know, as you can't tell.
this is the tweeter that i want to use - top cut-off is 30kHz
i looked at a cd4047 as an oscillator with 4 transistors as a driving circuit. Is it better to use a TDA1516 as driver. Supply voltage is 12v
What EXACTLY are you trying to do?, with only a 12V supply rail your power output is strictly limited, even in a bridged configutation. Typical uses of those tweeters are in 100W PA cabinets, with 65-70V supply rail in the amplifier.
The low power TDA1516 is obsolete and is not made anymore. Its output per channel with a 13.2V supply into a 4 ohm load is 5W but with a 12V supply and an 8 ohm load will be about only 2.1W. Then the peak sounds from your piezo tweeter will not be loud and the average sounds will have low levels.
The very cheap piezo tweeter "shrieks" at a few high frequencies. The original one 50 years ago stated its frequency response goes to 27kHz but its graph stops at 20kHz where the response is dropping quickly. Its very cheap copy today might be worse.
A hifi tweeter has a smooth response.
Here is the response of the 50 years old piezo tweeter and a twenty dollars mid-priced hifi tweeter:
A cheap or an expensive tweeter does not produce frequencies well above 20kHz. Ultrasonic transducers produce 40kHz very well because they are tuned to 40kHz.
Are you trying to attract or repel dogs?
There are no Baboons here yet.
Racoons were our main pest but now Possums have taken over. What we call a Possum is called an Opossum in Wikipedia but they have the descriptions all mixed up. They are a member of the Kangaroo family! They cannot swim here from Australia so they probably snuck aboard a ship.
Many companies make ultrasonic critter repellents but most of them do not work. Experts say ammonia will repel them.