Advertisement
Guest User

Untitled

a guest
Jun 8th, 2014
995
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #include <xc.h>
  2. #define _XTAL_FREQ 20000000
  3. #pragma config WDTE=OFF , BOREN=OFF , PWRTE=ON , MCLRE=OFF , FOSC=INTRCIO
  4.  
  5. void main(){
  6.  
  7. TRISIO = 0;
  8. GPIO = 0;
  9. while(1){
  10. __delay_ms(1000);
  11. GP0 = 1;
  12. __delay_ms(1000);
  13. GP0 = 0;
  14. }
  15.  
  16. }
  17.  
  18. #include <xc.h>
  19. //#define _XTAL_FREQ 20000000
  20. #pragma config WDTE=OFF , BOREN=OFF , PWRTE=ON , MCLRE=OFF , FOSC=INTRCIO
  21.  
  22. void main(){
  23.  
  24. //init GPIO pins
  25. TRISIO = 0;
  26. GPIO = 0;
  27. while(1){
  28. // __delay_ms(1000);
  29. GP0 = 1;
  30. //__delay_ms(1000);
  31. //GP0 = 0;
  32. }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement