Thanks Alden, that did the trick.
One thing I noticed was that the verify fails after programming (using Studio6 + AVRISP mkII):
10:53:37: [ERROR] Verifying Flash…Failed! address=0x17c00 expected=0x38 actual=0xff
But the compile etc was all OK, and the tinyg seems to work! Maybe this is the bootloader address, and some bug in atmel studio?
I usually use AStudi04 and avrdude, but I couldn’t seem to get avrdude working.
And yes, I’m aware of the NO switch noise issue; I’ve built a micro-cnc out of old DVD and floppy drive innards http://tinypic.com/r/nofyw3/6 (insipration from hack-a-day: http://hackaday.com/2010/11/08/cnc-machine-from-pc-parts/) so I’m hoping it won’t be too much of an issue. Very low current.
The limit/homing signal cable is shielded, the wires from the junction box to the switch was supposed to be shielded also (they are wires from an old headphone set), but it turns out they weren’t after I cut into them :-!
I’ll make a full write up later.
Mike.