1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
| #include "STC15F2K60S2.H" #include "sys.H" #include "displayer.H"
code unsigned long SysClock=11059200; #ifdef _displayer_H_ code char decode_table[]={ 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x00, 0x08, 0x40, 0x01, 0x41, 0x48, 0x3f|0x80, 0x06|0x80, 0x5b|0x80, 0x4f|0x80, 0x66|0x80, 0x6d|0x80, 0x7d|0x80, 0x07|0x80, 0x7f|0x80, 0x6f|0x80 }; #endif
void my1S_callback() { static unsigned char i=0; code char a[10]={0,1,2,3,4,5,6,7,8,9}; Seg7Print( a[i%10], a[(i+1)%10], a[(i+2)%10], a[(i+3)%10], a[(i+4)%10], a[(i+5)%10], a[(i+6)%10], a[(i+7)%10] ); i++; }
void main() { DisplayerInit(); SetDisplayerArea(0,7); LedPrint(0); SetEventCallBack(enumEventSys1S, my1S_callback); MySTC_Init(); while(1) { MySTC_OS(); } }
|