User manual

GHI Electronics,LLC Embedded Master User Manual
Hardware and Software Library
PIN# TFT# Name Description
37 47 SPI1_MOSI SPI1 Master Out Slave In
38 48 SPI1_MISO SPI1 Master In Slave Out
39 49 SPI1_SSEL SPI1 Slave Select
40 50 SPI1_SCK SPI1 Serial Clock
SPI2 Pin-out Description
User cannot use SPI2 if it is used by the SPI-based Embedded Master LCD Driver.
PIN# TFT# Name Description
49 59 (LCD)SPI2_MOSI SPI2 Master Out Slave In
51 48 (LCD)SPI2_MISO SPI2 Master In Slave Out
46 56 (LCD)SPI2_SSEL SPI2 Slave Select
48 58 (LCD)SPI2_SCK SPI2 Serial Clock
Embedded Master supports two SPIs, one is dedicated for the LCD
(SPI.SPI_module.SPI2) but user can use it if not using SPI based LCD and the other one
is available to the user which is SSP0 on the LPC2478 chip. SPI Module
(SPI.SPI_module.SPI1).
The SPI.Configuration class constructor takes several arguments, note that
ChipSelect_HoldTime and ChipSelect_SetupTime are not supported.
Example
using Microsoft.SPOT.Hardware;
namespace MyNamespace
{
class Program
{
public static void Main()
{
// create two bytes of data
byte [ ]data = new byte[2];
data[0] = 0x30;
data[1] = 0x55;
// Use, E26 for Chip Select, Chip Select Active low, setup time is 0, hold
time is 0, IdleStat false, clock edge false, clock rate 3000, SPI1
SPI.Configuration config = new
SPI.Configuration(EmbeddedMaster.Pins.E26, false, 0, 0,
false, false, 3000, SPI.SPI_module.SPI1);
SPI spi = new SPI(config);
// send data
Rev. 2.06 TFT Page 62 of 102 www.ghielectronics.com