If I program the device, in this case a 1284P, with the "production file" option in studio 6.1 "device programming" then go to "memories" and click "verify" under the "flash" section I get an error. Why? The source file is the the same .elf file for both options.
I'm using the AVRISP mkII and it is able to both set and read the fuse bits, so it seems to be working. Thing is, when I try a simple program to flash some leds on each port, it complies and appears to program with no errors, yet it doesn't work. I must be missing something here...
Here's the code:
#define _XTAL_FREQ 20000000UL #define F_CPU 20000000UL #include#include int main(void) { // set SFRs MCUCR=0b00010000; //disable pull ups ADCSRA=0b00000000; //disable ADC ACSR=0b10000000; //disable comparator DIDR0=0b00000000; //enable digital input buffer DIDR1=0b00000000; //enable digital input buffer DDRA = 0b00000000; //set port a in/out pins DDRB = 0b00000000; //set port b in/out pins DDRC = 0b00000000; //set port c in/out pins DDRD = 0b00000000; unsigned char on = 0b00000010; while ( 1 ) { PORTA = on; PORTB = on; PORTC = on; PORTD = on; _delay_ms( 200 ); on = ! on; _delay_ms( 200 ); PORTA=0; PORTB=0; PORTC=0; PORTD=0; } return 0; }