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 Class Reference
A class for driving Princeton PT6315 VFD controller. More...
#include <PT6315.h>
Inherited by PT6315_DVDR3510.
Public Types | |
enum | Mode |
Enums for display mode. More... | |
typedef char | DisplayData_t [PT6315_DISPLAY_MEM] |
Datatypes for display and keymatrix data. | |
Public Member Functions | |
PT6315 (PinName mosi, PinName miso, PinName sclk, PinName cs, Mode mode=Grid12_Seg16) | |
Constructor for class for driving Princeton PT6315 VFD controller. | |
void | cls () |
Clear the screen and locate to 0. | |
void | writeData (int address, char data) |
Write databyte to PT6315. | |
void | writeData (DisplayData_t data, int length=PT6315_DISPLAY_MEM) |
Write Display datablock to PT6315. | |
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. |
Detailed Description
A class for driving Princeton PT6315 VFD controller.
Supports 8 Grids of 20 Segments upto 16 Grids of 12 Segments. Also supports a scanned keyboard of upto 48 keys, 4 switches and 5 LEDs. SPI bus interface device.
Definition at line 146 of file PT6315.h.
Member Typedef Documentation
typedef char DisplayData_t[PT6315_DISPLAY_MEM] |
Member Enumeration Documentation
Constructor & Destructor Documentation
Constructor for class for driving Princeton PT6315 VFD controller.
Supports 4 Grids of 24 Segments upto 12 Grids of 16 Segments. Also supports a scanned keyboard of upto 32 keys and 4 LEDs. SPI bus interface device.
- Parameters:
-
PinName mosi, miso, sclk, cs SPI bus pins Mode selects either number of Grids and Segments (default 12 Grids, 16 Segments)
Supports 4 Grids of 24 Segments upto 12 Grids of 16 Segments. Also supports a scanned keyboard of upto 32 keys and 4 LEDs. SPI bus interface device.
- Parameters:
-
PinName mosi, miso, sclk, cs SPI bus pins Mode selects either number of Digits and Segments
Definition at line 33 of file PT6315.cpp.
Member Function Documentation
void cls | ( | ) |
Clear the screen and locate to 0.
Definition at line 63 of file PT6315.cpp.
bool getKeys | ( | KeyData_t * | keydata ) |
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 setBrightness | ( | char | brightness = PT6315_BRT_DEF ) |
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 ) |
void setLED | ( | char | leds = 0 ) |
Set LEDs.
- Parameters:
-
char leds (4 least significant bits)
- Returns:
- none
Definition at line 200 of file PT6315.cpp.
void writeData | ( | DisplayData_t | data, |
int | length = PT6315_DISPLAY_MEM |
||
) |
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..PT6315_DISPLAY_MEM (=36), starting at address 0)
- Returns:
- none
- Parameters:
-
DisplayData_t data Array of PT6315_DISPLAY_MEM (=48) bytes for displaydata (starting at address 0) length number bytes to write (valid range 0..PT6315_DISPLAY_MEM (=48), starting at address 0)
- Returns:
- none
Reimplemented in PT6315_DVDR3510.
Definition at line 129 of file PT6315.cpp.
void writeData | ( | int | address, |
char | data | ||
) |
Write databyte to PT6315.
- Parameters:
-
int address display memory location to write byte char data byte written at given address
- Returns:
- none
Reimplemented in PT6315_DVDR3510.
Definition at line 112 of file PT6315.cpp.
Generated on Wed Jul 13 2022 03:15:57 by
