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: mbed_PT6302 mbed_PT6301
PT6302_HANNSTAR Class Reference
Constructor for class for driving Princeton PT6302 VFD controller as used in HANNSTAR. More...
#include <PT6302.h>
Inherits PT6302.
Public Types | |
| enum | Mode |
Enums for display mode. More... | |
Public Member Functions | |
| PT6302_HANNSTAR (PinName mosi, PinName sclk, PinName cs) | |
| Constructor for class for driving Princeton PT6302 VFD controller as used in HANNSTAR. | |
| int | putc (int c) |
| Write a character to the Display. | |
| int | printf (const char *format,...) |
| Write a formatted string to the Display. | |
| void | locate (int column) |
| Locate cursor to a screen column. | |
| void | cls (bool clrAll=false) |
| Clear the screen and locate to 0. | |
| int | columns () |
| Number of screen columns. | |
| void | setPort (char port=0) |
| Set Port. | |
| void | setVGen (bool on=true) |
| Set VFD VGen. | |
| void | cls () |
| Clear the screen. | |
| void | setBrightness (char brightness=PT6302_BRT_DEF) |
| Set Brightness. | |
| void | setDisplay (bool on) |
| Set the Display mode On/off. | |
| void | setUDC (unsigned char udc_idx, UDCData_t udc_data) |
| Set User Defined Characters (UDC) | |
| void | writeData (char data, char address) |
| Write Data to PT6302. | |
| void | writeAData (char adata, char address) |
| Write Additional Data to PT6302. | |
Protected Member Functions | |
| virtual int | _putc (int value) |
| Write a single character (Stream implementation) | |
| virtual int | _getc () |
| Get a single character (Stream implementation) | |
| void | _writeCmd (char cmd, char data) |
| Write command and parameters to PT6302. | |
| void | _writeCmd (char cmd) |
| Write command to PT6302. | |
Detailed Description
Constructor for class for driving Princeton PT6302 VFD controller as used in HANNSTAR.
Supports 16 Grids of 35 Segments without additional Segments.
- Parameters:
-
PinName mosi, sclk, cs SPI bus pins
Definition at line 387 of file PT6302.h.
Member Enumeration Documentation
Constructor & Destructor Documentation
| PT6302_HANNSTAR | ( | PinName | mosi, |
| PinName | sclk, | ||
| PinName | cs | ||
| ) |
Constructor for class for driving Princeton PT6302 VFD controller as used in HANNSTAR.
Constructor for class for Princeton PT6302 VFD controller as used in HANNSTAR.
Supports 16 Grids of 35 Segments without additional Segments.
- Parameters:
-
PinName mosi, sclk, cs SPI bus pins
Supports 16 Grids of 35 Segments without additional Segments.
- Parameters:
-
PinName mosi, miso, sclk, cs SPI bus pins
Definition at line 271 of file PT6302.cpp.
Member Function Documentation
| int _getc | ( | ) | [protected, virtual] |
Get a single character (Stream implementation)
- Parameters:
-
none
- Returns:
- -1
Definition at line 403 of file PT6302.cpp.
| int _putc | ( | int | value ) | [protected, virtual] |
Write a single character (Stream implementation)
- Parameters:
-
value char to print
- Returns:
- value;
Definition at line 365 of file PT6302.cpp.
| void _writeCmd | ( | char | cmd, |
| char | data | ||
| ) | [protected, inherited] |
Write command and parameters to PT6302.
Write command and data to PT6302.
- Parameters:
-
char cmd Command byte char data Parameter for command
- Returns:
- none
Definition at line 206 of file PT6302.cpp.
| void _writeCmd | ( | char | cmd ) | [protected, inherited] |
Write command to PT6302.
- Parameters:
-
char cmd Command byte
- Returns:
- none
Definition at line 228 of file PT6302.cpp.
| void cls | ( | bool | clrAll = false ) |
Clear the screen and locate to 0.
- Parameters:
-
bool clrAll Clear Icons also (default = false) bool clrAll Clear Icons also (default = false)
- Returns:
- none
Definition at line 308 of file PT6302.cpp.
| void cls | ( | ) | [inherited] |
| int columns | ( | ) |
Number of screen columns.
- Parameters:
-
none
- Returns:
- columns
Definition at line 298 of file PT6302.cpp.
| void locate | ( | int | column ) |
Locate cursor to a screen column.
- Parameters:
-
column The horizontal position from the left, indexed from 0
- Returns:
- none
Definition at line 284 of file PT6302.cpp.
| int printf | ( | const char * | format, |
| ... | |||
| ) |
Write a formatted string to the Display.
- Parameters:
-
format A printf-style format string, followed by the variables to use in formatting the string.
| int putc | ( | int | c ) |
Write a character to the Display.
- Parameters:
-
c The character to write to the display
- Returns:
- char written
| void setBrightness | ( | char | brightness = PT6302_BRT_DEF ) |
[inherited] |
Set Brightness.
- Parameters:
-
char brightness (3 significant bits, valid range 0..7 (dutycycle linked to number of grids)
- Returns:
- none
- Parameters:
-
char brightness (3 significant bits, valid range 0..7)
- Returns:
- none
Definition at line 100 of file PT6302.cpp.
| void setDisplay | ( | bool | on ) | [inherited] |
Set the Display mode On/off.
- Parameters:
-
bool display mode
- Returns:
- none
Definition at line 113 of file PT6302.cpp.
| void setPort | ( | char | port = 0 ) |
Set Port.
- Parameters:
-
char port (Only Bit 1 is used)
- Returns:
- none
Reimplemented from PT6302.
Definition at line 330 of file PT6302.cpp.
| void setUDC | ( | unsigned char | udc_idx, |
| UDCData_t | udc_data | ||
| ) | [inherited] |
Set User Defined Characters (UDC)
- Parameters:
-
unsigned char udc_idx The Index of the UDC (0..7) UDCData_t udc_data The bitpattern for the UDC (5 bytes)
- Returns:
- none
Definition at line 147 of file PT6302.cpp.
| void setVGen | ( | bool | on = true ) |
| void writeAData | ( | char | adata, |
| char | address | ||
| ) | [inherited] |
Write Additional Data to PT6302.
- Parameters:
-
char adata Additional code (annunciator) char address Parameter for data
- Returns:
- none
Definition at line 191 of file PT6302.cpp.
| void writeData | ( | char | data, |
| char | address | ||
| ) | [inherited] |
Write Data to PT6302.
- Parameters:
-
char data Character code char address Parameter for data
- Returns:
- none
Definition at line 176 of file PT6302.cpp.
Generated on Thu Jul 14 2022 03:33:37 by
1.7.2
PT6302 VFD Driver for upto 16 Dot Matrix Characters and two icons per digit.