Firstly check, you got the battery terminals round the right way, black to black, red to red, You didnt need to turn the mains off, that was a mistake really, i can only imagine you assumed like many the circuit board is AC and you didnt want to get a shock, It is in fact DC, direct current, which is perfectly safe at 13.6 volts, please dont touch the board un-less you really have too, as static in the body dosent do the ICs a lot of good,
The NVM chip does retain memory in total power failure, but with time these do fail.
If the panel accepts your code, you should be ok,
Check the battery terminals and get back to me,
im on 07842 480037
Nick, November 2010