This is what I've been doing lately, with some success. Maybe it'll work for you - or maybe it will teach you bad habits.

- Put your camera in manual mode.
- Use the lowest ISO setting your camera has.
- Use a tripod.
- Use macro mode. NB different cameras have weird restrictions. For example, my camera (Sony DSC-P10) will not zoom (optical or digital) in macro mode. You have to take macro shots at full wide angle. Really this primarily affects the working distance from your subject, I think. And results will vary depending on the resolution of your camera.
- Adjust your camera for the lighting.
- Use a timer, if your camera has one, or otherwise avoid jostling the camera when your photo is taken.
- Try adjusting the exposure manually, or use bracketing if your camera supports it, to get the right amount of light.
I still don't know how to do good lighting, so I can't help you there. Here's the best nib shot I've been able to do yet: