Rerouting SPI for programming different AVR chips - Page 1
Forum section: electronics / beginners

author: xcvii
author_rank: Newbie
timestamp: October 11, 2017, 08:45:26 pm
content: 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 (:

author: alank2
author_rank: Super Contributor
timestamp: October 11, 2017, 08:59:32 pm
content: 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...

author: rstofer
author_rank: Super Contributor
timestamp: October 11, 2017, 11:32:26 pm
content: 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.

author: ebclr
author_rank: Super Contributor
timestamp: October 11, 2017, 11:40:32 pm
content: KISS

author: alank2
author_rank: Super Contributor
timestamp: October 12, 2017, 12:40:48 am
content: 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...

author: ebclr
author_rank: Super Contributor
timestamp: October 12, 2017, 12:48:04 am
content: Multiplexer

author: alank2
author_rank: Super Contributor
timestamp: October 12, 2017, 12:52:22 am
content: 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?

author: ebclr
author_rank: Super Contributor
timestamp: October 12, 2017, 12:56:10 am
content: Both one is bidirectional and supports analog signal, other is omnidirectional and is digital onlyMC4051 is on very knowed analog switch

author: TK
author_rank: Super Contributor
timestamp: October 12, 2017, 01:22:41 am
content: 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.

author: xcvii
author_rank: Newbie
timestamp: October 12, 2017, 09:16:42 am
content: 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.

author: TK
author_rank: Super Contributor
timestamp: October 12, 2017, 10:35:40 am
content: 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.