Sample code for MCP46XX devices
Where I can find a demo code for the MCP46xx devices?
Sample code is available on the "MCP46XX PICtail Plus Daughter Board" product page. Look under the "Documentation & Software" section to locate MCP46XXDM PTPLS.c from the demo code folder. The file contains code and should help you understand the sequence of commands used on an MCP46xx.