#include "STC12.h" // STC12C5A60S2 @ 22.0184Mhz 精確延時 void delay_10us(unsigned char n) { unsigned char i, j; for (j = 0; j < n; j++) for (i = 0; i < 25; i++); } void delay_1ms(unsigned int n) { unsigned int i, j, k; for (k = 0; k<n; k++) for (j = 0; j<78; j++) for (i = 0; i<25; i++); } void delay_10ms(unsigned int n) { unsigned int i, j, k; for (k = 0; k<n; k++) for (j = 0; j<760; j++) for (i = 0; i<25; i++); } void delay_100ms(unsigned int n) { unsigned int i, j, k; for (k = 0; k<n; k++) for (j = 0; j<760; j++) for (i = 0; i<252; i++); }