C# Class CyrusBuilt.MonoPi.LED.TM16XXBase

This class is the base class for the TM1638/TM1640 board. It is a port of the TM1638 library by Ricardo Batista URL: http://code.google.com/p/tm1638-library/
Inheritance: IDisposable
ファイルを表示 Open project: cyrusbuilt/MonoPi

Public Properties

Property Type Description
CharMap Byte>.Dictionary

Public Methods

Method Description
ActivateDisplay ( System.Boolean active ) : void

Activates or deactivates the display.

ClearDisplay ( ) : void

Clears the display.

ClearDisplayDigit ( Byte pos, System.Boolean dot ) : void

Clears the display digit.

Dispose ( ) : void

Releases all resource used by the CyrusBuilt.MonoPi.LED.TM16XXBase object.

Call Dispose when you are finished using the CyrusBuilt.MonoPi.LED.TM16XXBase. The Dispose method leaves the CyrusBuilt.MonoPi.LED.TM16XXBase in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.LED.TM16XXBase so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.LED.TM16XXBase was occupying.

Receive ( ) : Byte

Receives data from the display driver.

Send ( Byte data ) : void

Send the specified data to the display.

SendChar ( Byte pos, Byte data, System.Boolean dot ) : void

Sends the specified character to the display.

SendCommand ( Byte cmd ) : void

Sends the command.

SendData ( Byte address, Byte data ) : void

Sends the specified data to the device.

SetDisplay ( Byte values, Int32 size ) : void

Sets the display to the specified values.

SetDisplayDigit ( Byte digit, Byte pos, System.Boolean dot ) : void

Sets the specified digit in the display.

SetDisplayToError ( ) : void

Sets the display to error.

SetDisplayToString ( String s ) : void

Sets the display to the specified string.

SetDisplayToString ( String s, Byte dots, Byte pos ) : void

Sets the display to the specified string.

SetupDisplay ( System.Boolean active, Int32 intensity ) : void

Sets up the display.

TM16XXBase ( IRaspiGpio data, IRaspiGpio clock, IRaspiGpio strobe, Int32 displays, System.Boolean activate, Int32 intensity ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.LED.TM16XXBase class with the data pin, clock pin, strobe pin, the number of supported characters, activation flag, and intensity level.

Method Details

ActivateDisplay() public method

Activates or deactivates the display.
public ActivateDisplay ( System.Boolean active ) : void
active System.Boolean /// Set true to activate; false to deactivate. ///
return void

ClearDisplay() public method

Clears the display.
public ClearDisplay ( ) : void
return void

ClearDisplayDigit() public method

Clears the display digit.
public ClearDisplayDigit ( Byte pos, System.Boolean dot ) : void
pos Byte /// The position to start clearing the display at. ///
dot System.Boolean /// Set true to clear dots. ///
return void

Dispose() public method

Releases all resource used by the CyrusBuilt.MonoPi.LED.TM16XXBase object.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.LED.TM16XXBase. The Dispose method leaves the CyrusBuilt.MonoPi.LED.TM16XXBase in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.LED.TM16XXBase so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.LED.TM16XXBase was occupying.
public Dispose ( ) : void
return void

Receive() public method

Receives data from the display driver.
public Receive ( ) : Byte
return Byte

Send() public method

Send the specified data to the display.
public Send ( Byte data ) : void
data Byte /// The byte of data to send. ///
return void

SendChar() public abstract method

Sends the specified character to the display.
public abstract SendChar ( Byte pos, Byte data, System.Boolean dot ) : void
pos Byte /// The position to set the character at. ///
data Byte /// The character data to send. ///
dot System.Boolean /// Set true to enable the dot. ///
return void

SendCommand() public method

Sends the command.
public SendCommand ( Byte cmd ) : void
cmd Byte /// A byte representing the command. ///
return void

SendData() public method

Sends the specified data to the device.
public SendData ( Byte address, Byte data ) : void
address Byte /// The address to write the data at. ///
data Byte /// The data to send. ///
return void

SetDisplay() public method

Sets the display to the specified values.
public SetDisplay ( Byte values, Int32 size ) : void
values Byte /// The values to set to the display. ///
size System.Int32 /// ///
return void

SetDisplayDigit() public method

Sets the specified digit in the display.
public SetDisplayDigit ( Byte digit, Byte pos, System.Boolean dot ) : void
digit Byte /// The digit to set. ///
pos Byte /// The position to set the digit at. ///
dot System.Boolean /// Set true to turn on the dot. ///
return void

SetDisplayToError() public method

Sets the display to error.
public SetDisplayToError ( ) : void
return void

SetDisplayToString() public method

Sets the display to the specified string.
public SetDisplayToString ( String s ) : void
s String /// The string to set the display to. ///
return void

SetDisplayToString() public method

Sets the display to the specified string.
public SetDisplayToString ( String s, Byte dots, Byte pos ) : void
s String /// The string to set the display to. ///
dots Byte /// Set true to turn on dots. ///
pos Byte /// The character position to start the string at. ///
return void

SetupDisplay() public method

Sets up the display.
public SetupDisplay ( System.Boolean active, Int32 intensity ) : void
active System.Boolean /// Set true to activate. ///
intensity System.Int32 /// The display intensity level (brightness). ///
return void

TM16XXBase() public method

Initializes a new instance of the CyrusBuilt.MonoPi.LED.TM16XXBase class with the data pin, clock pin, strobe pin, the number of supported characters, activation flag, and intensity level.
public TM16XXBase ( IRaspiGpio data, IRaspiGpio clock, IRaspiGpio strobe, Int32 displays, System.Boolean activate, Int32 intensity ) : System
data IRaspiGpio /// The data pin. ///
clock IRaspiGpio /// The clock pin. ///
strobe IRaspiGpio /// The strobe pin. ///
displays System.Int32 /// The number of characters to display. ///
activate System.Boolean /// Set true to activate the display. ///
intensity System.Int32 /// The display intensity (brightness) level. ///
return System

Property Details

CharMap public_oe static_oe property

The character map for the seven segment displays. The bits are displayed by mapping bellow -- 0 -- | | 5 1 -- 6 -- 4 2 | | -- 3 -- .7
public static Dictionary CharMap
return Byte>.Dictionary