Go Down

Topic: Help in programming the Atmega1284 with maniacbug-mighty-1284p. (Read 28190 times) previous topic - next topic

tack

I get the same issue with teh 1284P using Mighty1284 Optiboot (Bobuino pinmap).

I can upload Blink but not larger sketches. I eventually gave up and just program via ISP. It's a bit of a pain for serial monitor as I have to keep switching my USB>TTL adapter to monitor, but I'm just going to order another cheap one to use with MTTTY for monitoring.

I have seen mention that trying a swap of the crystal resonator, or switching to a ceramic resonator can cure it, but I've not tried that as yet.

If anyone does know a link to a definitive fix then it would be useful to knoe.

retrolefty


I get the same issue with teh 1284P using Mighty1284 Optiboot (Bobuino pinmap).

I can upload Blink but not larger sketches. I eventually gave up and just program via ISP. It's a bit of a pain for serial monitor as I have to keep switching my USB>TTL adapter to monitor, but I'm just going to order another cheap one to use with MTTTY for monitoring.

I have seen mention that trying a swap of the crystal resonator, or switching to a ceramic resonator can cure it, but I've not tried that as yet.

If anyone does know a link to a definitive fix then it would be useful to knoe.


This really sounds like the 1284P DIP internal hardware bug effecting the serial input pin. The folks over at avrfreaks site had lots on it in the past. Seems the fix is to wire a low pass filter to the serial input pin which is a .1 ufd cap from the rec pin to ground and a series 10K resistor from the pin to whatever is supplying the serial data. Date code on the chip may or may not help identify a vulnerable chip. Another fix is to use a bootloader for the 1284P that was been compiled to use the second serial port on the 1284P that wasn't effected by with internal hardware bug. There was such a bootloader made available a while back by someone. Who remembers all those details.  ;)

And of course these days you can use a arduino board running the arduinoISP sketch and upload your sketch using the IDE file/upload with programmer option the IDE now offers.

Lefty

I will need to try the low pass filter and the second UART alternative.

For the moment I am using the Arduino as ISP and uploading through the programmer instead :/

CrossRoads

I don't see these problems when bootloading 1284's via Atmel AVR ISP MKii and sketch downloads with FTDI modules.

Can you try with this bootloader?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

I am getting an error message when trying to download the .hex and .txt file. Can you look into this please? I would love to see if those 2 files would fix my issue. Thanks

CrossRoads

PM with an e-mail address.  I can't download them either. Get that weird 503 error message.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

leo72

#21
Jan 16, 2013, 09:29 pm Last Edit: Jan 17, 2013, 10:20 am by leo72 Reason: 1

I get the same issue with teh 1284P using Mighty1284 Optiboot (Bobuino pinmap).

I can upload Blink but not larger sketches. I eventually gave up and just program via ISP. It's a bit of a pain for serial monitor as I have to keep switching my USB>TTL adapter to monitor, but I'm just going to order another cheap one to use with MTTTY for monitoring.

I have seen mention that trying a swap of the crystal resonator, or switching to a ceramic resonator can cure it, but I've not tried that as yet.

If anyone does know a link to a definitive fix then it would be useful to knoe.

I worked for a while with Atmega1284P in the past weeks and I also experienced problems during the upload of a sketch using the bootloader.
I looked for help on the form (here and following posts) then I googled and found on AvrFreaks that this could be an hardware bug on the USART0 (read here).
So I solved using an RC filter with a 10K resistor in series and a 100 pF capacitor to ground, both put very close to the TX RX pin of the Arduino 1284P. Also, cut a little the pins of the capacitor.
Try it.

retrolefty

Quote
both put very close to the TX pin of the Arduino 1284P. Also, cut a little the pins of the capacitor.


Don't you mean the Rec pin RX0?

Lefty

CrossRoads

Was that some specific date-code lot of parts?  I have never seen that happen.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

Skyjumper from our Arduino forum posted this on the other forum, testing with this board that I had wirewrapped up here
http://arduino.cc/forum/index.php/topic,56567.0.html

And he ran the serial ports fast in his applicatio. We never did anything special for the serial ports with low pass filters.
I suspect poor wiring where the error is occurring.

"skyjumper 
Posted: May 24, 2011 - 04:12 AM 

Joined: Feb 15, 2011
Posts: 81
Location: Smithfield, RI

Hm, I have been building a 1284P based product for a while and its serial intensive, no problems noticed here. I just wrote an app on my wire wrapped prototype with its 1284P in DIP. We'll see how long it runs.

Is there any info about what triggers this bug, or exactly what problems it causes?"




Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

retrolefty


Was that some specific date-code lot of parts?  I have never seen that happen.


Yes, (datecode 1017) was mentioned for the avrfreaks site poster, but not clear if it applies to other date codes. Probably need to research Atmel errata notes for that chip series. I'm pretty sure it was also limited to DIP package only, but that sounds kind of strange as I would think the dies are the same for any datecode chips made?

Lefty

CrossRoads

Dies all the same as far as I know.
The Errata sheets have no mention of any serial port issues.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

leo72


Quote
both put very close to the TX pin of the Arduino 1284P. Also, cut a little the pins of the capacitor.


Don't you mean the Rec pin RX0?

Lefty


Yeah. My mistake. Corrected.

leo72

My chip's datacode is 1139.
I don't have an oscillo to look at the signals so I don't know why/how the RX0 pin works with or without the RC in front of it but can say for sure that without it I cannot program the 1284P via serial using the bootloader.
Of course, no problems using the ISP programming.

A friend of mine has a datacode of 12xx and he is experiencing that bug in a stronger manner than me, because he isn't able to program the 1284P using the bootloader nor with nor without the RC filter.

leo72

I got another Atmega1284P, its datacode is 1151.
Same behaviour, I can easily flash the bootloader using the ISP programming but, then, I can NOT upload a sketch unless I use the RC filter on pin RXD0

Go Up