Flashing ATMEGA328's?

Status
Not open for further replies.

ksafin

Member
Hey all,

I wanted to post a quick question about flashing ATMEGA328's over ICSP.

I'm making an edge card that has two ATMEGA328's on it, and I broke out the mutual SPI lines (MOSI, MISO, SCLK) and the individual RESET lines (RESET for one, and for the other) for a total of 5 signals coming out of the edge card. This is in addition to 5V & GND. Basically the ICSP pinouts but on my edge card.

I am then trying to be able to program each of them from a special jig that has the edge card receptacle.

My question that I'm not totally sure on is if I'll have any problem flashing these two when the SPI bus is joined. That is, I'll only ever be programming one at a time (by only pulling one reset low when programming), but I'm worried having a joint SPI bus can be problematic.

That is, when programming one controller, the other controller is inherently powered on -- and I'm wondering if somehow it'll be sourcing it's own clock line on SCLK, or somehow responding to data on MISO, or outputting on MOSI.

To be clear, I won't be using SPI for anything itself. The controllers will use the broken out SPI bus for programming, but never use SPI in their actual functionality.

My inclination is to say no, but I wanted to be sure I'd be able to program them both on the combined bus.

Thanks!
 
Maybe ask on avrfreaks? This a really a AVR question...

https://www.avrfreaks.net/

Or Arduino's forum? At least Arduino makes boards with the '328 chip.

https://forum.arduino.cc/

This forum is about Teensy. No Teensy has ever used that chip.

My bad -- I knew that, I was just inclined to ask here.

On a somewhat related note, can I ask you an ATMEGA32U4 question since it was on Teensy 2?

Can the ATMEGA32U4 simultaneously ask as an SPI master & I2C slave? Is there anything preventing that?
 
yes, obviously the slave would have interrupts, but they can both work together

Great, just wanted to make sure.

I'm using it in SPI master mode to control 8 ATMEGA328's, but wanted to be able to communicate with it using SPI so I'm trying to throw in an SPI-I2C bridge for that purpose.

Sounds like it'll work -- thanks!
 
Maybe needing 8 microcontrollers and a special protocol bridge is a sign it's time to consider a powerful 32 bit Teensy 3.5 board?
 
Maybe needing 8 microcontrollers and a special protocol bridge is a sign it's time to consider a powerful 32 bit Teensy 3.5 board?

Haha believe me that was my first thought.

I embed 3.2's and 3.6's in tons of my projects (if you're curious they're all at www.ksafin.com) -- pretty much every one of them.

But for this particular project I'm using a series of edge cards that need their own uC's on them and are standalone, and while I'd love to put a 3.2 on each of them, I don't have the board space or budget this go-around!
 
Status
Not open for further replies.
Back
Top