Part III - A Littany of ****ups and Suffering My boards came in. Jump for joy. I got some of the lovely OSH Park purp in the mail, and did some cursory inspection.
It looks like most everything returned acceptably. Oh wait maybe not. In my brilliance, I forgot to wire the traces to the USB B receptacle. I hope that's all I messed up. So, I wired it all up. Looks nice doesn't it?
Here it is compared to that old perfboard I made.
You can even check out my ghetto USB wiring.
Now all I have to do is slap some pre-made code in there, and I have a working keyboard that will impress old computational professors when they come visit my lab (it happens).
Aaahahahaha, if only it was that simple. Don't forget that I have never done this before. Every project demands a pint of blood, and this would take a bit.
Obstacle 1:
I did a successful make to the ATmega8, and kept getting
More
Error 43
Windows has stopped this device because it has reported problems. (Code 43)
. I did a bunch of things trying to get it to work (fuses, linux box, crystal swap, USBlyze, yelling at it) to no avail. Reluctantly I asked for help on a forum. Turns out the files were using an old version of V-USB.
Obstacle 2:
Alright, so now I have the new V-USB. I had to change a few things to get it to make successfully, but I found those changes on my own. Go me.
FAILURE, Error 43, device descriptor read/64 error 71, etc.
Blargg posted his diff file of what he changed, showing me a few extra things to try. Ok, easy enough. I make all the changes he did.
Obstacle 3:
Those changes weren't all good. Since I'm so green at this, I didn't notice that he moved his USB pins only because he set his hardware up differently. Clearly I am a drooling windowlicker.
Catharsis:
I decide that Gregor has existed long enough. He seemed to be drained by the constant exposure to light afforded by the glass vial. He will face the same fate as Legs McKinzie before him. I fill the vial with the struggling bug with an aliquot of concentrated nitric acid. It was interesting to observe that the cockroach continued struggling for ~1s after submersion in the strong acid. Remember that the spider immediately ceased motion upon contact with the acid. This suggests that there is truth to the survivability of cockroaches when applied to extremely acidic conditions. Gregor did die, and his suffering was not long. I sealed the vial and set it on the lab bench so I could watch his body dissolve into a set of transparent chitinous fibrils bathed in the characteristic orange hue of large quantities of nitrogen dioxide dissolved in the water.
Obstacle 4:
On the advise of the wonderful blargg and my PI (who I was mad at that day for something related to being drunk the night before), I loaded the LED blink script onto the ATmega8. A minor success. At least now I know that the programmer wasn't messed up.
Blargg also suggested that the Zener diodes I had included would cause problems with capacitance. I replaced them with a set of switching diodes. No luck. Same old bull****.
Obstacle 5:
My PI finally had time to look at what I was doing. He mentioned that the diodes could be completely unnecessary for such a low power application. I completely removed them and patched over the spot. No luck. You guessed it, same old bull****.
Obstacle 6:
Blinking was out of time. I corrected fuses. Correct blink program. Partial success! The computer recognizes for a moment that this is, in fact, a keyboard. But only for a moment. Failure.
Obstacle 7:
Blargg is out of ideas.
Obstacle 8:
My PI is out of ideas, and he never really gave much of a **** anyway. He knew this was a practice project and wanted me to get started on the real work.
Obstacle 9:
Life
So the keyboard sat for a few days, untouched. I had some arduino stuff to work on, and my other work was getting busier. Nothing else can go wrong....right?
Stay tuned next time for the most current chapter of the tale - Part IV: Gregor's Revenge!