////////////////////////////////////
////////////////////////////////////
int avrisp() {
uint8_t data, low, high;
uint8_t ch = getch();
switch (ch) {
case '0': // signon
error = 0;
empty_reply();
break;
case '1':
if (getch() == CRC_EOP) {
Serial.print((char) STK_INSYNC);
Serial.print("AVR ISP");
Serial.print((char) STK_OK);
} else {
error++;
Serial.print((char) STK_NOSYNC);
}
break;
case 'A':
get_version(getch());
break;
case 'B':
fill(20);
set_parameters();
empty_reply();
break;
case 'E': // extended parameters - ignore for now
fill(5);
empty_reply();
break;
case 'P':
if (pmode) {
pulse(LED_ERR, 3);
} else {
start_pmode();
}
empty_reply();
break;
case 'U': // set address (word)
here = getch();
here += 256 * getch();
empty_reply();
break;
case 0x60: //STK_PROG_FLASH
low = getch();
high = getch();
empty_reply();
break;
case 0x61: //STK_PROG_DATA
data = getch();
empty_reply();
break;
case 0x64: //STK_PROG_PAGE
program_page();
break;
case 0x74: //STK_READ_PAGE 't'
read_page();
break;
case 'V': //0x56
universal();
break;
case 'Q': //0x51
error=0;
end_pmode();
empty_reply();
break;
case 0x75: //STK_READ_SIGN 'u'
read_signature();
break;
// expecting a command, not CRC_EOP
// this is how we can get back in sync
case CRC_EOP:
error++;
Serial.print((char) STK_NOSYNC);
break;
// anything else we will return STK_UNKNOWN
default:
error++;
if (CRC_EOP == getch())
Serial.print((char)STK_UNKNOWN);
else
Serial.print((char)STK_NOSYNC);
}
}
as you can see ive got quite a few boards ive tried already with avrdude: stk500_recv(): programmer is not responding when i use a pull-up resistor and avrdude: stk500_getsync(): not in sync: resp=0x## with different # each time and even sometimes get avrdude: stk500_getsync(): not in sync: expect:0x## or something to that effect, im stressing hard guys i need your help somebody anybody tell me what im doing wrong and what i need to do to fix this problem, or atleast a step in the right direction, please for the love of god DO NOT "LINK" TUTORIALS just lay out what i need to do HERE
By doing so you can burn any code you like in your atmega8, including a bootloader if you really want to write one. In most cases, for stand alone applications, the bootloader is not necessary.
If you don't use a crystal or ceramic resonator on your atmel mcu, then the clock frequency will very probably not be accurate enough for the bootloader to work even if you do manage to burn it. However, you can still use ArduinoISP to upload your sketch directly, without a bootloader. See Prototyping small embedded projects with Arduino | David Crocker's Solutions blog for how I used to do it before I purchased an AVRISPmkII.
dc42:
If you don't use a crystal or ceramic resonator on your atmel mcu, then the clock frequency will very probably not be accurate enough for the bootloader to work even if you do manage to burn it. However, you can still use ArduinoISP to upload your sketch directly, without a bootloader. See Prototyping small embedded projects with Arduino | David Crocker's Solutions blog for how I used to do it before I purchased an AVRISPmkII.
Good point. And now that the IDE has a 'upload using programmer' option one can really easily live without messing with bootloaders at all. And seeing that an arduino board running the arduinoISP sketch becomes a hardware programmer, there is a lot to be said for just not messing with bootloaders.
Just think your mega boards won't suffer if you want to use the WDT or if your compiled code happens to have a !!! string for random data in it, it won't hang the upload. One could make a good argument to 'just say no' when the subject of bootloaders come up.
By doing so you can burn any code you like in your atmega8, including a bootloader if you really want to write one. In most cases, for stand alone applications, the bootloader is not necessary.
ive been to that page (which i said not to link) and it failed with same errors, try again and this time READ MY POST
mysteredding:
i cant believe this 9500 character limit so i had to split it into 7 posts, please go forth and read
You can attach files to your post you know. Making 7 posts just to attach files is a mis-use of the forum. You can attach multiple files, or make a single .zip file.
please for the love of god DO NOT "LINK" TUTORIALS just lay out what i need to do HERE
If there is a tutorial, that explains what to do, why should it be copied and pasted here, when you just have to go to a link? The tutorial might have photos, etc.
mysteredding:
i cant believe this 9500 character limit so i had to split it into 7 posts, please go forth and read
You can attach files to your post you know. Making 7 posts just to attach files is a mis-use of the forum. You can attach multiple files, or make a single .zip file.
please for the love of god DO NOT "LINK" TUTORIALS just lay out what i need to do HERE
If there is a tutorial, that explains what to do, why should it be copied and pasted here, when you just have to go to a link? The tutorial might have photos, etc.
[/quote]ive never used forums before and so i didnt know you could attach files, as for the linking im just tired of sifting thru bullshit just to find out it didnt work, i just want short simple answers to whats wrong
mysteredding:
i just want short simple answers to whats wrong
You haven't actually said what's wrong, so it is hard to advise. Other than, I guess, it isn't doing what you expect. If you described what you did, what you expect to happen, and what actually happened, you might get somewhere.
Reporting someone three times for posting a link to a tutorial is abuse of the forum. Don't do it again.
You haven't actually said what's wrong, so it is hard to advise. Other than, I guess, it isn't doing what you expect. If you described what you did, what you expect to happen, and what actually happened, you might get somewhere.
Reporting someone three times for posting a link to a tutorial is abuse of the forum. Don't do it again.
[/quote]actually i told the entire story about whats wrong all you have to do is READ?!?! and btw i hit the repost button once and had to refresh, then hit it on a different post
[quote author=Nick Gammon link=topic=134097.msg1009466#msg1009466 date=1353877184]
On this page I have a sketch that runs on a Uno that will program a bootloader on various chips, including the Atmega8.
I'm not going to copy and paste thousands of words, and photos, to save you the trouble of following one link.
[/quote]this is basically the arduinoisp tutorial the only difference is mutilation of a good 6pin header
I'm guessing that English isn't your first language - your sentence structure is hard to follow.
Is there one of the sections in the International section that might be able to help better?
as you can see ive got quite a few boards ive tried already with avrdude: stk500_recv(): programmer is not responding when i use a pull-up resistor and avrdude: stk500_getsync(): not in sync: resp=0x## with different # each time and even sometimes get avrdude: stk500_getsync(): not in sync: expect:0x## or something to that effect, im stressing hard guys i need your help somebody anybody tell me what im doing wrong and what i need to do to fix this problem, or atleast a step in the right direction,
AWOL:
I'm guessing that English isn't your first language - your sentence structure is hard to follow.
Is there one of the sections in the International section that might be able to help better?
you have no un-spoken language section, and english was my first spoken language