In India with a power shortage of about 10% of installed capacity, the transmission and distribution losses are relatively high. One of the reasons for the large loss is the excessive reactive loads on the primary distribution feeder. With the right amount of reactive power compensation, as system load varies, line losses can be considerably reduced. The application of Artificial Neural Network (ANN) is an emerging area where a properly trained ANN can be advantageously used for sufficient amount of reactive power compensation under varying load conditions. This paper describes the methodology adopted for training an ANN network for reactive power compensation without human intervention. The ANN is implemented using a DSPIC 30F2010 (Digital Signal Peripheral Interface Controller) and verified on a simulated laboratory network . The results obtained are satisfactory.