ATmega328 vs. ATmega328P ... one more time please...

I have read a whole bunch of old threads (that seem to veer off to talk about other chips) about these two chips.

I have read about Nick Gammon's techniques to reduce 328 (328P??) power consumption. As well as other articles on the topic.

What I still are murky on is the practical difference (not in HEX please LOL) between the chips..

I am planning on building a "bear bones" Uno to save power. The adafruit kit uses a 328 and I wish to use my 328P out of the Uno in the BB kit. I would stick with a stock Uno but it is a (relative) power hog over long term use.

I am still learning about the microcontroller world and programming in general... at a high level of understanding (ie: plain talk) what is the practical difference between these two chips?

Thank you very much in advance. I am trying to learn with out a prior computer or electronics background so sorry for the dumb questions...

Power consumption.

Buy 4-5 Atmega328P-PU chips to have on hand. Also some 16MHz crystals, 22pF capacitors (2 per XTAL) and lots of .1uF ceramic capacitors.

|500x255

.

LarryD: Thank you... can I assume they can work just fine in any Uno or Uno clone (adafruit bear bones) with out introducing bugs?

They work just fine.

.

Yes, and the fact that the ATmega328 and the ATmega328P doesn't share device signature (like e.g ATmega32 and ATmega32A does), so you can't upload code to the 328 directly, if you choose the Arduino UNO option in the IDE. You'll get an error saying that the device signature is wrong.

If you want to dive a little deeper into the microcontroller world without leaving the Arduino platform, I recommend you to read up and download MiniCore. With this add-on you can use the ATmega328 or 328p simply by changing a menu option. You can also experiment with different clock frequencies and the internal oscillator. You'll save some power by using a lower clock frequency than the standard 16 MHz.

Thank you both.

LarryD: I plan on doing all my development on a stock Uno R3. Then, when all debugged (I know… is anything ever really “debugged”? LOL) I will transfer the 328P to the bear bones board (“BBB”).

Do you have a simple schematic for a good BBB? I have seen many on the internet and all are different. I will not need a USB port… just a low power regulator (since 6VDC is more common than 5VDC in battery configs).

Thank you in advance.

Are you aware there is something called 'Arduino Pro Mini' ? These are inexpensive and have all the capabilities of an UNO. In fact they have two more analog inputs, A6 A7. They come in either 5V or 3.3V. A lot cheaper than making your own PCB with Atmega328P-PU

These boards have all the components already on the PCB. They are about $3.00 each on eBay. http://www.ebay.ca/itm/5X-Arduino-Pro-Mini-Atmega328-Development-5V-16MHZ-Board-Module-Compatible-TE156-/311523688132?hash=item4888423ec4:g:6QsAAOSwy5ZXDL4A One example above. (I have not purchased from this supplier but I have from others)

Other suppliers

You program them from the IDE using a standalone FTDI board ~$7.00

|500x500

.

I'd be really surprised if the barebones kit you mention actually contains a 328 rather than a 328p.

The only difference I know of is that the 328 does not allow you to disable the brown out detection circuitry in SW...

• Bit 6 – BODS: BOD Sleep(1) The BODS bit must be written to logic one in order to turn off BOD during sleep, see Table 9-1 on page 39. Writing to the BODS bit is controlled by a timed sequence and an enable bit, BODSE in MCUCR. To disable BOD in relevant sleep modes, both BODS and BODSE must first be set to one. Then, to set the BODS bit, BODS must be set to one and BODSE must be set to zero within four clock cycles. The BODS bit is active three clock cycles after it is set. A sleep instruction must be executed while BODS is active in order to turn off the BOD for the actual sleep mode. The BODS bit is automatically cleared after three clock cycles. • Bit 5 – BODSE: BOD Sleep Enable(1) BODSE enables setting of BODS control bit, as explained in BODS bit description. BOD disable is controlled by a timed sequence. Note: 1. BODS and BODSE only available for picoPower devices ATmega48PA/88PA/168PA/328P

LarryD: I was not aware of the mini... will look it up now.

If the mini has a 328 and not a 328P-PU then I will loose some of the "battery savings" I hope to gain... correct?

OOPs... just read it...does have the 328P-AU!

But will need a voltage regulator... then it would be find for what I am looking to do me thinks... or at least good to experiment with.

How can i hook a regulator to it? ... this Pro Mini might just be exactly what i am looking for!

The 5V Arduinio Pro Mini has a on board 5V regulator.
Pin ‘RAW’ would be ~7.5VDC in.

When programming, either disconnect VCC from the FTDI cable and power the Mini from RAW.
Or
Remove RAW and power the board from VCC from the FTDI cable.

.

Arduino Pro Mini.jpg

.

LarryD:

Got one and just spent 1/2 a day trying to down load all kinds of ^&*&(&(^&(& drivers for the USB... its some kind of PL2303 chinese knock off... and no one seems to have the correct driver... including the vendor.

:-(

I mentioned the FTDI cable.

I have no experience the PL2303.

.

Google Arduino PL2303

.

SB - are you referring to the CH340G? They are by far the most common USB<->serial chip used on Chinese Arduino clones. Personally,I’ve had nothing but trouble with the Prolific PL2303 parts & drivers on Windows. Perhaps it has been Chinese copies I’ve encountered in cheap USB to serial rs-232 converters, don’t know for sure but they are first on my list to avoid.

OTH, the CH340 drivers are quite solid as is the hardware, no reason to avoid them. I’ve used them on both Windows and Mac. FWIW, I’ve never had any issues with China sourced FT232 parts so those are my second choice after the CH340G. The Silabs CP2102, while also a solid part with good driver support, comes in a distant third really not due to any problems, just a lack of board configurations as they all seem to USB A plugs on them rather than sockets.

its some kind of PL2303 chinese knock off

Prolific had an older version of their chip widely cloned, and since they had been shipping a newer version (the letters after the "2303" part are relevant as well, apparently), they just stopped supporting that version of the chip in post-W7 drivers. http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=155&pcid=41 (not how I would have done it; I'm sure there are many people with pre-2012 "genuine" prolific adaptors that are now driverless as well; a "serial cable" is not something you expect to have to upgrade when you change OS. :-( )