Solved: MEGA328PU-TH and cold - Junk in serial communication

Go To Last Post
63 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've updated my test results above in post #50

 

https://www.avrfreaks.net/commen...

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

Last Edited: Sat. Feb 23, 2019 - 08:56 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Some thoughts...

 

1) The OP of this thread was having problems with serial communications. When they switched from the internal RC oscillator to an external resonator the problem went away. As would be expected.

 

2) Out of the box most (all?) AVRs run at 1MHz internally. That means the first run of programming MUST be done with SCK set to 250kHz or slower for reliable operation. The default for AVRdude is I believe 1MHz so it must have a command line option set to slow it down.

 

3) There is no mysterious -TH variant of these chips, I'll hazard a guess that in future they will all come from -TH.  https://www.avrfreaks.net/commen...

 

4) It's easy to get confused by the chip numbers. ATmega328 and ATmega328P are different chips. They have different chip signatures. The signature must be set correctly in your programming software or it will fail.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:

As it is sitting on my desk I just looked, and it has a Mega328P, U-TH chip installed in the cheap Nano clone that is running the Bot.

So the chip is working for two of us...

 

JC 

 

but you said you have ATmega328P.... and not 

Atmega328

U-TH

 

JC, We dont want N2NXZ to get angry again. its either you have the same chip or please enough of theory. Anyway we need to wait for Roberto to come back

 

Regards,

Moe

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Moe123 wrote:

its either you have the same chip or please enough of theory. Anyway we need to wait for Roberto to come back

 

It's just as well that I've tested both then isn't it?

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:

Moe123 wrote:

its either you have the same chip or please enough of theory. Anyway we need to wait for Roberto to come back

 

It's just as well that I've tested both then isn't it?

 

True. but the OP was complaining that people who dont have the chip cannot just assume something that they dont physically tested. Now you tested it both, he only tested ATmega328P.

 

This is the difference.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Moe,

 

Brian tested both the AtMega328 and the AtMega328P.

Both these chips work for him. Also DocJc has proven that he has working chips from the same -TH version

So unless either Roberto or N2NXYZ return and start to give more info better leave this thread as is.

We can debate forever on what is going on, but as long as these posters do not return we will never know what actually has been wrong.

Hope both of them return to tell us how they solved the problem such that it is recorded for future reference and people can learn from it in the future.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok...revisited this chip "Mega328pu-th" being the 5th tried on a brand new PCB just to try one more thing.

This could be that the first were indeed defects OR somewhere I made 4 mistakes in a row after soldering 35 /  328p-au of these chips previously with success.

Everyone has a bad day.

My project requires 20mhz crystal since the firmware calls for this.As we know,most arduino`s use 16mhz.So this time dropped a 16mhz xtal onto the board and like always,setup my programmer and AVRDUDE.First command for signature worked...then tried a verify and that also worked.So far,it was working unlike the previous attempt's.

Now went ahead and did chip erase...success. Then went ahead and did the fuse setups...SUCCESS. Then my HEX then an EEP ...all worked perfectly.

So managed to get ONE to work.

I found it strange that the issue was due to 20mhz vs 16mhz...so naturally I had to find out.

Removed the 16mhz and replaced with 20mhz and went through the entire routine exactly the same way...SUCCESS.

Now,tempted to try the chips I have saved from precious attempts that failed so we can see if they were defects or somewhere my brain was defect that day :)

Sometimes this programming stuff can make us crazy...best to walk away from it and come back with clear mind.

Will finish this issue once this is tried.\

Jim

James jr

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also,let me apologize to those who I bit their heads off that were trying to help earlier in this post.

There is no excuse other than frustration and being familiar with other forums where some can criticize a persons intelligence,perhaps not deliberate,but it always looks that way in text form.

So hopefully we can get past this.

Again...this does not mean the first attempts on these chips were not computer glitch,bad connection of ISP header pins,intermittent short in my programmer cable,bad solder joints (x4 ?) or anything of that nature.I had even updated AVRDUDE to new version at the time.

Until I test the previous chips that I saved,will not know unless they are indeed just bad chips and found one that actually works.

Jim

James jr

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok first I assume that OP use full swing osc, (not low power that only should be used up to 16MHz).

 

Perhaps Microchip again try to produce mega328P on the same line as the mega328PB, where the full swing osc don't work :(

(there came a note but the chips never came out, but perhaps they sell them to some that don't care )

Last Edited: Tue. Feb 26, 2019 - 11:56 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

N2NXZ,

 

the photo your friend posted shows what seems to be a shortcircuit between the top xtal cap and one of the legs.

depending on the internal structure of the xtal that might be deadly as it then might not resonate ( been there done that and had loads of trouble with it)

 

Also if you have chips that you think are dead, Get in contact with Brian to send one to him. A lot of us are curious if the chips are really dead or that you still do something wrong(hard word, but not meant so)

 

In addition, I had major programming issues my self a while back and in the end it turned out my programming cable after a lot of use had worn out, giving random results at first.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I agree and will try the previous chips that were not working for me.

Soldering,de-soldering these chips are hard on the PCB`s which I hate to do.Also,not great for the chips themselves either.

So I have 2 PCB`s now that work,one with this PU-TH chip and the other with P-AU.

Both working and will fully assemble and test them both with my firmware.

That will be good test when operating as they are transmitters and need to function perfectly as designed.

I have built 30 of these..so not new to me.

Could very well be anything that caused the original errors like cables as like you mention DO get quite used.Poor soldering usually the first to check but that usually is resolved quickly unless they are shorted and no longer good.I find it easier since they are so cheap to remove a failed attempt and replace with new to get the work done.I am ok with taking losses as the project I am working on needs to be finished and working.But sometimes during down time,I will go back and mess with them again and will post what I find.

But even then,if some work,some do not will only mean 2 things...I ruined them by poor soldering or they were bad from the start...will never know the true answers.

So my final opinion.

If you end up with these TH chips,all you can do is try them...that is about the sum of it.

Originally I was impatient and was hoping to find answers fast so I can determine whether to toss them away and buy the proper chips,or if it was a new issue that occurred elsewhere I needed to fix.I am way past all that and focusing on the project on hand.Much more to do as this is 30 seconds of the project with much left to finish and get underway.

Thanks to all working hard on this issue.

Jim

 

James jr

Last Edited: Tue. Feb 26, 2019 - 01:03 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

To seal this topic,I need to add that I found the issue with this TH chip.

They DO WORK and the issue all along was a bad programming cable.It just so happened it worked on other chips by pure coincidence.

After trying p-AU and finding they also were not working.

New cable proves they work fine.

Jim

James jr

Pages