320x240 TFT LCD Display (using SPI)

I love displays and the moment when a TFT color display lights up with your code displaying information is just great. There are a lot of reasonably priced displays and the connection of a 2.2" TFT with SPI interface is done easily:

To drive the display, we need the UTFT library from Henning Karlsen, a brilliant library for all kid of displays that is useable for arduino as well as for chipkit.

However, Henning did not have a board with the PIC32MX250 chip so I had to apply some minor adjustments to enable this board. The modified library can be downloaded here.

Apart of that the display can be used with the UTFT_Demo_320x240_Serial demo code as follows:

const uint8_t LEFT=0;
const uint8_t RIGHT=1;
uint8_t nP[2][8] = {{ 0,17, 9,10,11,12,13,14},{18,17, 1, 2, 3, 6, 7, 8}};
const uint8_t TFT_CS  = nP[RIGHT][7];
const uint8_t TFT_RST = nP[RIGHT][6];
const uint8_t TFT_RS  = nP[RIGHT][5];
const uint8_t TFT_SDA = nP[RIGHT][4];
const uint8_t TFT_SCL = nP[RIGHT][3];
#include <UTFT.h>
// Declare which fonts we will be using
extern uint8_t SmallFont[];
// Usage: myGLCD(<model code>, SDA, SCL, CS, RST[, RS]);
// Serial 2.2" TFT 320x240