LPC1768 Mini-DK board with 2.8" SPI TFT and SPI touch

Dependencies:   Mini-DK mbed SDFileSystem

WARNING: filetoflash (SD to CPU flash)

The SPI_TFT library called from Mini-DK.lib contains an option to copy an image from the SD card to the CPU flash memory. This allows you to use an image as background without speed loss when writing other text and graphics.

By default, this option is enabled.

It can be disabled by uncommenting the #define mentioned below in Mini_DK.h:

#define NO_FLASH_BUFFER

Since the flash memory has limited write endurance, DO NOT use this feature when you intend to read multiple images from the SD card (eg: when used as a photo frame).

Revision:
2:d0acbd263ec7
Child:
3:fb4d62b5ffb3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modifs.h	Thu Jan 03 10:54:09 2013 +0000
@@ -0,0 +1,82 @@
+/*
+Date   : 31.12.12
+Author : Erik Olieman
+---------------------
+Code readability and speed
+1. created separate structure for mini-DK (base for library)
+2. Removed wr_dat_only routine (uses 8 bit transfer = slow)
+   Replaced each wr_dat_only with
+     _spi.format(16,3);
+     .....
+     _spi.write(...);
+     .....
+     _spi.format(8,3);
+3. Creation of Mini-DK.h with all declarations specific to the mini-DK board.
+
+
+Date   : 31.12.12
+Author : Frank Vannieuwkerke
+----------------------------
+      NOTE : Current code contains SPI_TFT *LCD; in Touch.h
+             TouchPanel_Calibrate, TP_DrawPoint and DrawCross in Touch.cpp use LCD->...
+             These are currently commented out since using them locks up the system although
+             the compiler does not show any errors. Current code works but the calibration
+             crosshairs do not show - touching their approximate position still allows you to
+             calibrate and draw (TP.TP_DrawPoint in main.cpp temporarily replaced with TFT.rect).
+             
+             ??Other solution : see TODOs below??
+                Possible advantage of this solution :
+                    Touch library fully independent of LCD library.
+                    Perhaps do Calibration with a printed template when LCD is not used (less accurate).
+                    This would only be useful when a touchpanel without LCD is used.
+             
+
+      Removed reset pin from SPI_TFT (not needed - pin is connected to main reset).
+
+      Separated SPI_TFT from TouchADS7843
+      
+      In main.cpp
+      ----------- 
+      TODO: before TP.TouchPanel_Calibrate()
+                cls
+                draw 3 crosses with numbers according to DisplaySample in touch.cpp
+                Use following text : Calibration - Touch each crosshair in the numbered sequence.
+            after TP.TouchPanel_Calibrate()
+                cls
+
+      Moved following global touch var declarations (at top of main.cpp) to touch.cpp/.h
+        Matrix      matrix;
+        Coordinate  display;
+        Coordinate  screen;
+        NOTE : i did not create a class with var readback, just used plain C notation.
+               These vars can be accessed from other code through <classname>.<varname>
+               example : TP.display.x
+               Only drawback : Each element of these vars needs to be initialised separately.
+                               (initialisation of these vars is not possible with array notation).
+
+      In Touch.cpp/.h
+      ---------------
+      Removed TP_Init - moved TP_init code to constructor.
+
+      TODO : Avoid using TFT_LCD library : remove all references to LCD driving
+                                           remove Drawpoint and Drawcross
+                                           remove #include Arial12x12
+
+      Variables in call to TouchPanel_Calibrate, Read_Ads7846, getDisplayPoint are no longer needed.
+      Modified these routines accordingly in touch.cpp/.h (pointers no longer needed)
+      *** TouchPanel_Calibrate and getDisplayPoint already modified.
+
+      TODO: Problem with Read_Ads7846 -> is also called in TouchPanel_Calibrate (Touch.cpp) with other var. 
+            Solution : in TouchPanel_Calibrate, change screen_cal to screen_tmp and copy (TP.)screen to this
+                       variable. Put screen_tmp back to (TP.)screen after setCalibrationMatrix.
+
+
+
+General notes
+-------------
+lpc1768 SPI port - problem with using SD and TFT simultaneously
+see note http://mbed.org/comments/cr/83/2654/#c4768
+google search : lpc1768 ssp ssp0 ssp1
+perhaps use softspi (eg http://arduino.cc/forum/index.php?topic=117356.0)
+Ignore above notes - use Erik Olieman's solution. 
+*/
\ No newline at end of file