Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
mramos1 said:Nigel will probably be a better source on this as he has writting PIC programming software. I would drop a scope on the VPP signal line and burn a chip. See what voltage you have to deal with and then try that to resistor to LED to ground.
bibinjohn said:connect reset to Vcc. See at what frequency ur micro is running. See fuse bits
Here is a simple program compiled in WinAVR
#include<avr/io.h>
void delay_ms(unsigned char time_ms);
main()
{
DDRC=0xff;
DDRA=0xff;
DDRB=0xff;
DDRD=0xff;
while(1)
{
PORTC=0X00;
PORTA=0X00;
PORTB=0X00;
PORTD=0X00;
delay_ms(200);
PORTA=0Xff;
PORTB=0Xff;
PORTC=0Xff;
PORTD=0Xff;
delay_ms(200);
}
return(0);
}
void delay_ms(unsigned char time_ms)
{
unsigned short delay_count = F_CPU / 4000;
unsigned short cnt;
asm volatile ("\n"
"L_dl1%=:\n\t"
"mov %A0, %A2\n\t"
"mov %B0, %B2\n"
"L_dl2%=:\n\t"
"sbiw %A0, 1\n\t"
"brne L_dl2%=\n\t"
"dec %1\n\t" "brne L_dl1%=\n\t":"=&w" (cnt)
:"r"(time_ms), "r"((unsigned short) (delay_count))
);
}
akg said:the delay routines are based on the clock speed. so if u get a delay(200)@Mhz , it reduces to 100msec when using a 8Mhz clock
PS: if u were using assembly programming , u would have definitely noted that before.
mramos1 said:Oh, no external power supply might be a problem. Might try LED and 2K resistor on power if you are looking an ON LED. I don't think it will hurt the port, chip might not verify after burning worst case.