7segment SPI LED module from DF Robot.com

Dependents:   spi7seg_test

Files at this revision

API Documentation at this revision

Comitter:
morecat_lab
Date:
Fri Jan 30 22:46:29 2015 +0000
Parent:
0:f0806724e7c9
Child:
2:27cc28619363
Commit message:
change font shape of 'C'

Changed in this revision

Spi7Seg.cpp Show annotated file Show diff for this revision Revisions of this file
Spi7Seg.h Show annotated file Show diff for this revision Revisions of this file
--- a/Spi7Seg.cpp	Fri Jan 30 21:05:27 2015 +0000
+++ b/Spi7Seg.cpp	Fri Jan 30 22:46:29 2015 +0000
@@ -24,6 +24,7 @@
     _dataPin = 0;
     _clockPin = 1;
     _ratchPin = 1;
+    _zeroSupress = 1;
 }
 
 void Spi7Seg::begin(void) {
@@ -88,7 +89,7 @@
     if (_zeroSupress ) {
         for (int i = 0 ; i < (_numOfDigs-1) ; i++) {
             if (_buffer[i] == segCh(0)) {
-                _buffer[i] = _buffer[i] & 0x80;
+                _buffer[i] |= 0x7f; // blank except dot
             } else {
                 break;
             }
--- a/Spi7Seg.h	Fri Jan 30 21:05:27 2015 +0000
+++ b/Spi7Seg.h	Fri Jan 30 22:46:29 2015 +0000
@@ -37,7 +37,7 @@
 #define NUM_PAT_9 0x90
 #define NUM_PAT_A 0x88
 #define NUM_PAT_B 0x83
-#define NUM_PAT_C 0xa7
+#define NUM_PAT_C 0xc6
 #define NUM_PAT_D 0xa1
 #define NUM_PAT_E 0x86
 #define NUM_PAT_F 0x8e