Pages: 1 2 [3] 4 5 ... 11   Go Down
Author Topic: Help in programming the Atmega1284 with maniacbug-mighty-1284p.  (Read 23871 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 333
Posts: 22966
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27357
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27357
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27357
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 333
Posts: 22966
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged


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

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
« Last Edit: January 18, 2013, 12:45:11 pm by retrolefty » Logged

UK
Offline Offline
God Member
*****
Karma: 17
Posts: 568
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

Quote
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.
Logged

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

Quote
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
Logged

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

Quote
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.
Logged

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

Quote
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.

That could very well be and I will add or subtract from that speculation when my 1284P chip finally arrives.  smiley-grin

Lefty
Logged

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 333
Posts: 22966
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
In my tests, the synch problems manifest both with small (Blink) o large sketches. Simply, without RC filter the chip doesnt' respond to the data sent through the serial line.

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.
Uhm. this has a sense for me. Since today, I've only tested the 1284P on a breadboard because I didn't want to make a board for the serial programming using the bootloader if I wasn't SURE that I could do that to upload a sketch.
Logged


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

Quote
Uhm. this has a sense for me. Since today, I've only tested the 1284P on a breadboard because I didn't want to make a board for the serial programming using the bootloader if I wasn't SURE that I could do that to upload a sketch.

Well that leaves you in a catch 22 situation doesn't it?   smiley-grin

So maybe make provisions in your PCB to install a resistor/cap filter near the RX0 pin and just don't install the components and jumper around them with a wire jumper or a 'zero' ohm resistor if testing proves they are not required with whatever layout you end up using.

Lefty
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27357
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The only times I have trouble with serial downloading is when I accidentally leave the DTR cap off, or forget to burn the bootloader first. I'm slowly getting better about that!  smiley-mr-green
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

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

The only times I have trouble with serial downloading is when I accidentally leave the DTR cap off, or forget to burn the bootloader first. I'm slowly getting better about that!  smiley-mr-green

So OK fess up. Did you purposely do some 'special' PCB layout for the clock/RX0 lines on your 1284P boards being aware of the possible problems of noise interactions with serial communications? Or did you just get lucky.  smiley-grin

Lefty
Logged

Pages: 1 2 [3] 4 5 ... 11   Go Up
Jump to: