提交 | 用户 | age | ||
5dd1b7 | 1 | //#include "STC15Wxx.h" |
Q | 2 | #include "STC15F2K60S2.H" |
3 | #include "intrins.h" | |
4 | ||
5 | void Delay1ms() //@22.1184MHz | |
6 | { | |
7 | unsigned char data i, j; | |
8 | ||
9 | _nop_(); | |
10 | _nop_(); | |
11 | i = 22; | |
12 | j = 128; | |
13 | do | |
14 | { | |
15 | while (--j); | |
16 | } while (--i); | |
17 | } | |
18 | ||
19 | ||
20 | void Delay_ms(unsigned int n) | |
21 | { | |
22 | while(n--) | |
23 | { | |
24 | Delay1ms(); | |
25 | } | |
26 | ||
27 | } |