In-system programming daisychain?

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

Hi all,

I have four ATtiny2313 chips on one board sharing an eight-bit bus on their B ports. They also have their /RESET pins bussed together. The ISP signals are on the PortB pins.

How can I (without resorting to bus isolation chips or jumpers) add ISP headers to the board and program all four of them?

I'm trying to use the Atmel USB programmer, which uses MISO/MOSI and SCK, and AVR Studio 4.

Either four separate headers or one daisychain would be fine.

Incidentally, all four of them have exactly the same program in them, but I fear that the MISO drivers would fight with each other if I just connected the programmer up and went at it.

Can it be done?

Thanks,

Scroungre

PS - At the moment I program them in another board with only one installed, and then plug it into a socket on the target, but if I want to use surface-mounting that's impractical (yeah, there are SMT sockets, but they're $$$!) S.

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

Why do you have 4 AVR's with the same program on one board? Just curious.

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

I did that once when I needed several UARTs; four 2313 AVRs were connected to a PIC via software SPI. They were SOIC chips but it was a long time ago and I can't remember how I programmed them. I think I had a programming connector for each chip.

Leon Heller G1HSM

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

I think jtag has a daisy chain scheme I think I remember reading about. Pdf i found googleing first link http://www.google.com/search?q=j...

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

JTAG can be daisy chained but 2313's are dW not JTAG. I wonder if you connected the output of the programmer to all devices but only had the return signal from one of them connected back whether that would work? So that one chip speaks for all. (mad idea #3 today!)

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

Hi All.

Quote:
I wonder if you connected the output of the programmer to all devices but only had the return signal from one of them connected back whether that would work? So that one chip speaks for all. (mad idea #3 today!)

Yes, clawson, that's tempting - And it might work - but I'd still have to cut the return signals from the other three while programming. They're on the bus too, you see. That would involve only one jumper; Not bad.

Another idea was fiddling with the 'slave select' line. They've all got one - On the bloody B port again!

Quote:
I think jtag has a daisy chain scheme I think I remember reading about.

No, the 2313s don't do JTAG, and I'm not trying to program them with JTAG anyhow.

I did some forum searching, and found someone who had with JTAG successfully daisychained an AVR and a Xilinx CPLD. That raised my eyebrows! I've chained CPLDs before, but never thought to mix in an AVR. Wow.

And why? Parallel processing. Each 2313 has external interrupts they're supposed to detect, process, and store; fast. Then they're occasionally polled for 'how many and what?'. One chip could do it all, but not nearly fast enough (I'm running the entire board at 16MHz (mostly for the USB processor (yes, the board has five AVRs on it, but the USB communications processor has lots and lots of pins, so incorporating an ISP header for that one was trivial)).

Thanks for the responses,

Scroungre

PS - It's one tiny2313 per acquisition channel, plus one ATmega32U2 for master control and communication. But I just got a wild hair and laid out a six-channel board with seven (!) AVRs on it... S.

PPS - I might make a 'project' out of it, having fun with interprocessor communications... S.