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.
PT6964 Class Reference
A class for driving Princeton PT6964 LED controller Note: the PT6964 is also available from other chipvendors eg AIP1628, HT1628, CM1628, SM1628. More...
#include <PT6964.h>
Inherited by PT6964_DVD538A.
Public Types | |
| enum | Mode |
Enums for display mode. More... | |
| typedef char | DisplayData_t [PT6964_DISPLAY_MEM] |
| Datatypes for display and keymatrix data. | |
Public Member Functions | |
| PT6964 (PinName mosi, PinName miso, PinName sclk, PinName cs, Mode mode=Grid7_Seg10) | |
| Constructor for class for driving Princeton PT6964 LED controller. | |
| void | cls () |
| Clear the screen and locate to 0. | |
| void | writeData (int address, char data) |
| Write databyte to PT6964. | |
| void | writeData (DisplayData_t data, int length=PT6964_DISPLAY_MEM) |
| Write Display datablock to PT6964. | |
| bool | getKeys (KeyData_t *keydata) |
| Read keydata block from PT6964. | |
| void | setBrightness (char brightness=PT6964_BRT_DEF) |
| Set Brightness. | |
| void | setDisplay (bool on) |
| Set the Display mode On/off. | |
Detailed Description
A class for driving Princeton PT6964 LED controller Note: the PT6964 is also available from other chipvendors eg AIP1628, HT1628, CM1628, SM1628.
Supports 4 Grids @ 13 Segments or 5 Grids @ 12 Segments or 6 Grids @ 11 Segments or 7 Grids @ 10 Segments. Also supports a scanned keyboard of upto 20 keys. SPI bus interface device.
Definition at line 131 of file PT6964.h.
Member Typedef Documentation
| typedef char DisplayData_t[PT6964_DISPLAY_MEM] |
Member Enumeration Documentation
Constructor & Destructor Documentation
Constructor for class for driving Princeton PT6964 LED controller.
Constructor for class for driving PT6964 LED controller with SPI bus interface device.
Supports 4 Grids @ 13 segments or 5 Grids @ 12 segments or 6 Grids @ 11 Segments or 7 Grids @ 10 Segments. Also supports a scanned keyboard of upto 20 keys. SPI bus interface device.
- Parameters:
-
PinName mosi, miso, sclk, cs SPI bus pins Mode selects either Grids/Segments (default 7 Grids @ 10 Segments)
Note: the PT6964 is also available from other chipvendors eg AIP1628, HT1628, CM1628, SM1628 Supports 4 digits @ 13 segments or 5 digits @ 12 segments or 6 Digits @ 11 Segments or 7 Digits @ 10 Segments. Also supports a scanned keyboard of upto 20 keys.
- Parameters:
-
PinName mosi, miso, sclk, cs SPI bus pins Mode selects either 6 Digits of 12 Segments or 7 Digits of 10 Segments (default)
Definition at line 37 of file PT6964.cpp.
Member Function Documentation
| void cls | ( | ) |
Clear the screen and locate to 0.
Definition at line 66 of file PT6964.cpp.
| bool getKeys | ( | KeyData_t * | keydata ) |
Read keydata block from PT6964.
- Parameters:
-
*keydata Ptr to Array of PT6964_KEY_MEM (=5) bytes for keydata
- Returns:
- bool keypress True when at least one key was pressed
Note: Due to the hardware configuration the PT6964 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 PT6964_KEY_MEM (=5) bytes for keydata
- Returns:
- bool keypress True when at least one key was pressed
Note: Due to the hardware configuration the PT6964 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 PT6964.cpp.
| void setBrightness | ( | char | brightness = PT6964_BRT_DEF ) |
Set Brightness.
- Parameters:
-
char brightness (3 significant bits, valid range 0..7 (1/16 .. 14/14 dutycycle)
- Returns:
- none
Definition at line 85 of file PT6964.cpp.
| void setDisplay | ( | bool | on ) |
| void writeData | ( | int | address, |
| char | data | ||
| ) |
Write databyte to PT6964.
- Parameters:
-
int address display memory location to write byte char data byte written at given address
- Returns:
- none
Definition at line 113 of file PT6964.cpp.
| void writeData | ( | DisplayData_t | data, |
| int | length = PT6964_DISPLAY_MEM |
||
| ) |
Write Display datablock to PT6964.
- Parameters:
-
DisplayData_t data Array of PT6964_DISPLAY_MEM (=14) bytes for displaydata (starting at address 0) length number bytes to write (valid range 0..PT6964_DISPLAY_MEM (=14), starting at address 0)
- Returns:
- none
- Parameters:
-
DisplayData_t data Array of PT6964_DISPLAY_MEM (=14) bytes for displaydata (starting at address 0) length number bytes to write (valide range 0..PT6964_DISPLAY_MEM (=14), starting at address 0)
- Returns:
- none
Reimplemented in PT6964_DVD538A.
Definition at line 129 of file PT6964.cpp.
Generated on Tue Jul 12 2022 17:56:28 by
1.7.2
PT6964 LED controller (70 LEDs max), Keyboard scan (20 keys max)