0
\$\begingroup\$

I am trying to design a PCB which will make use of the ATmega324PB microcontroller [Datasheet here]. I have previously worked with smaller AVR chips such as the ATmega168PB, and programmed them through the ISP pins using an AVR Pocket Programmer.

  1. This is the first microcontroller I've used with multiple SPI channels (MOSI0 and MOSI1 etc.). The datasheet makes no mention of how to approach this when performing In-System Programming, am I right in assuming that channel 0 (i.e SCK0, MISO0, MOSI0) should be used for this? The only real differential I can find between them is in the block diagram in Figure 4-1 (pg 13 of the datasheet).

  2. The AVRDUDE tool used by the Pocket Programmer has not been updated in some time and does not list this this specific IC as supported (though it has the 324P and 324PA listed). I'm considering upgrading to an STK500 as Atmel Studio 7 lists it as a supported device for the micro, are there any issues here?
\$\endgroup\$
1
\$\begingroup\$

It's not always the SPI port that you use for the programming of these parts, the attached image explains it and the datasheets are always clear on this. I was caught out on a Mega64 IIRC once over this.

enter image description here

Remember you can multiplex these pins so they are available for normal use.

As far as programming is concerned Olimex do clones of the good old AVRISP Mk 2. They list the A part here:

https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/

I am sure if you wrote to them to double check, they would confirm whether the B is also programmable with it. I'd be very surprised were it not.

\$\endgroup\$
  • \$\begingroup\$ Thank you for pointing that table out, I completely missed it. Following your advice I have emailed Olimex and will hopefully get some good news back. \$\endgroup\$ – Jordan Cartwright Nov 28 '17 at 12:54
  • \$\begingroup\$ For completion sake; Olimex replied and confirmed that the AVRISP Mk 2 can program the uC through Atmel Studio 7 \$\endgroup\$ – Jordan Cartwright Dec 1 '17 at 6:24
1
\$\begingroup\$
  1. Pin diagram for ISP is shown on the page 364 of the datasheet.
  2. You can compare 324PB fuse bits and memory layout with 324P or 324PA and if they are similar(they should be similar) you may program it as 324P or 324PA, but override Avrdude signature check (-F option). However, do that at your own risk.
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.