I have a cusom board made by my friend. He is using MicroBasic with ChipBlasterAVR.
Now he can normaly program ATMEGA328P on board with no problems. Then i tried with my new mikroProg to read the chip and it works. So I loaded my LedBlink sample.
Code: Select all
void main() {
DDRB = 0xFF;
//DDRB.F2 = 1; // Set direction 1=out, 0=in
//DDB2_bit = 1;
do {
PORTB = 0x00;
//PORTB.F2 = 0; // Turn OFF diodes on PORTB.F2
//PORTB2_bit = 0;
Delay_ms(1000); // 1 second delay
PORTB = 0xFF;
//PORTB.F2 = 1; // Turn ON diodes on PORTB.F2
//PORTB2_bit = 1;
Delay_ms(1000); // 1 second delay
} while(1); // Endless loop
}
In one of my upload proccesses the ATMEGA328P stops responding and AVRFLASH reports "Can not synchronise device with programmer". Now i can't read or write to chip.
Next i took my Arduino Fio with same ATMEGA328P and connected mikroProg with it. Read chip and uploaded same LedBLink code to it. Led toggles for 8 seconds insted of 1 second. Tried to change, reupload my code. After some uploades the chip stops responding, error: "Can not synchronise device with programmer".
What am i dooing wrong? Are my chips dead?
Used settings (from read):