Quote Originally Posted by Kamikaze47 View Post
for example: (note: untested)
Thanks so much, Kamikaze47. It works as you wrote it. So you can consider it as tested by virtue of it working in my application.

One caution to any future readers of this thread: Make sure you know whether the ID Locations for your target chip are left or right justified. I am using the PicFlash programmer from mikroElectronika to burn programs to my target 18F4550 because it permits you to edit the ID Locations at burn time. In the case of the 18F4550 the ID Locations are left justified (ID(0) at left ID(7) at far right) as they appear in the window screen on PicFlash. I spent a lot of time discovering this while my code was using ID(7) when I thought I was using ID(0). Just a warning to possibly save you some the time I had to waste. Check your programmer on whether left or right justified!