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.
PT6315_DVDR3510 Class Reference
Constructor for class for driving Princeton PT6315 VFD controller as used in DVDR3510. More...
#include <PT6315.h>
Inherits PT6315.
Public Types | |
enum | Icon |
Enums for Icons. More... | |
enum | Mode |
Enums for display mode. More... | |
typedef char | DisplayData_t [PT6315_DISPLAY_MEM] |
Datatypes for display and keymatrix data. | |
Public Member Functions | |
PT6315_DVDR3510 (PinName mosi, PinName miso, PinName sclk, PinName cs) | |
Constructor for class for driving Princeton PT6315 VFD controller as used in DVDR3510. | |
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. | |
void | setIcon (Icon icon) |
Set Icon. | |
void | clrIcon (Icon icon) |
Clr Icon. | |
void | setUDC (unsigned char udc_idx, int udc_data) |
Set User Defined Characters (UDC) | |
int | columns () |
Number of screen columns. | |
void | writeData (int address, char data) |
Write databyte to PT6315. | |
void | writeData (DisplayData_t data, int length=(DVDR3510_NR_GRIDS *PT6315_BYTES_PER_GRID)) |
Write Display datablock to PT6315. | |
void | cls () |
Clear the screen and locate to 0. | |
bool | getKeys (KeyData_t *keydata) |
Read keydata block from PT6315. | |
void | setLED (char leds=0) |
Set LEDs. | |
void | setBrightness (char brightness=PT6315_BRT_DEF) |
Set Brightness. | |
void | setDisplay (bool on) |
Set the Display mode On/off. | |
Protected Member Functions | |
virtual int | _putc (int value) |
Write a single character (Stream implementation) |
Detailed Description
Constructor for class for driving Princeton PT6315 VFD controller as used in DVDR3510.
Supports 11 Grids of 17 Segments and Icons (8 digits of 14 segments plus some icons). Also supports a scanned keyboard of 11 keys and 1 LED.
- Parameters:
-
PinName mosi, miso, sclk, cs SPI bus pins
Definition at line 278 of file PT6315.h.
Member Typedef Documentation
typedef char DisplayData_t[PT6315_DISPLAY_MEM] [inherited] |
Member Enumeration Documentation
Constructor & Destructor Documentation
PT6315_DVDR3510 | ( | PinName | mosi, |
PinName | miso, | ||
PinName | sclk, | ||
PinName | cs | ||
) |
Constructor for class for driving Princeton PT6315 VFD controller as used in DVDR3510.
Supports 8 Grids of 16 Segments and Icons (8 digits of 14 Segments plus some icons). Also supports a scanned keyboard of 11 keys and 1 LED.
- Parameters:
-
PinName mosi, miso, sclk, cs SPI bus pins
Supports 11 Grids of 17 Segments and Icons (8 digits of 14 Segments plus some icons). Also supports a scanned keyboard of 11 keys and 1 LED.
- Parameters:
-
PinName mosi, miso, sclk, cs SPI bus pins
Definition at line 266 of file PT6315.cpp.
Member Function Documentation
int _putc | ( | int | value ) | [protected, virtual] |
Write a single character (Stream implementation)
Definition at line 395 of file PT6315.cpp.
void clrIcon | ( | Icon | icon ) |
Clr Icon.
- Parameters:
-
Icon icon Enums Icon has Grid position encoded in 8 MSBs, Icon pattern encoded in 24 LSBs
- Returns:
- none
Definition at line 362 of file PT6315.cpp.
void cls | ( | bool | clrAll = false ) |
Clear the screen and locate to 0.
- Parameters:
-
bool clrAll Clear Icons also (default = false)
Definition at line 314 of file PT6315.cpp.
void cls | ( | ) | [inherited] |
Clear the screen and locate to 0.
Definition at line 63 of file PT6315.cpp.
int columns | ( | ) |
Number of screen columns.
- Parameters:
-
none
- Returns:
- columns
Definition at line 306 of file PT6315.cpp.
bool getKeys | ( | KeyData_t * | keydata ) | [inherited] |
Read keydata block from PT6315.
- Parameters:
-
*keydata Ptr to Array of PT6315_KEY_MEM (=4) bytes for keydata
- Returns:
- bool keypress True when at least one key was pressed
Note: Due to the hardware configuration the PT6315 key matrix scanner will detect multiple keys pressed at same time, but this may result in some spurious keys also being set in keypress data array. It may be best to ignore all keys in those situations. That option is implemented in this method depending on define setting.
- Parameters:
-
*keydata Ptr to Array of PT6315_KEY_MEM (=4) bytes for keydata
- Returns:
- bool keypress True when at least one key was pressed
Note: Due to the hardware configuration the PT6315 key matrix scanner will detect multiple keys pressed at same time, but this may also result in some spurious keys being set in keypress data array. It may be best to ignore all keys in those situations. That option is implemented in this method depending on define setting.
Definition at line 156 of file PT6315.cpp.
void locate | ( | int | column ) |
Locate cursor to a screen column.
- Parameters:
-
column The horizontal position from the left, indexed from 0
Definition at line 292 of file PT6315.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
void setBrightness | ( | char | brightness = PT6315_BRT_DEF ) |
[inherited] |
Set Brightness.
- Parameters:
-
char brightness (3 significant bits, valid range 0..7 (1/16 .. 14/16 dutycycle)
- Returns:
- none
- Parameters:
-
char brightness (3 significant bits, valid range 0..7 (1/16 .. 14/14 dutycycle)
- Returns:
- none
Definition at line 83 of file PT6315.cpp.
void setDisplay | ( | bool | on ) | [inherited] |
void setIcon | ( | Icon | icon ) |
Set Icon.
- Parameters:
-
Icon icon Enums Icon has Grid position encoded in 8 MSBs, Icon pattern encoded in 24 LSBs
- Returns:
- none
Definition at line 343 of file PT6315.cpp.
void setLED | ( | char | leds = 0 ) |
[inherited] |
Set LEDs.
- Parameters:
-
char leds (4 least significant bits)
- Returns:
- none
Definition at line 200 of file PT6315.cpp.
void setUDC | ( | unsigned char | udc_idx, |
int | udc_data | ||
) |
Set User Defined Characters (UDC)
- Parameters:
-
unsigned char udc_idx The Index of the UDC (0..7) int udc_data The bitpattern for the UDC (16 bits)
Definition at line 382 of file PT6315.cpp.
void writeData | ( | int | address, |
char | data | ||
) |
void writeData | ( | DisplayData_t | data, |
int | length = (DVDR3510_NR_GRIDS * PT6315_BYTES_PER_GRID) |
||
) |
Write Display datablock to PT6315.
- Parameters:
-
DisplayData_t data Array of PT6315_DISPLAY_MEM (=36) bytes for displaydata (starting at address 0) length number bytes to write (valid range 0..(DVDR3510_NR_GRIDS * PT6315_BYTES_PER_GRID) == 24, starting at address 0)
- Returns:
- none
Reimplemented from PT6315.
Generated on Wed Jul 13 2022 03:15:57 by
