Grumpy,You're absolutely correct about my logic, I didn't think past my usually-DC uses. I am rather surprised by your results, however, as the specs on these would imply otherwise. From the TI data sheet for the archetype CD4066B:

Have you tried it with 1mhz yet? You can get a 50%duty cycle 1mhz square wave from the 328 pretty easy, tho idont remember offhand its only a few lines of codeI would suggest making a (few) prototype pcb from batchpcb or similiar , making it as tight together as possible, will ground plane, and then check again for your overshoot, you may find its entirely related to the prototyping method you are using

dhenry

You don't need that capacitor - it is counter-productive, especially if you want to go to 1Mhz later.

You could have used some of the analog switches in the CD/HC family.

I would have used a 4.7 - 22ohm resistor to dampen, but not with an analog switch.

Quote

Now with arduino duemilanove I'm working @ 10 khz but in future I will arrive at 1 mhz or more, so don't know if this is the right switch design for HF.

A few hurdles there:

1) your buffer will give out way before 1Mhz.2) your mcu may not be fast enough to produce 1Mhz pin outs....

Two alternatives to go to 1Mhz and beyond:1) DDS. This approach requires additional hardware + programming. But it can generate lots of different waveforms and relieve your mcu.2) Use a counter + resistor network. This approach requires just a serial clock (from your mcu).

A 3rd approach would be to use a memory device pre-programmed with your waveform as your own dds.

A 3rd approach would be to use a memory device pre-programmed with your waveform as your own dds.

That's the approach I've found is the most versatile for generating waveforms that are very complex and that you need to repeat... well, repeatedly .

You can drive the address pins of an EPROM with an up-down counter clocked via your MCU or address the EPROM directly from an MCU output port. I guess you can still buy EPROMs. The variations are endless.

Those are really the great-grandfather of today's cpld/fpga. Parallel eeprom and parallel sram are still available today, albeit hard to find.

I suspected as much. Dual port SRAM is another approach if you need to change the table driving the DAC periodically. I used counters with transparent latches for the address bus part of the dual port.

dr_benway

For higher frequency I suggest you use a proper DAC rather than your home-made one. If you only want sine wave output then try this http://www.ebay.co.uk/itm/New-AD9850-DDS-Signal-Generator-Module-0-40MHz-Test-Equipment-/180820399452?pt=UK_BOI_Electrical_Test_Measurement_Equipment_ET&hash=item2a19bc555c.

Yes,actually the concept of my schematic is very poor. (it sucks ):

I will try this Digital Device SystemThank you very much for the suggest, very appreciated.