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.

16 lines
189 B

4 years ago
  1. //#include <xc.h>
  2. #include <avr/io.h>
  3. #include <util/delay.h>
  4. int main(void)
  5. {
  6. // PB2 output
  7. DDRB = 1<<2;
  8. while(1)
  9. {
  10. // Toggle PB2
  11. PINB = 1<<2;
  12. _delay_ms(500);
  13. }
  14. }