Library for Mini-DK board

Dependencies:   SPI_TFT_ILI9320

Dependents:   LPC1768_Mini-DK_EasyWeb_DM9161 LPC1768_Mini-DK LPC1768_Mini-DK

Fork of Mini-DK by Frank Vannieuwkerke

Mini-DK board overview (Micro SD connector is at the bottom side)

One serial interface , uses CP2102 (USB to RS232 interface, support ISP download )

RJ45-10/100M Ethernet network interface (Ethernet PHY: DM9161)

2.8 inch TFT color LCD interface (SPI interface or 16Bit parallel interface)

Touch panel controller XPT2046 (ADS7843 compatible)

USB 2.0 interface, USB host and USB Device interface.

TF SD / MMC card (SPI) interface.

Two user buttons, One Reset button and ISP button , One INT0 button, two user-programmable LED lights

Serial ISP download, Standard 20-pin JTAG download simulation debugging interface.

Selection between external 5V power supply or USB 5V supply.

Board size: 95mm * 78mm

All IO available on extension connectors

/media/uploads/frankvnk/mini-dk_top.jpg

04/01/13

Erik Olieman (http://mbed.org/users/Sissors/) joined the code development for the Mini-DK board.

Thanks to his input, we were able to obtain a tremendous speed gain, remove warnings, ...

An overview of all modifications is stored in modifs.h

The old page (http://mbed.org/users/frankvnk/code/LPC1768_Mini-DK/) contains the demo code.

IMPORTANT : Due to a change in the mbed libraries (Stream()), we cannot use the printf instruction - we need to use <SPI_TFT>.printf (example - see main.cpp in http://mbed.org/users/frankvnk/code/LPC1768_Mini-DK/)

WARNING: filetoflash (SD to CPU flash)

The SPI_TFT library 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).

14/01/13

A newer version of the Mini-DK has been released by the manufacturer: Mini-DK2. They replaced the DM9161 PHY with a LAN8720A PHY and better buttons are fitted on the board. All other hardware remains the same. Code for this PHY is available from the NXP MCU SW application team. This allows us to use the mbed 'EthernetInterface' library with little modifications. Further info - see http://mbed.org/forum/mbed/topic/3684/?page=1#comment-18473.

Notes:

The code in 'lpc_phy_lan8720.c' uses 'msDelay' - needs to be replaced with 'osDelay'.

A custom MAC address can be defined using following code:

extern "C" void mbed_mac_address(char * mac) {
 
// define your own MAC Address
  mac[0] = 0x00;  
  mac[1] = 0x01;  
  mac[2] = 0x02;  
  mac[3] = 0x03;  
  mac[4] = 0x04;  
  mac[5] = 0x05;           
  
};
Committer:
frankvnk
Date:
Tue Nov 04 21:43:48 2014 +0000
Revision:
23:67989b4f61ad
Parent:
19:6816fa47b39e
Updated SPI_TFT_ILI9320 library to the latest version (auto-detect ILI9320, 9325 and 9328)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
frankvnk 7:ffdd4e75b366 1 /**************************************************************************************************
frankvnk 7:ffdd4e75b366 2 ***** *****
frankvnk 7:ffdd4e75b366 3 ***** Name: Mini_DK.h *****
frankvnk 7:ffdd4e75b366 4 ***** Ver.: 1.0 *****
frankvnk 7:ffdd4e75b366 5 ***** Date: 04/01/2013 *****
frankvnk 7:ffdd4e75b366 6 ***** Auth: Erik Olieman *****
frankvnk 7:ffdd4e75b366 7 ***** Func: Includes, pin and macro Declarations for the Mini DK board *****
frankvnk 7:ffdd4e75b366 8 ***** *****
frankvnk 7:ffdd4e75b366 9 **************************************************************************************************/
Sissors 16:be1a10246234 10 //Uncomment the following line if you need more flash memory.
Sissors 16:be1a10246234 11 //#define NO_FLASH_BUFFER
Sissors 16:be1a10246234 12
frankvnk 19:6816fa47b39e 13 #include "SPI_TFT_ILI9320.h"
frankvnk 2:d0acbd263ec7 14 #include "Arial12x12.h"
frankvnk 2:d0acbd263ec7 15 #include "Arial24x23.h"
frankvnk 2:d0acbd263ec7 16 #include "Arial28x28.h"
frankvnk 2:d0acbd263ec7 17 #include "font_big.h"
frankvnk 2:d0acbd263ec7 18 #include "Touch.h"
frankvnk 2:d0acbd263ec7 19
frankvnk 2:d0acbd263ec7 20 #define DK_KEY1 P2_11
frankvnk 2:d0acbd263ec7 21 #define DK_KEY2 P2_12
frankvnk 2:d0acbd263ec7 22
frankvnk 2:d0acbd263ec7 23 #define DK_LED1 P3_25
frankvnk 2:d0acbd263ec7 24 #define DK_LED2 P3_26
frankvnk 2:d0acbd263ec7 25
frankvnk 2:d0acbd263ec7 26 #define LCD_SCK P0_15
frankvnk 2:d0acbd263ec7 27 #define LCD_CS P0_16
frankvnk 2:d0acbd263ec7 28 #define LCD_SDO P0_17
frankvnk 2:d0acbd263ec7 29 #define LCD_SDI P0_18
frankvnk 2:d0acbd263ec7 30 #define LCD_BL P1_26
frankvnk 2:d0acbd263ec7 31
frankvnk 2:d0acbd263ec7 32 #define TP_IRQ P2_13
frankvnk 2:d0acbd263ec7 33 #define TP_CS P0_6
frankvnk 2:d0acbd263ec7 34 #define TP_SCK P0_7
frankvnk 2:d0acbd263ec7 35 #define TP_SDO P0_8
frankvnk 2:d0acbd263ec7 36 #define TP_SDI P0_9
Sissors 5:781a72d380a1 37
Sissors 5:781a72d380a1 38 #define SD_SDO P1_23
Sissors 5:781a72d380a1 39 #define SD_SDI P1_24
Sissors 5:781a72d380a1 40 #define SD_SCK P1_20
Sissors 5:781a72d380a1 41 #define SD_CS P1_21
Sissors 5:781a72d380a1 42 #define SD_CD P1_25
Sissors 5:781a72d380a1 43
Sissors 5:781a72d380a1 44 #define DISABLE_LCD_MISO (LPC_PINCON->PINSEL1) &= ~(0x02<<2);
Sissors 5:781a72d380a1 45 #define ENABLE_LCD_MISO (LPC_PINCON->PINSEL1) |= (0x02<<2);