このライブラリは1桁から8桁までのSeven segment Numeric LEDを制御します。 LEDはanode commonとcathode common を使用することができます。 LEDの表示は1秒で表示をスムースに切り替えるモードと、直ぐに切り替えるモードの2つのモードを選択することができます。 This library to control the Seven segment Numeric LED 8 digit of 1. You can use the LED cathode common and anode common. Switch mode LED display and a second displayed a smooth, you can choose two modes to switch modes quickly.

Dependents:   kitchenTimer_Clock kitchenTimer LPC1114FN28_kitchenTimer_Clock SevenSegmentLedSample ... more

Revision:
4:33e035f6a337
Parent:
2:cca0fd8ccb97
Child:
5:a7ba72bf10ba
--- a/SevenSegLed.h	Fri Dec 02 14:03:00 2011 +0000
+++ b/SevenSegLed.h	Mon Nov 25 05:48:43 2013 +0000
@@ -119,10 +119,11 @@
  * @endcode
  */
 
-
+#define USECOM4
 
 #include "types.h"
 
+
 class SevenSegLed {
 public:
 
@@ -134,10 +135,14 @@
     * @param seg_a - seg_p DigitalOut pin to connect to.    To provide members with an array of uint8_t digit minutes.
     * @param com_1 - com_8 DigitalOut pin to connect to.    To provide members with an array of uint8_t digit minutes. 8 digits maximum   
     */
+#ifdef USECOM4
+    SevenSegLed(uint8_t commonPole, uint8_t smooth, PinName seg_a, PinName seg_b, PinName seg_c, PinName seg_d, PinName seg_e, PinName seg_f, PinName seg_g, PinName seg_p,
+                PinName com_1 = NC, PinName com_2 = NC, PinName com_3 = NC, PinName com_4 = NC);
+#else // ~USECOM4
     SevenSegLed(uint8_t commonPole, uint8_t smooth, PinName seg_a, PinName seg_b, PinName seg_c, PinName seg_d, PinName seg_e, PinName seg_f, PinName seg_g, PinName seg_p,
                 PinName com_1 = NC, PinName com_2 = NC, PinName com_3 = NC, PinName com_4 = NC,
                 PinName com_5 = NC, PinName com_6 = NC, PinName com_7 = NC, PinName com_8 = NC);
-    
+#endif // USECOM4    
     /** Data set to the seven segment LED display
     * @param number Array variable address pointer of Numerical data 0 - 9,A - F : The figures show, 0x10:off
     * @param dot    Array variable address pointer of dot data  0:off 1:on
@@ -153,11 +158,19 @@
 
 //  pin set_seg, _com;
     DigitalOut _seg_a, _seg_b, _seg_c, _seg_d, _seg_e, _seg_f, _seg_g, _seg_p;
+#ifdef USECOM4
+    DigitalOut _com_1, _com_2, _com_3, _com_4;
+#else //~USECOM4
     DigitalOut _com_1, _com_2, _com_3, _com_4, _com_5, _com_6, _com_7, _com_8;
+#endif // USECOM4
     
-    Ticker timer;
+   Ticker timer;
 
+#ifdef USECOM4
+#define Z_ketaSuu (4)   // 7segment no keta suu
+#else //USECOM4
 #define Z_ketaSuu (8)   // 7segment no keta suu
+#endif // USECOM4
 #define Z_segSuu  (8)   // 7segmetn no segment suu (a,b,...,g,Dp)
 #define Z_grayMax (100)  // grayData max 100 kaicho
 #define Z_pwmGrayMax (100) // pwm max (led heno pwm syuturyoku no max)