Simple Crystal Frequency Determination

Someone posted recently to sci.electronics.misc about determining the frequency of unknown crystals, and I hazarded a guess which turned out to be pretty useless, and got pretty well beat up on by the knowledgeable people in the group, who for whatever reason had declined to share their wisdom with the OP.

Anyway, I've done some testing since then, and came up with a test that only seems to work reliably for one of my crystals, 7.15625 MHz. The 13.something and an unknown crystal can't be made to oscillate reliably with the 18pf capacitors I soldered to the PICkit 2 44-pin demo board. Anyway, I just made these changes to the Reversible.asm program, plugged crystals into the socket I made out of an old DIP socket, and counted the number of times the LEDs went through a full cycle in 60 seconds with the potentiometer at highest resistance.

At 1MHz (with the use_crystal definition commented out), the LEDs went about 9.1 cycles. With the crystal in, and the program recompiled with use_crystal enabled, it went about 65 and a half cycles:

$ python
Python 2.5 (r25:51908, Mar 13 2007, 08:13:14)
[GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 65.5 / 9.1
Pretty damned close. I wish I had some more lower-frequency crystals to test, so I'd know for sure that this is working, but it may give some people ideas for their own crystal testing circuits.

My oscilloscope idea was, as people pointed out, completely out to lunch. I'd need to build an oscillator circuit to get it humming, and I don't know enough to do that yet. I still maintain that having an oscilloscope around if you're going to be doing any electronics troubleshooting is a good idea.