Thanks milan.rajik. Yes I am using mikroC PRO Compiler. Actually I was trying to write a code for Home UPS. During battery charging I intended to check the charging current at a particular point of each half cycle of AC mains. If ADC sampling of charging current is taken at random, reading may differ to a great extent for an average value. Thus it will not be possible to maintain a constant charging current. Hence I thought to take sample immediately after zero cross pulse which is used as external interrupt, thus the value of sample for charging current will be more or less same. That's why I have put ADC_Read() function in ISR. Have you got the idea? Please suggest any way.
swapan