On Tue, 1 Jan 2002 00:36:44 +0200, Arkady Skorokhod wrote: >Hello. > >Could somebody, please, have a look at a portion of my program to find = what`s wrong here. As you can see, the program is intended >to perform an A-D conversion on the PIC12C672. And yes, it DOES the job.= The problem is that it takes some 10s ms the DoAD_0 >subroutine (see at the bottom of code) to exit, whereas it should be on = the magnitude of microseconds ( the conversion itself should take >9.5 * Tad =3D ~20us - according to the datasheet). It seems as PIC just = wakes up from sleep due to WDT overflow rather then by end-of-conversion >interrupt. Is the A/D interrupt effectively disabled here, why? What`s = wrong? >=20 I'm not all that familiar with the 12 series parts and I don't have a datasheet handy. Assuming that they are similar to the 16 series parts, shouldn't you be setting GIE somewhere in your code?=20 In the 16 series parts, setting PEIE is a good thing to do but you still won't get interrupts unless GIE is set. Regards, Bob -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body