Just make sure that all register match from one to another. Sometimes, some specific bits on a device are not located at the same place on another one.

If you don't mind, post your code here.