User manual
GHI Electronics,LLC Embedded Master User Manual
Hardware and Software Library
// divisor and fraction for baudrate 921600
// see LPC2468 User Manual for details
uint divisor = 4;
uint frac = ((9 << 4) | 2);
uint i;
// open serial port at any baudrate (COM2)
SerialPort port = new SerialPort("COM2", 115200, Parity.None, 8, StopBits.One);
port.ReadTimeout = Timeout.Infinite;
port.Open();
// UART1 needed registers
Register U1DLL = new Register(0xE0010000);
Register U1DLM = new Register(0xE0010004);
Register U1FDR = new Register(0xE0010028);
Register U1LCR = new Register(0xE001000C);
// Switch baudrate
i = U1LCR.Read();
U1LCR.Write(0x80);
U1DLL.Write(divisor);
U1DLM.Write(divisor >> 8);
U1LCR.Write(i);
U1FDR.Write(frac);
Reference
Microsoft.SPOT.Hardware.SerialPort
11.6. Hardware Piezo
.NET Micro Framework contains support for piezo. All piezo work is done in hardware with
almost no processor interaction. The tones are queued and then played when current tone
is done playing.
PIN# TFT# Name Description
13 13 Piezo Piezo hardware control
Embedded Master supports a mono phonic Piezo.
Example
// Freq 1000, duration 10 ms
Utility.Piezo(1000, 10);
Reference
Microsoft.SPOT.Hardware.Utility.Piezo
Rev. 2.06 TFT Page 66 of 102 www.ghielectronics.com