Author Topic: Rerouting SPI for programming different AVR chips  (Read 1849 times)

0 Members and 1 Guest are viewing this topic.

Offline xcviiTopic starter

  • Newbie
  • Posts: 8
Rerouting SPI for programming different AVR chips
« on: October 11, 2017, 08:45:26 pm »
First post! Hi everyone (:

I've got this idea that I build an USBasp (http://www.fischl.de/usbasp/) with a 28 pin ZIF socket that can accept multiple chips. The main problem obviously is that the SPI and the GND/Vcc pins fall in a different positions for each, so I would have to be able to redirect those lines.

I wonder if something like this would work: https://imgur.com/a/FSfXj. This is part of the circuit that takes care of GND and MOSI for the ATtinyX4 (A) and the ATtinyX5 (C). I reckon if I'm clever with the positioning (ie if not every chip goes to the bottom of the ZIF, I can get some convenient overlaps), I can support those two chips along with the ATmegaX8 with 4-5 trannies altogether.

Is this completely misguided?

I was also suggested to look into the 4066, which I have, but not sure if it's better for this use case.

What do you think?

Easy on me, I'm a novice (:
 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 2196
Re: Rerouting SPI for programming different AVR chips
« Reply #1 on: October 11, 2017, 08:59:32 pm »
The typical approach is to use multiple sockets, each one compatible with the uc you are using.  The STK500 (really old) did this:



Don't they also make some sort of electronic relay that can connect various signals to various paths?  Maybe I'm calling it the wrong thing...
« Last Edit: October 11, 2017, 09:01:32 pm by alank2 »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9940
  • Country: us
Re: Rerouting SPI for programming different AVR chips
« Reply #2 on: October 11, 2017, 11:32:26 pm »
For occasional use, I might try to use a breadboard.  Or, I might make a PCB 'like a breadboard' where I could manually jumper the signals.

I have one of the STK500s - haven't used it in years.
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2331
  • Country: 00
Re: Rerouting SPI for programming different AVR chips
« Reply #3 on: October 11, 2017, 11:40:32 pm »
KISS

 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 2196
Re: Rerouting SPI for programming different AVR chips
« Reply #4 on: October 12, 2017, 12:40:48 am »
I don't think electronic relay is right - does anyone know the right name for a class of components that allows you to specify which pin is connected to which pin and then it connects them up?  I saw someone else using one on another programmer mentioned around here...
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2331
  • Country: 00
Re: Rerouting SPI for programming different AVR chips
« Reply #5 on: October 12, 2017, 12:48:04 am »
Multiplexer



 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 2196
Re: Rerouting SPI for programming different AVR chips
« Reply #6 on: October 12, 2017, 12:52:22 am »
Or Analog Switch?

Is there such a thing as multiple pins and then you communicate to tell it which pins you want connected to which other pins?  Not sure how you would communicate that, SPI maybe?
« Last Edit: October 12, 2017, 12:55:43 am by alank2 »
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2331
  • Country: 00
Re: Rerouting SPI for programming different AVR chips
« Reply #7 on: October 12, 2017, 12:56:10 am »
Both one is bidirectional and supports analog signal, other is omnidirectional and is digital only

MC4051 is on very knowed analog switch
 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: Rerouting SPI for programming different AVR chips
« Reply #8 on: October 12, 2017, 01:22:41 am »
The STK500 has been used for programming but mainly as a complete development board with LEDs and switches.  But for normal AVR development, programmers with the 2x3 SPI connector works better because you need to do a lot of reprogramming on the same AVR device during the development phase and it is easier to add the SPI connector on board than removing the AVR from the socket to move it to the programmer and back to the development board, and most AVR devices now are SMD and soldered to the target board.
 

Offline xcviiTopic starter

  • Newbie
  • Posts: 8
Re: Rerouting SPI for programming different AVR chips
« Reply #9 on: October 12, 2017, 09:16:42 am »
Thanks for the answers!

I kind of do insist on the ZIF socket. I've got an AVR Dragon that I can use when I'm home, but I want to build a small programmer/development kit that fits into a nice little wooden box that I have and which I can take with me when I travel, and I think the ZIF is just perfect for this.

It sounds like the analogue switches might be the way to go after all.
 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: Rerouting SPI for programming different AVR chips
« Reply #10 on: October 12, 2017, 10:35:40 am »
I soldered a ZIF socket on my DRAGON (the one with 40 pins, wide pin openings to fit both WIDE and NARROW packages) and male headers on the sides and just move 6 wires from the ISP pin header to the male headers to program different AVR chips.  This configuration also allows me to do HIGH VOLTAGE PROGRAMMING to revive bricked chips.


« Last Edit: October 12, 2017, 12:10:42 pm by TK »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf