40 lines
657 B
C
40 lines
657 B
C
/*
|
|
* File: main_18f4550.c
|
|
* Author: q242695
|
|
*
|
|
* Created on 19. Juni 2013, 12:29
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <xc.h>
|
|
|
|
#ifndef _XTAL_FREQ
|
|
#define _XTAL_FREQ 36000000
|
|
#endif
|
|
|
|
#define LED PORTBbits.RB3
|
|
|
|
#pragma config FOSC = HS, IESO = OFF, BOR = OFF, PBADEN = OFF, CCP2MX = OFF, WDT = OFF, PWRT = OFF, DEBUG = ON
|
|
|
|
/*
|
|
*
|
|
*/
|
|
int main(int argc, char** argv) {
|
|
char count;
|
|
|
|
TRISB=0x00;
|
|
PORTB=0x00;
|
|
while(1) // Run Forever
|
|
{
|
|
LED=1;
|
|
for (count=0; count<25; count++)
|
|
__delay_ms(20);
|
|
LED=0;
|
|
for (count=0; count<25; count++)
|
|
__delay_ms(20);
|
|
}
|
|
return (EXIT_SUCCESS);
|
|
}
|
|
|