Help in programming the Atmega1284 with maniacbug-mighty-1284p.

PM with an e-mail address. I can't download them either. Get that weird 503 error message.

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.

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.

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

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

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?"

CrossRoads: 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

Dies all the same as far as I know. The Errata sheets have no mention of any serial port issues.

retrolefty:

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.

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.

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

I've read about the RC filter I've suggested on the AvrFreaks forum I've linked some posts above. Initially, I didn't think it was possible that a similar solution could help me but finally I got my chips working correctly.

Your analysis about the interferences between the crystal caps and the RX0 pin could be correct but I don't have an oscillo to check the signals and at the moment I've only did some experiments on a breadboard and maybe the interferenes between adjacent pin rows could disturb the serial transission.

BTW, using a 12 MHz cer resonator I could program the chip without the RC filter. Some people talked about clock issues but he did only with frequencies around 20 MHz, I'm experiencing troubles at 16 MHz, while at lower clocks the chips seems to work correctly.

There is no ground plane on this protoboard. FTDI Basic plugs onto the 6-pin header to the left of the crystal, MKii plugs onto 6-pin header above the board. All signals are 30 guage wirewrap to wirewrap socket pins. I do not see any serial download issues.

Ok, I am sticking with user error/poor wiring. I just bootloaded & downloaded a simple sketch, both succeeded on first pass. Datecode on chip: 1050

The Rx/Tx wires do not overlap the crystal pins.

That's what I am saying. Poor layout, poor wiring, poor who knows what. I have made over 50 1284 boards in various designs - DIPs, wirewrap, surface mount - and I have not had a problem 1 time. Not even with older date code parts, such as the 1050 I demonstrated with tonight. Bootloading with Atmel MKii, and serial downloading with a couple of different FTDI based modules.

oric_dan(333): Aha, that didn't seem to come out so clearly previously, with all the comments from others. 50 boards and no problems sounds like a lot of others with shaky board designs, starting over on avrfreaks.

Ok. And what about those messages in the AvrFreaks forum and in other sites coming from users that are not able to use a bootloader to flash a sketch on that chip? Those messages are old (3/4 years old), the problem is known. Several people had this issue. The user that suggested the use of the RC filter on the AvrFreak forum isn't a newbie. I gave him credit and I solved the problem.

BTW, a friend of mine had tried 5 different chips with sevaral datacodes and he wasn't able to bootload a sketch. He tried to use an FTDI card and an MCP2200 as USB/serial converter but he didn't solve.

PS: I tried my chips on a breadboard. The SAME circuit on the SAME b.b. worked perfectly with an Atmega644PA. I flashed the bootloader and was able to upload a sketch on it using its bootloader. So I can exclude a circuit problem (in my case).

It's pretty clear that the problem symptom is real for many people, as well as it's true many people have not seen the same problem symptom. The low pass filter does seem to be a 'solution' for many that are seeing that problem. Atmel does not seen to have ever claimed it's a chip internal problem, but rather they speculate that it's most likely a problem that may be caused by noise coupling from the chips clock lines pin(S) to the RX0 pin, so circuit layout external to the chip may be a variable that increases or decreases the possibility of one having the problem, and is supported by the observation that it's only been seen in DIP packaged 1284P chips. Changing to a bootloader that uses the second serial port has been a solution for some that have experienced the problem also.

My participation on this topic has been mostly academic and I just mostly passed on what I had read on the avrfreaks site (which I consider credible on this topic), and from what I've read on postings on this site. I'm still waiting for my 1284P chip to arrive from a slow boat from China (Futurlec, known for good prices and slow deliveries). So far using CrossRoads' 1284P through hole duem.. style board, I've seen no uploading problems using a 644P chip (even with a 60KB test sketch), but I am at least now knowledgeable to know what may or may not happen when I finally do get my 1284P, and possible solutions if indeed I see the uploading problem.

Lefty

Uploading small sketches is fine. I can load the blink sketch via serial every time. It only manifests with larger sketches, even 20k sort of size.

Atmel does not seen to have ever claimed it's a chip internal problem, but rather they speculate that it's most likely a problem that may be caused by noise coupling from the chips clock lines pin(S) to the RX0 pin, so circuit layout external to the chip may be a variable that increases or decreases the possibility of one having the problem,

That seems to be a new piece of information, unless I missed it in the jumble.

oric_dan(333):

Atmel does not seen to have ever claimed it's a chip internal problem, but rather they speculate that it's most likely a problem that may be caused by noise coupling from the chips clock lines pin(S) to the RX0 pin, so circuit layout external to the chip may be a variable that increases or decreases the possibility of one having the problem,

That seems to be a new piece of information, unless I missed it in the jumble.

It was a passing comment by one (or a couple of) avrfreaks poster that apparently sought out ATMEL's help, he was told effectively to clean up his circuit layout. That coupled with the fact that the problem is never mentioned in the errata section of any published Atmel datasheet for the 1284P lends credence to that 'speculation'.

Lefty

It was a passing comment by one (or a couple of) avrfreaks poster that apparently sought out ATMEL’s help, he was told effectively to clean up his circuit layout.

This probably explains why Bob’s boards “don’t” show the problem.