User manual

GHI Electronics,LLC Embedded Master User Manual
Hardware and Software Library
Example
using Microsoft.SPOT.Hardware;
namespace MyNamespace
{
class Program
{
public static void Main()
{
// Make E40 output with a low initial value
OutputPort outPin = new OutputPort(EmbeddedMaster.Pins.E40,
false);
// make it high
outPin.Write(true);
Thread.Sleep(Timeout.Infinite);
}
}
}
Reference
Microsoft.SPOT.Hardware.Port
Microsoft.SPOT.Hardware.OutputPort
Microsoft.SPOT.Hardware.TristatePort
Microsoft.SPOT.Hardware.InputPort
Microsoft.SPOT.Hardware.InterruptPort
GHIElectronics.Hardware.EmbeddedMaster.Pins
11.3. SPI
Many devices that require high speed transfers use SPI, such as displays and MP3
decoders. In general, SPI is a 4-wire bus with one master and one or more slaves. MOSI
(Master Out Slave In) is used for transferring data going from master to slave. MISO
(Master In Slave Out) transfers data from slave to master. Data is simply swapped
between master and slave. Transferring data in one direction only is not possible. The
master initiates the transfer using SCK (Serial Clock). When transferring a byte (8 bits) or
a word (16 bits) of data, the master will clock SCK 8 times or 16 . SSEL (Serial Slave
Select) or sometimes called CS (Chip Select) is used to select the slave that should
respond to SCK. Every slave on the system requires a dedicated SSEL from the master.
SPI1 Pin-out Description
Rev. 2.06 TFT Page 61 of 102 www.ghielectronics.com