i use delay(1000) of MikroC in the programming pic18f452 but the problem the PIC wlll not delay correct and i see sometimes if the voltage of PIC between 5v and 6v thePIC will give you correct delay if more or less than this the PIC will give wrong delay.... is this correct how i can get correct delay
How much deviation are you seeing? What type of crystal are you using - parallel or series? Do your load capacitors meet the requirements of the crystal?
the capacitor =22pf, crystal=10 mhz
PIC18f452
i make the dealy will work in the program if the input port pin#36= on
i use MikroC
what i see
if the voltage of PIC and (input port pin #36 on )between 5-7V the delay loop
will delay correctly
if more 7V the PIC will not give you right delay