Hi, colleague! > Does anybody have any previous exprience on running the > Pic 14000 's A/D . I do. > I just can't seem to get it to work. > This is not finger troubles I have done everything according to the > book .And checked it for about 10 times that it is right. It should work then. Assume (1) you forgot to init this tricky SLPCON register (and that little ADOFF bit of it). I set SLPCON to 0x10 this enables ADC and switches the summing junction off. > But the Counter just doesn't give any interupt if I clear it at the start, like > they say in the book. > I have physically toggled a port pin in the Inerupt Service routine to > show that there is a interupt happening ,and it just doesn't happen. > If I just start and stop the A/D at say 10ms intervals I can see the > cap charging and discharging very nicely at the CDAC pin. Check the form of the saw on your capacitor. Assume (2) you reset module and discharge capacitor before IRQ occurs. In the case you would see the "saw" uninterrupted /|/|/|/| and so on. Solution: increase CDAC current, or decrease C until you see something like this /|__/|__ (1.1) /^^^| /^^^| or this / |/ |/ (1.2) Note: I, C, conv. time and resolution relations are in the end of chapter 8 of PIC14000 datasheet (8.8) 1.1 would mean you're ok and you must have an interrupt 1.2 would mean you weren't resetting cap (but you were) or you selected wrong channel and zero or less voltage is on the comparator's positive input. Solution: check ADCON0<7:4> > But it chages past 1.2v for example witch is the bandgap refrence > voltage without interupting. Bandgap reference is not the highest witch :) and the ramp may rise as high as 3.5V ok according to the manual. I believe even higher. > It doesn't interupt on overflow either the A/D starts to run and > never interupts again. > The interupts are set right as well. > The worst is, it simulates right on MPLAB but doesn't work in real > life. > Any sugestions ? > > Thanks > Corne Write if it helped and if not I would start thinking deeper. sincerely yours, Andrew. PS. I'm newcomer and always got messages "not delivered" from Administrator. So I'm sending to you and to LIST. Please tell me if it came to the LIST or only by your mail? And what should I do to send message to the PICLIST properly. Thank you.