LordSputnik

Remote code - 2013-3-14

Mar 14th, 2013
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.65 KB | None | 0 0
  1. #include <xc.h>
  2. #include <pic12f617.h>
  3.  
  4. #pragma config WRT=OFF //Disable write protection
  5. #pragma config FOSC=INTOSCIO //Use internal clock, with I/O on clock pins.
  6. #pragma config MCLRE=OFF //Use MCLRE as an input pin.
  7. #pragma config WDTE=OFF //Disable Watchdog Timer
  8. #pragma config IOSCFS=4MHZ //Run at 4MHz
  9. #pragma config CP=OFF //No code protection
  10. #pragma config PWRTE=OFF //Enable Power-Up-Timer
  11. #pragma config BOREN=OFF //Disable Brownout reset
  12.  
  13. void main()
  14. {
  15.     WPU = 0xFF;
  16.     TRISIO = 0b11111110;
  17.  
  18.     while(1)
  19.     {
  20.         if(GPIObits.GP5 == 1)
  21.             GPIO = 0x01;
  22.         else
  23.             GPIO = 0x00;
  24.     }
  25.  
  26.     return;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment