SCLD peripheral of the KL46Z

Dependents:   FRDM-KL46Z LCD rtc Demo KL46Z EE202A_HW1_MH SignalGenerator ... more

Embed: (wiki syntax)

« Back to documentation index

SLCD Class Reference

SLCD Class Reference

SLCD peripheral of the FRDM-KL46Z
Inherits mbed::Stream and supports the majority of Stream functions. More...

#include <SLCD.h>

Public Member Functions

 SLCD ()
 Construct an SLCD object.
void Home ()
 Move the SLCD cursor to the first character.
void Contrast (uint8_t lbContrast)
 Set contrast.
void clear ()
 Turn off all segments.
void DP (int pos, bool on)
 Turn a decimal point on or off.
void Colon (bool on)
 Turn the colon symbol on or off.

Data Fields

uint8_t CharPosition
 Current cursor position.

Detailed Description

SLCD peripheral of the FRDM-KL46Z
Inherits mbed::Stream and supports the majority of Stream functions.

#include "mbed.h"
#include "SLCD.h"

SLCD slcd;

main()
{
    slcd.Home();            // Moves cursor to position 0 (start)
    slcd.printf("1.2.3.4"); // Standard printf function, only characters in ASCII_TO_WF_CODIFICATION_TABLE will display
    // Dots printed using decimal points
    slcd.putc('A');         // Prints a single character
    
    while(1);   // Wait forever
}

Definition at line 51 of file SLCD.h.


Constructor & Destructor Documentation

SLCD (  )

Construct an SLCD object.

Definition at line 86 of file SLCD.cpp.


Member Function Documentation

void clear (  )

Turn off all segments.

Definition at line 209 of file SLCD.cpp.

void Colon ( bool  on )

Turn the colon symbol on or off.

Definition at line 270 of file SLCD.cpp.

void Contrast ( uint8_t  lbContrast )

Set contrast.

Parameters:
lbContrast0 - 15, 0 lightest, 15 darkest

Definition at line 203 of file SLCD.cpp.

void DP ( int  pos,
bool  on 
)

Turn a decimal point on or off.

Parameters:
posdecimal point position: 0-2
onTrue or False

Definition at line 230 of file SLCD.cpp.

void Home (  )

Move the SLCD cursor to the first character.

Definition at line 198 of file SLCD.cpp.


Field Documentation

uint8_t CharPosition

Current cursor position.

Definition at line 79 of file SLCD.h.