need help with reading data sheet. atmega328

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I used the through hole 328 in development and during production we chose the smd. My design uses a few pins on PORD for powering a device. The through hole seems to work where the SMD does not. Were on a data sheet can I find the current that each pin/port can put out?

Last Edited: Sun. Sep 28, 2014 - 05:03 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is no difference in specification, pin current or otherwise, between the PDIP and the other package types, except that the PDIP doesn't have ADC6/7, and one less GND and Vcc pin.

 

Look in the datasheet for section 35.7 Pin Driver Strength.  Look also at table 30.2 DC Characteristics, especially the notes at the end of the table.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

Looking over those tables I agree it looks the same. I guess my problem is else where. I was able to add a 1.5k pull up on the pin and it supplies enough current to do the job but I need the micro controller to set the pins in question lo at times. I also could use a mosfet but I'd like to truly understand the problem first.

 

For example I may operate a device by using PIND.4 low and PIND.3 hi. It works as long as it requires X current but my device requiring Y current does not work. Using a pull up solves this. I do not have this problem on my PDIP chip. My power source is usb and the output drops to 4.7 with a load on it under working conditions. I'll have to make some test to see what current is drawn for the sake of understand but its still not adding up.

 

for production I'm using the 28 MLF

 

I also see on the schematic that the GND/AVCC are not connected to power. Though I'm pretty sure this is for the analog circuit and should not effect the other pins, right?

Last Edited: Sat. Sep 27, 2014 - 04:11 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

S_K_U_N_X wrote:
I also see on the schematic that the GND/AVCC are not connected to power. Though I'm pretty sure this is for the analog circuit and should not effect the other pins, right?
Wrong:
In the datasheet, Atmel wrote:
1.1.7 AVCC
AVCC is the supply voltage pin for the A/D Converter, PC3:0, and ADC7:6. It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter.
You must connect all power pins.  You must satisfy: Vcc-0.3V < AVcc < Vcc+0.3V

 

AVcc shouldn't affect pin driver strength on PD3/4, but you must connect it anyway.

 

I'd look for solder bridges, flux residue, etc... and confirm that your code is in fact configuring those pins as outputs.

 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

Ok I'll check on that then, thx.

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

S_K_U_N_X wrote:
My design uses a few pins on PORD for powering a device

Not generally a good idea to power stuff from Port pins...

 

Quote:
Were on a data sheet can I find the current that each pin/port can put out?

You should have checked that carefully before committing your "design"!

Maybe you just "got lucky" on the prototype, and it's come home to roost on the production board...

 

What, exactly, are you "powering"? How, exactly, are you "powering" it? How much current does it take? What are its voltage requirements?

 

Schematic?

 

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd look for solder bridges, flux residue, etc... and confirm that your code is in fact configuring those pins as outputs.

Oh sorry, this board uses 4 identically wired chips, connected to a hub. Each chip configuration has the same fault.  In this case I dont think a bridge of residue can be the issue as it would have to be replicated 4 times. Also the code flashes to the old design via bootloader as well as the new design and the situation still remains to fail only on the production board.

 

What, exactly, are you "powering"? How, exactly, are you "powering" it? How much current does it take? What are its voltage requirements?

Actually its 3 devices. All that worked on my previous design. The devices are not documented as the are proprietary video game controllers. As I mentioned i'll have to make a few test to determine what they are drawing. Previous tests showed 20ma or so. I'll add this info once I have a chance to investigate a bit.

 

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

Further investigation has yielded new results. The device requires 0.22 mA. The issue is not the current from the pin its the fact the pin will not go hi. So the issue has changed. I now need to determine why the pin will not go hi on PORTD.3.  The code has not changed in any way and seem to bring the atmega328p PDIP  pin hi but not on the 28 MLF. The manufacture says that both AVCC and VCC  pins are connected but I cant not confirm both via my equipment. Sounds to me like this pin is shorted to lo pin, but I'll have to find a way to confirm this be I know it for sure.

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

If the pin were tied low, then adding a 1.5K pull-up wouldn't deliver power to your load.  Rather, current would be sourced through the resistor to ground.

 

The obvious question now is are you certain you've got pin PD3?  On the 28 MLF package it is pin 1, i.e. the first pin counter-clockwise of the 'Pin 1 ID' corner pip.  If you thought it was pin 5 like it is on the PDIP package, you'd actually be connecting to GND.

 

 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

Ok I found it, very easy schematic bug. I needed a small cap from pd3 to ground, and instead the manufacture put it in line.

 

should have been

_____ | [] |___ground

|____pin

 

but they did

_____ | [] |___pin

 

Wow that one had me going... Thx for all the help even though it was unrelated to mu first suspicions.

 

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

The manufacture says that both AVCC and VCC  pins are connected but I cant not confirm both via my equipment.

Have a multimeter?

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

Yes but I had to find a better prong ;) I have this now.

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

Drawing schematics with ascii characters in a variable width type face!

The largest known prime number: 282589933-1

Without adult supervision.