Advertisement
tmax

Untitled

May 15th, 2014
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.51 KB | None | 0 0
  1. /*
  2.  * File:   Programa de prueba.c
  3.  * Author: Andres
  4.  *
  5.  * Created on 12 de mayo de 2014, 17:21
  6.  */
  7.  
  8. #define _XTAL_FREQ 4000000
  9. #define __PICCPRO__
  10.  
  11. #include <pic16f873.h>
  12. #include <xc.h>
  13. #include <stdio.h>
  14. #include <stdlib.h>
  15.  
  16. int main(int argc, char** argv) {
  17.  
  18.     TRISBbits.TRISB0 = 0;   // Pin B0 como salida
  19.  
  20.     while(1){
  21.         PORTBbits.RB0 = 1;  // Pongo un 1 en B0
  22.         __delay_ms(2000);
  23.         PORTBbits.RB0 = 0;
  24.         __delay_ms(2000);
  25.     }
  26.  
  27.     return (EXIT_SUCCESS);
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement