NEW ATMEG328PB Question

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

Greetings everyone,

 

Im working on a circuit for a robot for my daughter, I'm creating the circuit boards myself.

Using the Mega328p I will need to do pass the signals to the bottom layer and then bad to the top lay in several places.

I see that the NEW MEGA328PB offers two SPI's in the hardware. This would make routing signals MUCH easier using SPI1 not SPI0.

 

I use an AVRISP mkII and AMTEL STUDIO 7.0 for programming, The BIG question that I have is can I use the SPI1 for ISP ??? or if I can only use SPI0 for ISP ??

 

I know this is NEW to the market, but I'm hoping that either someone knows of that It may be the same as other chips with multiple SPI's.

 

Thank you,

Michael

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

Conventional ISP occurs when the device is held in reset, & that usually means there is no user-choice on ISP pins, unless you write your own boot-loader (which is used when the device is running).

.

Last Edited: Thu. Jan 28, 2016 - 12:23 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So from what I gather from your explanation is that you have to use the SPI0 for In System Programming,

Is this the same for other AVR chips that support multiple SPI ports ?

 

Michael

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

ettill777 wrote:

So from what I gather from your explanation is that you have to use the SPI0 for In System Programming,

Is this the same for other AVR chips that support multiple SPI ports ?

Check the data as to which pins are used for PGM.

 

ISP applies to a blank device, held in reset.

How exactly do you propose you could tell that blank device, held in reset, that you want to use different pins ?

 

What you can do, is program the device with a boot-loader, and now you have run-time choices of pins, but you do need to first use the manufacturers allocated pins (on some parts, that can be SPI or Debug) , for the first program of the loader..

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

That does make sense, was just hoping.

 

Thank you.

Michael

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

Check the data as to which pins are used for PGM.

 

33.9.1. Serial Programming Pin Mapping
 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Thank you JS ... that is the data I was looking for but did not know where to find it.

and just skimming the 425 pg data sheet I missed it.

 

Learning new things EVERYDAY.

 

Michael

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

Why were you skimming at random pages when there is an index which shows you were things are documented?  wink

 

Doesn't your PDF reader show the index on the left? (it can be turned off I guess)

 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Even without the handy index pane on the left (something >>every<< PDF viewer I've ever seen does have), there's always CTRL-F to find a word/phrase.  Why doesn't anyone but me know about this?  Kids today.

"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]