Princeton PT6964 LED controller supports 4 Digits @ 13 Segments, 5 Digits @ 12 Segments, 6 Digits @ 11 Segments or 7 Digits @ 10 Segments. Also supports a scanned keyboard of upto 20 keys. SPI bus interface.

Dependents:   mbed_PT6964

Princeton PT6964 LED controller supports 4 Digits @ 13 Segments, 5 Digits @ 12 Segments, 6 Digits @ 11 Segments or 7 Digits @ 10 Segments. Also supports a scanned keyboard of upto 20 keys. SPI bus interface.

See Component page here.

Revision:
1:1adf993a3e34
Parent:
0:27f32a087e5a
Child:
2:eaf2f5d1af34
--- a/PT6964.h	Sat Nov 21 16:43:15 2015 +0000
+++ b/PT6964.h	Sat Jan 09 13:40:06 2016 +0000
@@ -1,5 +1,7 @@
 /* mbed PT6964 Library, for PT6964 LED controller
  * Copyright (c) 2015, v01: WH, Initial version
+ *               2015, v02: WH, rename Digit/Grid 
+ *               2016, v03: WH, updated Icon handling, UDCs and _putc()  
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -222,7 +224,7 @@
 
 #define DVD538A_NR_GRIDS  5
 #define DVD538A_NR_DIGITS 4
-#define DVD538A_DIG1_IDX  1
+//#define DVD538A_DIG1_IDX  1
 #define DVD538A_NR_UDC    8
 
 /** Constructor for class for driving Princeton PT6964 controller as used in DVD538A
@@ -235,20 +237,20 @@
  public:
 
   /** Enums for Icons */
-  //  Grid encoded in 16 MSBs, Icon pattern encoded in 16 LSBs
+  //  Grid encoded in 8 MSBs, Icon pattern encoded in 16 LSBs
   enum Icon {
-    Grid1_LD1  = (1<<16) | S_LD1,
-    Grid1_LD2  = (1<<16) | S_LD2,
-    Grid1_CD   = (1<<16) | S_CD,
-    Grid1_DVD  = (1<<16) | S_DVD,
-    Grid1_PSE  = (1<<16) | S_PSE,
-    Grid1_PLY  = (1<<16) | S_PLY,    
-    Grid1_COL  = (1<<16) | S_COL,
-    Grid1_MP4  = (1<<16) | S_MP4,
-    Grid1_MP3  = (1<<16) | S_MP3    
+    LD1  = (1<<24) | S7_LD1,
+    LD2  = (1<<24) | S7_LD2,
+    CD   = (1<<24) | S7_CD,
+    DVD  = (1<<24) | S7_DVD,
+    PSE  = (1<<24) | S7_PSE,
+    PLY  = (1<<24) | S7_PLY,    
+    COL2 = (1<<24) | S7_COL2,
+    MP4  = (1<<24) | S7_MP4,
+    MP3  = (1<<24) | S7_MP3    
   };
   
-  typedef char UDCData_t[DVD538A_NR_UDC][2];
+  typedef short UDCData_t[DVD538A_NR_UDC];
   
  /** Constructor for class for driving Princeton PT6964 VFD controller as used in DVD538A
    *
@@ -280,19 +282,20 @@
     void locate(int column);
     
     /** Clear the screen and locate to 0
+     * @param bool clrAll Clear Icons also (default = false)
      */
-    void cls();
+    void cls(bool clrAll = false);   
 
     /** Set Icon
      *
-     * @param Icon icon Enums Icon has Grid position encoded in 16 MSBs, Icon pattern encoded in 16 LSBs
+     * @param Icon icon Enums Icon has Grid position encoded in 8 MSBs, Icon pattern encoded in 16 LSBs
      * @return none
      */
     void setIcon(Icon icon);
 
     /** Clr Icon
      *
-     * @param Icon icon Enums Icon has Grid position encoded in 16 MSBs, Icon pattern encoded in 16 LSBs
+     * @param Icon icon Enums Icon has Grid position encoded in 8 MSBs, Icon pattern encoded in 16 LSBs
      * @return none
      */
     void clrIcon(Icon icon);
@@ -331,7 +334,7 @@
     int _columns;   
     
     DisplayData_t _displaybuffer;
-    UDCData_t _UDC_16S; 
+    UDCData_t _UDC_7S; 
 };