Thank you,
I think that circuit will only work for a piezo but, it put me on a better track for finding a circuit design. After following your link, I found some other sites that have some ideas that may work.
I suggest you take a look at the Analog Devices and TI web sites. Both offer a wealth of information re: op-amps and from the looks of it, your application is tailor-made for an op-amp. You could go for a G=1.5 circuit that simply shifts the signal from +/- 0.7Vrms to 1.5VDC +/- 1.5Vpp. That would result in a signal from 0-3VDC, well within the specs of the Due ADC. Plus, you gain the benefit of a low-impedance source, i.e. one that will make the ADC inside the Due very very happy.
That is dirt cheap. Tayda has them for .10 each which I thought was awful cheap.
Should be a pretty simple hack in arduino, recompile bootloader fro 20Mhz and make new modified entry into core's boards.txt file. Anything else I forgot?
Just for fun I programmed via the ICSP interface with the ASCII table sketch, set to output at 9600 baud.
At 20 MHz it output (seemingly correctly) at 12000 baud which sounds right (9600 * 20 / 16 = 1200).
Then I put in one of the 24 MHz crystals that I also ordered (because dhenry claimed you could clock it at 24 MHz) and it output at 14400 baud (9600 * 24 / 16 = 14400). So on the face of it, you can run at higher speeds. Now I can't say for sure that it is working perfectly, but after running for 10 minutes or so, the ASCII table is still coming out.
Trap for young players: I initially saw no output, which I spent 15 minutes mucking around trying to fix, until I realized the sketch only outputs the table once. At 24 MHz that doesn't take long!
you should look at some of the xmega's, arduino support is out there, no idea how perfect it is with libraries and whatnot, but the core is there to write your own. Anyway those things come in 8 and 16 bit flavors clocked up to 32Mhz.
I have a small strip of them and some 25.175Mhz crystals, the dot clock speed of 640x480 VGA, which easily divides for sync signals (not specificly for generating 640x480 graphics)
I don't particularly care about recompiling the core because only a small number of things will be out. For example, baud rates, but you can compensate for that. And you could compensate for the readings returned by millis().
So I can use any existing 16Mhz bootloader (example: from Adafruit) with a 20/24 Mhz crystal, right? -- millis() timing may be off, but all the others should work fine as is.
The thing about the core is, the processor doesn't really know what speed it is running at. So for example if you use the 8 MHz internal oscillator everything will just be half the speed. So a 9600 baud rate for the serial port will really be 4800 baud. And delay (1000) will really delay 2000 mS.
Now for the bootloader, the problem will be it expects a certain baud rate. However if you change boards.txt to reflect the difference, it should work. So for example, for the Uno:
Since the upload speed is normally 115200 you would need to increase that to 115200 * 24 / 16, which is 172800, assuming the USB chip can handle that speed.
However in my case I programmed with ICSP (not the bootloader) so that didn't apply. So, disclaimer: I didn't test with a bootloader.
Absolutely. All the bootloader does is put the program into program memory. You could then turn the power off, replace the crystal, and power it up again.