このライブラリは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
Diff: SevenSegLed.h
- Revision:
- 1:3429249e30f9
- Parent:
- 0:5410d6e2bce7
- Child:
- 2:cca0fd8ccb97
--- a/SevenSegLed.h Sun Nov 20 00:22:05 2011 +0000 +++ b/SevenSegLed.h Fri Dec 02 13:53:34 2011 +0000 @@ -21,11 +21,13 @@ */ -/***********************************************************************/ -/* */ -/* ledDynamic.h */ -/* */ -/***********************************************************************/ +//***********************************************************************/ +//* */ +//* ledDynamic.h */ +//* V1.0 : 4digit(4com) display */ +//* V2.0 : 8digit(8com) display */ +//* */ +//***********************************************************************/ #ifndef _SEVENSEGLED_H #define _SEVENSEGLED_H @@ -36,7 +38,7 @@ * //----------------------------------------------------------------------------- * //sevenSegmentLed Library Example * // - * //This program by one every second counts, do a 4-digit seven-segment LED display. + * //This program by one every second counts, do a 8-digit seven-segment LED display. * // * //seven segment numeric LED Display : LTC4627P * // http://www.excesssolutions.com/mas_assets/acrobat/ES5721.pdf @@ -68,7 +70,7 @@ * // | * // | display mode (0:smooth 1:hard) * // | | - * // | | segA segB segC segD segE segF segG segP com1 com2 com3 com4 + * // | | segA segB segC segD segE segF segG segP com1 com2 com3 com4 (com5,com6,com7,com8 = NC) * // | | | | | | | | | | | | | | * SevenSegLed segmentled(0, 0, p14, p20, p17, p22, p24, p16, p19, p30, p29, p13, p25, p27); * @@ -132,7 +134,9 @@ * @param seg_a - seg_p DigitalOut pin to connect to. To provide members with an array of uint8_t digit minutes. 4 digits maximum * @param com_1 - com_4 DigitalOut pin to connect to. To provide members with an array of uint8_t digit minutes. 4 digits maximum */ - 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); + 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); /** 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 @@ -149,11 +153,11 @@ // pin set_seg, _com; DigitalOut _seg_a, _seg_b, _seg_c, _seg_d, _seg_e, _seg_f, _seg_g, _seg_p; - DigitalOut _com_1, _com_2, _com_3, _com_4; + DigitalOut _com_1, _com_2, _com_3, _com_4, _com_5, _com_6, _com_7, _com_8; Ticker timer; -#define Z_ketaSuu (4) // 7segment no keta suu +#define Z_ketaSuu (8) // 7segment no keta suu #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)