Xplained Mini mega328PB

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

I absolutely love this thing! It's like an Arduino on steroids. Since the on board 32u4 uses the ISP interface, no bootloader necessary and fully compatible with Atmel Studio.

 

And lots cheaper than an Uno!

 

I love the mega328PB, although I really wish they made a PDIP variant.

 

One thing I learned the hard way...DON'T MESS WITH THE FUSE BITS!!! I'd forgotten that the 32u4 supplies CLKOUT to the PB and for some reason thought it had an on board crystal oscillator, thus I ended up bricking one after changing the oscillator fuse bits. No need to mess with them on this board. Worry about that in production.

 

Other than that this is an excellent development platform. No need for an external programmer or a bootloader plus you code it with the WinAVR compiler in Atmel Studio. Couldn't be better.

 

Jon Wilder
Freelance Embedded Engineer

Last Edited: Sat. Mar 7, 2020 - 09:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a pile of those 328PB boards..got them real cheap.   They are quite handy to work with & ready to go.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Sat. Mar 7, 2020 - 06:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Indeed:

 

 

But, in another thread, david.prentice wrote:
mEDBG is appallingly slow for debugWIRE.

 

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

frown

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

And when you're ready to miniaturize, there is the Pololu A Star 328pb board.

Looks nice; pretty inexpensive.  Solid vendor.

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

Jon Wilder wrote:
I love the mega328PB, although I really wish they made a PDIP variant.
only in a possible follow-on (mega4809)

https://www.avrfreaks.net/forum/megaavr-0-series?page=4#comment-2695296

 

"Dare to be naïve." - Buckminster Fuller

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


Jon Wilder wrote:
I really wish they made a PDIP variant.

Quite easily arranged:

 

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

Hey, do you have the code for this published somewhere? 

I am trying to learn this stuff up and wanted to have a look at your code if you do not mind!

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

What code are you looking for?

 

When you plug it into Atmel Microchip Studio, it will recognise it - and it has a set of examples ready-to-go on the board...

 

START probably also knows about it.

 

But there's very little that's actually specific to the board ...

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

Oh, okay. Thanks for that info. 

Also, do you recommend any sources to get started with the board? I have a project's blue print in mind but not enough technical information to actually implement it. How do I overcome this whilst learning the most?  

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

zain1320 wrote:
do you recommend any sources to get started with the board?

Obviously, the board's User Manual and the schematics:

 

https://www.microchip.com/DevelopmentTools/ProductDetails/atmega328pb-xmini

 

For the chip itself, as always, start at the Product Page:

 

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

https://www.avrfreaks.net/forum/...

 

For  Atmel Microchip Studio,  there's a load of 'Getting Started' videos on its Product Page:

 

https://www.microchip.com/mplab/microchip-studio - scroll down to the end

 

 

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...
Last Edited: Fri. Dec 4, 2020 - 08:43 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

zain1320 wrote:

I have a project's blue print in mind but not enough technical information to actually implement it. How do I overcome this whilst learning the most?  

 

Start simple. Forget about your project until you can do the following...

 

1) Flash an LED at 1Hz using delay()

2) Use a push button to toggle an LED on and off

3) Flash an LED at 1Hz using a timer

4) Print "Hello World" to an LCD display

5) Send "Hello World" to a serial port and display it in a terminal emulator on your PC

6) Turn an LED on and off using commands typed on your PC keyboard

 

...do that lot and you'll have a good start on ANY project.

#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:
Start simple. Forget about your project until you can do the following...

+1

 

Although I'd put these two in the opposite order:

4) Print "Hello World" to an LCD display

5) Send "Hello World" to a serial port and display it in a terminal emulator on your PC

See: https://www.avrfreaks.net/commen... - which is also linked from Tip #6 in my signature, below.

 

But, as Brian says, the key is to lay solid foundations first before starting on your project

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

That is a great list above, that makes for a solid foundation before tackling a specific project.

 

I'd add one more item:

 

Learn how to use an interrupt.

Perhaps a Timer/Counter in what used to be called CTC mode, to generate an interrupt once every 1 mSec, (for example).

 

JC

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

DocJC wrote:
Learn how to use an interrupt.

+1

 

Perhaps the UART receive interrupt?

 

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

westfw wrote:
Pololu A Star 328pb board.

Looks nice; pretty inexpensive.  Solid vendor.

Seems they may have clobbered debugWIRE: https://www.avrfreaks.net/commen...

 

frown

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