Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // PIC16F716 Configuration Bit Settings
- // 'C' source line config statements
- // CONFIG
- #pragma config FOSC = HS // Oscillator Selection bits (HS oscillator)
- #pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT enabled)
- #pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
- #pragma config BOREN = ON // Brown-out Reset Enable bit (BOR enabled)
- #pragma config BODENV = 40 // Brown-out Reset Voltage bit (VBOR set to 4.0V)
- #pragma config CP = OFF // Code Protect (Program memory code protection is disabled)
- // #pragma config statements should precede project file includes.
- // Use project enums instead of #define for ON and OFF.
- #include <xc.h>
- #include <htc.h>
- #pragma CLOCK_FREQ 8000000
- void main()
- {
- TRISB=0X00;
- PORTB=0X00;
- while(1)
- {
- long i = 0;
- PORTB=0XFF;
- for (i = 0 ; i < 1000000 ; i++)
- {}
- PORTB=0X00;
- for (i = 0 ; i < 1000000 ; i++)
- {}
- }
- }
- /*
- *
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement