For the past few weeks I've been mining by hooking my DE0-Nano up to my PC directly via USB - no JTAG or microcontrollers or USB-to-serial, just full speed native USB. The code to do this has actually been publicly available in my git repository for about that long too, but I'm not entirely happy with it for various reasons. The licensing on the USB function core from OpenCores it uses is a bit odd, the code quality isn't that great, and I'm interfacing the FPGA pins directly to the USB port when I should really be using something like a
TUSB1106 chip for better reliability and to protect the FPGA from being damaged by shorts to +5V.
Anyway, if anyone's got a use for this the Quartus project is in the
projects/DE0_nano_USB directory of the de0-nano-usb branch, and the code to mine using this is in the
usb-miner branch of afpgabm. You'll need to connect USB ground directly to pin 30 of JP1 on the DE0-nano, D+ to pin 25 and D- to pin 23 through say 10 to 47 ohm resistors (not sure what the exact resistor value should be), and connect a 1.5k pull-up resistor from D+ to a source of 3.3V that's only enabled when the 5V USB power is on. Better yet, rip out the fake USB transceiver logic from fpgaminer_top.v and use a TUSB1106 or similar. Users of expensive Spartan-6 boards should always use a real transceiver chip, partly to stop your hardware getting damaged and partly because some of them run on non-USB-compatible IO voltages that need to be converted.