You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 satır
293B

  1. #include "delay.h"
  2. void delay_ms(unsigned short timeCnt)
  3. {
  4. unsigned short i,j;
  5. while(timeCnt--){
  6. for(i=200;i>0;i--){ // 1ms
  7. for(j=18;j>0;j--); // 1us
  8. }
  9. }
  10. }
  11. void delay_5us(unsigned short timeCnt)
  12. {
  13. unsigned short j;
  14. while(timeCnt--){
  15. for(j=18;j>0;j--); // 1us
  16. }
  17. }