Having installed the LCD, it was time to get the code working for it. First I realised that it may not have been so clever to put the LCD on the same SPI port as the encoders. This will mean that I have to take care that the encoders are not being read when the LCD is active. Since the encoders are sampled every interrupt, it means turning them off while writing to the screen. That, in turn, means not writing to the screen while moving, or holding position. I may end up having to patch the board to put the LCD on the other SPI port. In fact, I wish I had done that in the first place as it would just share lines with the UART and I could easily switch between the UART and the SPI for writing debugging messages. Ah well, live and learn.Turns out I wired up the LCD module incorrectly and destroyed it. Fortunately I had several spares so I built up another. These things are cheaper than text displays so it is no great loss. Attaching wires to the LCD display is easier than you might think. As supplied, the Nokia 3410 LCD display comes as part of a replacement panel that looks like this:
Prise off the aluminium surround and the actual display element will come free. It is attached with a small amount of adhesive or double-sided tape. Sprung contacts serve to make the connection between the display and the phone main board. These too are attached with adhesive and can be removed to reveal a row of small pads to which you can solder wires. [See warning in comment below before removing this connector]. I used polyurethane coated copper wire from a Verowire pen (about 0.15mm diameter). The ends of the wires are stripped by simply heating with the soldering iron set to about 400 degrees Fahrenheit:
These wires are then taken to pin headers on a matrix board so that the entire assembly can be plugged into the mouse when needed. once the connections have been tested, the LCD is held onto the carrier with some double-sided foam adhesive pads.
It does not weigh much and could probably be left in place when running. The mouse looks a lot better with it off though. For now, a simple ‘hello’ is enough to show that it works.