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.
TM1650 Class Reference
A class for driving TM1650 LED controller. More...
#include <TM1650.h>
Inherited by TM1650_MEIBAI.
Public Types | |
| typedef char | DisplayData_t [TM1650_DISPLAY_MEM] |
| Datatype for displaydata. | |
| typedef char | KeyData_t |
| Datatypes for keymatrix data. | |
Public Member Functions | |
| TM1650 (PinName dio, PinName clk) | |
| Constructor for class for driving TM1650 LED controller. | |
| void | cls () |
| Clear the screen and locate to 0. | |
| void | writeData (char data, int address) |
| Write databyte to TM1650. | |
| void | writeData (DisplayData_t data, int length=(TM1650_MAX_NR_GRIDS *TM1650_BYTES_PER_GRID), int address=0) |
| Write Display datablock to TM1650. | |
| bool | getKeys (KeyData_t *keydata) |
| Read keydata block from TM1650. | |
| void | setBrightness (char brightness=TM1650_BRT_DEF) |
| Set Brightness. | |
| void | setDisplay (bool on) |
| Set the Display mode On/off. | |
Detailed Description
A class for driving TM1650 LED controller.
Supports 4 Grids @ 8 Segments and upto 28 Keys. Serial bus interface device.
Definition at line 169 of file TM1650.h.
Member Typedef Documentation
| typedef char DisplayData_t[TM1650_DISPLAY_MEM] |
Constructor & Destructor Documentation
| TM1650 | ( | PinName | dio, |
| PinName | clk | ||
| ) |
Constructor for class for driving TM1650 LED controller.
Constructor for class for driving TM1650 LED controller with Serial bus interface device.
Supports 4 Grids @ 8 segments and 28 Keys. Serial bus interface device.
- Parameters:
-
PinName dio Serial bus DIO pin PinName sck Serial bus CLK pin
Supports 4 digits @ 8 segments. Also supports upto 28 Keys.
- Parameters:
-
PinName dio Serial bus DIO pin PinName clk Serial bus CLK pin
Definition at line 31 of file TM1650.cpp.
Member Function Documentation
| void cls | ( | ) |
Clear the screen and locate to 0.
Definition at line 64 of file TM1650.cpp.
| bool getKeys | ( | KeyData_t * | keydata ) |
Read keydata block from TM1650.
- Parameters:
-
*keydata Ptr to bytes for keydata
- Returns:
- bool keypress True when at least one key was pressed
Definition at line 143 of file TM1650.cpp.
| void setBrightness | ( | char | brightness = TM1650_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 80 of file TM1650.cpp.
| void setDisplay | ( | bool | on ) |
Set the Display mode On/off.
- Parameters:
-
bool display mode
- Returns:
- none
- Parameters:
-
bool display mode
Definition at line 91 of file TM1650.cpp.
| void writeData | ( | char | data, |
| int | address | ||
| ) |
Write databyte to TM1650.
- Parameters:
-
char data byte written at given address int address display memory location to write byte
- Returns:
- none
- Parameters:
-
int address display memory location to write byte char data byte written at given address
- Returns:
- none
Reimplemented in TM1650_MEIBAI.
Definition at line 108 of file TM1650.cpp.
| void writeData | ( | DisplayData_t | data, |
| int | length = (TM1650_MAX_NR_GRIDS * TM1650_BYTES_PER_GRID), |
||
| int | address = 0 |
||
| ) |
Write Display datablock to TM1650.
- Parameters:
-
DisplayData_t data Array of TM1650_DISPLAY_MEM (=4) bytes for displaydata length number bytes to write (valid range 0..(TM1650_MAX_NR_GRIDS * TM1650_BYTES_PER_GRID) (=4), when starting at address 0) int address display memory location to write bytes (default = 0)
- Returns:
- none
Reimplemented in TM1650_MEIBAI.
Definition at line 124 of file TM1650.cpp.
Generated on Wed Jul 13 2022 19:08:39 by
1.7.2
TM1650 LED controller (32 LEDs max), Keyboard scan (28 keys max).