Excellent code. I spent about half a day trying to interface a Nokia 5110 display to a TI MSP-EXP430F5438 board (with Bluetopia BT code) using SPI interface with no success. Before dusting off the O'scope to try to troubleshoot I gave your code a try and it worked the first time!