Pages: [1]   Go Down
Author Topic: atmega1284 uploading problem  (Read 1162 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i§m using atmega1284 with ''mighty atmega1284 using optiboot'' burnloader. I have problem with uploading code. sometimes i upload code sometimes not but mostly not. Can the problem be that i'm using atmega1284 instead of atmega1284p? thanks for everyones help.


succesfull upload with max232(just the end):
Code:
avrdude: Recv: . [10]
######## | 100% 0.18s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0016
         0xa5 != 0xf5
avrdude: verification error; content mismatch
avrdude: Send: Q [51]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]

avrdude done.  Thank you.

unsuccesfull upload with max232(just the end):
Code:
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x62
avrdude: Send: V [56] @ [40] . [00] . [00] . [0c]   [20]
avrdude: Recv:
avrdude: stk500_cmd(): programmer is out of sync

unsuccesfull upload with uno rev3(just the end):
Code:
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: Send: V [56] @ [40] . [00] . [00] . [0c]   [20]
avrdude: Recv:
avrdude: stk500_cmd(): programmer is out of sync
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17303
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Many people were having problems with reliable serial communications on their 1284P chips. Several hardware 'fixes' were tried with varying results. But what finally seems to really solve the problem was changing the low fuse byte value to use 'full swing' crystal option, this seemed to fix the problem for everyone that was having the problem.

So check what value of your low fuse byte is and if it presently has a value of 0xFF change it to 0xF7

Lefty

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks lefty, unfortunatlly it didn't help much. first upload with max232 worked but others didnt work.
even when i uploaded it i got this:
Code:
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x003b
         0x00 != 0x80
avrdude: verification error; content mismatch
avrdude: Send: Q [51]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]

avrdude done.  Thank you.
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know what you're using with a MAX232, but that's an older system.
I've only used FTDI USB serial interfaces.

1. if you're having sync errors, that's probably not related to 1284 vs 1284P,
    but to possible non-recognition of the COMPORT by the IDE related to
    driver installation, or lack thereof. So, the first question is the MAX232
    port showing up in the IDE "Tools > Serial Port" menu?

2. secondly, there is an issue with trying to burn bootloaders and sketches to
    1284 chips using the 1284 "P" bootloaders, which is related to the different
    signatures of the two chips. See the first couple of posts here,

http://arduino.cc/forum/index.php/topic,144625.0.html
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

bootloader isn't problem. it was ok without problems. i changed signature and it works. max232 is fine. i can upload codes to uno with it without problems everytime.
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2086
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is Xtal frequency?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

16mhz
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2086
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Q:
1. decoupling? (100uF and few 100nF ceramics close to 1284 and MAX pins)
2. voltage? 1284 without P might have a problem at 3.3V and 16MHz
3. upload speed? - start with 38400 or 57600 when possible (115200 @16MHz is 3.7%off - a potential issue when your crystal is off)
4. Xtal capacitors?
5. is the automatic reset (dtr to reset via a 100nF cap) working?
6. 10k pullup on reset
7. 10k pullup on RxD (optional)
« Last Edit: March 13, 2013, 03:13:48 pm by pito » Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

1. only 1000uf
2. 5V
3. 115200. i'd try less if i knew how. i guess changing it in baords.txt.
4. 22pf
5. yes
6. yes
7. no
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2086
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
1. only 1000uf
Forget this kind of capacitors - it has none decoupling effect with an mcu @16MHz smiley
You must use few ceramics 100nF at VCC, AVCC against GND (close to the pins, as short leads as possible) and a 10-100uf low-esr tantalum (or a 10uF multilayer ceramic).
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Can the problem be that i'm using atmega1284 instead of atmega1284p?
If you're ....

a. 100% certain the bootloader was installed properly, which isn't always obvious
    to have occurred, and
b. your comms h.w. is 100%, and
c. you properly tapped into the DTR signal on the comm link [???] to reset the
    chip, and
d. you properly changed the signature back and forth between burning the
     bootloader and uploading sketches, and
e. your board is well designed with good v.regs and lots of bypass caps,

Then, maybe it's related to the 1284 vs 1284P chips. What lefty mentioned
should fix the 1284P RXD/crystal sensitivity problem, but some people had to
put low-pass filters on the RXD line, eg 1-5K series-R and 100 pF to gnd at
the pin.

You should only need a pullup on RXD if the pin is floating in operation, such as
FTDI cable or MAX232 being disconnected.

Re item c, how is one certain that the MAX232 circuit DTR pin will properly
trigger the Arduino Reset? Probably best to measure it. From what I measured,
DTR at the 0.1 uF cap goes low [5V -> 0V] for the duration of sketch uploading.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

wow, thanks that actually hepled. everytime i upload something it says problem uploading to board but MCU starts doing the code. i just add caps
« Last Edit: March 13, 2013, 03:48:38 pm by miros » Logged

Pages: [1]   Go Up
Jump to: