Hey Terry,
So the lens should work for you. I do believe it should auto-focus for you too. According to Nikon's web-page it is compatible with the D40. So here's what I did on the D80. This seems to work best for mine at least.
1) set the lens on F22. I believe it must be on F22 for the camera to be able to control the aperture. That's why it won't allow you to take a picture on anything other than F22. it can't control the aperture on the other settings (I assume those are for non-auto cameras).
2) set the camera to "A" mode (Aperture of course.. :001_smile: ) ).
3) Using the front scroll-wheel (in front of the shutter release) set the camera to the F-stop you want. You'll see the setting change on the LCD display. You can scroll from F22 - F1.8. The exposure time will auto adjust (assuming you've locked in the ISO).
Here's 2 sample shots I took using the above steps. On a tripod, exact same camera position, using the exact same lens, no flash - just inside light, and set to ISO400. I loaded them at 1024x768 to give you a better view. Note, I have done zero corrections, both are straight off the memory card. These are the exact same shot. Nothing except Aperture was changed.
Set on F1.8:
Set on F22:
As you can obviously see, the depth of field is far better in the one taken at F22. While the lens was set for F22 on the 1.8 shot, you can see the camera did adjust the lens down to the 1.8 setting. I think if you do that, you'll see the camera is adjusting the F-stop. Give that a shot & see if it helps. For testing purposes, try something similar to what I did, taking a frame down a long board with items on it so you can truly guage how the setting are locking in. Once that's done, then move back to the macro stuff. Now when you do, try moving the camera farther away from the watch. I had a heck of a time getting it to work at minimal distances, so I moved it back & cropped on the PC & it worked far better.
Try that & let me know... :thumbup1:
BTW, exposure times were of course very different. The F1.8 exposure was 1/60 while the F22 exposure was 3 seconds.