Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: CSC1300_EduBaseV2_Lab0 mbed_blinky EduBaseV2_Lab0 mbed_blinky ... more
TextLCD Class Reference
A TextLCD interface for driving a HD44780 LCD character module connected via a 74HC595 using the F031K6 SPI peripheral. More...
#include <TTU_CSC1300.h>
Public Member Functions | |
TextLCD (LCDCursor cur) | |
Constructor to create a TextLCD interface. | |
int | putc (int c) |
Write a character to the LCD at the current cursor location. | |
int | printf (const char *format,...) |
Write a formated string to the LCD at the curren cursor location. | |
void | setLocation (int column, int row) |
Locate cursor to a screen row and column. | |
void | cls () |
Clear the screen and locate to 0,0. | |
void | setCharacter (int row, int column, int c) |
Right a single character to a specific location. | |
void | setCursor (LCDCursor c) |
Change the LCD cursor mode. |
Detailed Description
A TextLCD interface for driving a HD44780 LCD character module connected via a 74HC595 using the F031K6 SPI peripheral.
Specifically, the Nucleo32 F031K6 boards plugged into the Edubase-V2 via the adapter used at Tennessee Tech.
Supports only the 16x2 display on the EduBase-V2 board
#include "mbed.h" #include "TTU_CSC1300.h" TextLCD lcd(TextLCD::LCD_CURSOR_ON_BLINKING_ON); // select your cursor style int main() { lcd.printf("Hello World!\n"); }
Definition at line 235 of file TTU_CSC1300.h.
Constructor & Destructor Documentation
TextLCD | ( | LCDCursor | cur ) |
Constructor to create a TextLCD interface.
- Parameters:
-
cur Desired behavior of LCD cursor
- See also:
- setCursor()
- TextLCD::LCD_CURSOR_OFF_BLINKING_OFF No cursor and no blinking block
- TextLCD::LCD_CURSOR_OFF_BLINKING_ON No cursor and but blinking block
- TextLCD::LCD_CURSOR_ON_BLINKING_OFF Underline cursor and no blinking block
- TextLCD::LCD_CURSOR_ON_BLINKING_ON Both underlinecursor and blinking block
Definition at line 176 of file TTU_CSC1300.cpp.
Member Function Documentation
void cls | ( | ) |
Clear the screen and locate to 0,0.
Definition at line 212 of file TTU_CSC1300.cpp.
int printf | ( | const char * | format, |
... | |||
) |
Write a formated string to the LCD at the curren cursor location.
- Parameters:
-
format A printf-style format string, followed by the variables to use in formating the string.
- Note:
- A string is denoted whthin double-quotes.
int putc | ( | int | c ) |
Write a character to the LCD at the current cursor location.
- Parameters:
-
c The character to write to the display
- See also:
- setLocation()
void setCharacter | ( | int | row, |
int | column, | ||
int | c | ||
) |
Right a single character to a specific location.
- Parameters:
-
row The vertical position from the top, indexed from 0 column The horizontal position from the left, indexed from 0 c The character to display on-screen
- Note:
- A character is denoted within single-quotes (apostrophes)
Definition at line 207 of file TTU_CSC1300.cpp.
void setCursor | ( | LCDCursor | c ) |
Change the LCD cursor mode.
- Parameters:
-
c A LCDCursor type denoted the cursor and blink
- See also:
- TextLCD::LCD_CURSOR_OFF_BLINKING_OFF
- TextLCD::LCD_CURSOR_OFF_BLINKING_ON
- TextLCD::LCD_CURSOR_ON_BLINKING_OFF
- TextLCD::LCD_CURSOR_ON_BLINKING_ON
Definition at line 202 of file TTU_CSC1300.cpp.
void setLocation | ( | int | column, |
int | row | ||
) |
Locate cursor to a screen row and column.
- Parameters:
-
row The vertical position from the top, indexed from 0 column The horizontal position from the left, indexed from 0
Definition at line 218 of file TTU_CSC1300.cpp.
Generated on Sun Aug 7 2022 05:37:53 by
