Library for Princeton PT6961 LED driver. Supports 6 digits @ 12 segments or 7 digits @ 11 segments. Also supports keyboard scanning of upto 30 keys. SPI interface.

Dependents:   mbed_PT6961

This LED driver is found in frontpanel controllers of consumer electronics such as DVD players. The added features such as the matrix keyboard scanning are useful in these applications.

Additional information is available on the component page here

Revision:
2:c6883ede8d8b
Parent:
1:eb4758bba68a
diff -r eb4758bba68a -r c6883ede8d8b PT6961.h
--- a/PT6961.h	Thu Jan 07 20:57:00 2016 +0000
+++ b/PT6961.h	Thu Jan 14 20:03:13 2016 +0000
@@ -2,6 +2,7 @@
  * Copyright (c) 2015, v01: WH, Initial version (HR734)
  *               2015, v02: WH, rename Digit/Grid
  *               2016, v02: WH, Added V56S, Added Stream support
+ *               2016, v03: WH, Refactored display and keyboard defines  
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -70,11 +71,17 @@
  * @endcode
  */
 
+
+//PT6961 Display and Keymatrix data
+#define PT6961_MAX_NR_GRIDS    7
+#define PT6961_BYTES_PER_GRID  2
+//Significant bits Keymatrix data
+#define PT6961_KEY_MSK      0x3F 
+
 //Memory size in bytes for Display and Keymatrix
-#define PT6961_DISPLAY_MEM    14
+#define PT6961_DISPLAY_MEM  (PT6961_MAX_NR_GRIDS * PT6961_BYTES_PER_GRID)
 #define PT6961_KEY_MEM         5
-//Significant bits Keymatrix data
-#define PT6961_KEY_BITS        6 
+
 
 //Reserved bits for commands
 #define PT6961_CMD_MSK      0xE0