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.

23 lines
273 B

3 years ago
  1. /*
  2. * File: newmain.c
  3. * Author: dev
  4. *
  5. * Created on March 23, 2020, 11:48 PM
  6. */
  7. #include <xc.h>
  8. #include <avr/io.h>
  9. #include <util/delay.h>
  10. int main(void)
  11. {
  12. // PB2 output
  13. DDRB = 1<<2;
  14. while(1)
  15. {
  16. // Toggle PB2
  17. PINB = 1<<2;
  18. _delay_ms(500);
  19. }
  20. }