I already have changed the chip & verified the code and chip on another board. It just has to receive the data from Xbee receiver on its Rx pin,do some calculations & send it through Tx pin to LCD. Both Xbee & 18F1320 work fine when separated. As soon as 18F1320 is inserted in circuit something weird goes on.
Bookmarks