Monday, July 21, 2008

FPGA frequency counter code.


An FPGA project that does something useful: implements a frequency counter using the Xilinx Spartan 3AN development board. Basically consists of two counters and the AX8 uC core. The first counter generates a 1 Hz timing signal from the on-board 50 MHz crystal oscillator, and the second counter counts the signal under test. The AX8 core runs a simple program that reads the count value and formats it for display on the LCD.
The attached image is counting the frequency of a VEX RC transmitter using a 75.97 MHz crystal. The measured count is 75.971459 MHz, which is within 0.002% of the expected value. The development board uses an xtal oscillator marked AGXO-751L 50.000 A. I found a datasheet at www.inysa.es indicating that A versions are 100ppm, or 0.01%, so the measured value is well inside the tolerances.
I'll be posting the code when I get it ready.

Monday, July 14, 2008

Dying Disk.

My old Winbook laptop (100 MHz 486!) finally died. I was using it as a private webserver, mail collector, Christmas light controller, remote access when I'm away, etc. So it's been running 24/7 for about 5 years now. The battery died several years ago, and the hinge cracked, but the guts still worked fine and it doesn't suck too much power. So, if it ain't broke too bad, don't fix it.
Finally, the disk started sticking: I have to pick up the PC and shake it to get the drive to start spinning so it can boot. Now the fun part: I decided to move the drive to a new PC and copy all the settings off before it died completely. Unfortunately the disk was too big for the BIOS in the 486, so it's formatted with an OnTrack DiskManager partition hack, and the new PC (running a Debian Linux 2.6 kernel) doesn't see the real partitions. Google found 2 couple of suggestions: Add the hda=remap or hda=remap63 kernel option in grub (didn't help), or use device-mapper (didn't find any instructions on how to actually do it). Apparently, DM support was deleted in 2.6. So, I rebooted with a 2.4 kernel, whacked the drive with my hand, and all my partitions were readable without changing any settings.
The disk did die for good shortly after that. I suppose I could dig up an old 2.5 drive and get a few more years out of the 486, but I think I've gotten my money's worth.
I think I'll get the backups on my main PC up to date, then go back to useful work.