Hi.
Can someone give me a hint?
im programming this pic16f628A and build and make works fine.
(pickit 4)
it says its all succesfull.
But that darn led just dont blink.
ive tried, like you see in my code, even simplier to just give RB5 5v and no delays.
Nothing.
ive tried another pic but nothing.
What am i missing?
I know i connect it right + - and RB5 out to led.
i have tested led and it works...
hmmm, i cant see anything wrong.
#include <pic16f628A.h>
#include <xc.h>
#pragma config FOSC = INTOSCIO
#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT enabled)
#pragma config PWRTE = OFF
#pragma config MCLRE = ON // RA5/MCLR/VPP Pin Function Select bit (RA5/MCLR/VPP pin function is MCLR)
#pragma config BOREN = ON // Brown-out Detect Enable bit (BOD enabled)
#pragma config LVP = OFF // Low-Voltage Programming Enable bit (RB4/PGM pin has PGM function, low-voltage programming enabled)
#pragma config CPD = OFF // Data EE Memory Code Protection bit (Data memory code protection off)
#pragma config CP = OFF
#define _XTAL_FREQ 4000000
/*
*
*/
int main(int argc, char** argv)
{
TRISB = 0b00000000;
while(1)
{
PORTBbits.RB5 = 1;
//__delay_ms(500);
//PORTBbits.RB5 = 0;
//__delay_ms(500);
}
return 0;
}