2
\$\begingroup\$

Hey so I'm trying to create a circuit on perf board that allows me to program three different types of chips using an Arduino Duemilanove as ISP. Those chips are the ATtiny85, ATtiny84, and ATMega328.

I want to use one 28-pin ZIF socket for all 3 chips, and not have to remember a specific placement for the chip, so I just want each chip to sit at the very top of the ZIF socket for the 8-pin 85 and 14-pin 84.

So I've mapped out all the connections that will need to go into the ZIF socket, and now have come across a switching problem.

Essentially there will be 3 states, one for each type of chip, and there are 6 signals that need to be switched (5V, GND, RST, MOSI, MISO, and SCK).

I've mapped out which pins each signal will need to go to, but now I need an analog switch IC or analog multiplexer to make this happen.

For example, MOSI looks like this:

State 1: MOSI -> 25 State 2: MOSI -> 7 State 3: MOSI -> 17

Since I have 6 signals, and 3 states, ideally a 6 channel 1:3 Demux would be perfect, but I think it's pretty certain those don't exist. It seems like the most practical I can find so far is a dual channel 1:4 demux, so I would need to use 3 of those.

Essentially what I'm here for is 1) Does anybody know of a better way to do this, or 2) Does anybody know of any IC's that can solve this?

\$\endgroup\$
16
  • 2
    \$\begingroup\$ Why not just connect all potential pins, and Hi-Z the ones you don't need to use? \$\endgroup\$ Nov 2, 2013 at 15:12
  • \$\begingroup\$ @IgnacioVazquez-Abrams Do you mean Hi-Z the pins on the chip being programmed? I thought that required programming the chip...I'm a little confused by how that would work. And some of the pins overlap, for instance pin 7 goes to MOSI with the 84, and 5V with the 328 \$\endgroup\$
    – krb686
    Nov 2, 2013 at 15:18
  • \$\begingroup\$ Hi-Z the pins on the device doing the programming, so that they don't affect the device being programmed. Overlap between signal and power can be handled by using a transistor with a pullup/pulldown. \$\endgroup\$ Nov 2, 2013 at 15:20
  • \$\begingroup\$ Related reading. \$\endgroup\$ Nov 2, 2013 at 15:20
  • 1
    \$\begingroup\$ Which is why you read the related reading that I linked. \$\endgroup\$ Nov 2, 2013 at 15:31

2 Answers 2

3
\$\begingroup\$

As I currently don't have enough rep to make a comment, I will attempt a complete answer.

First, you most likely do not need an analog demux, a digital would be good enough, since all the stuff is running off 5V.

Second, you could, if you wanted, look for a device such as a CPLD. This is a software programmable logic gate array, that has non-volatile memory. Not as complex as an FPGA in general though. This would make your device capable of programming a different device, just using a software upgrade. Simply wire it up to many pins in the socket. (Please don't stone me for revealing this option)

Third, a 74138 device would probably satisfy your needs.

\$\endgroup\$
2
  • \$\begingroup\$ If your device is large enough (e.g. Arduino Mega) then just hook up all the pins on the socket and you can control everything with the host MCU. \$\endgroup\$ Nov 2, 2013 at 20:02
  • \$\begingroup\$ Hey this sounds like a fantastic idea. I'm looking into the ATF750 family right now \$\endgroup\$
    – krb686
    Nov 3, 2013 at 17:21
1
\$\begingroup\$

I am proposing a solution but this has to be discussed regarding the possible issues and need to be redesigned or modified.Datasheet of IC CD4066(CMOS Quad analog switch) encourages us to use it as a digital switch(here before i have used CD4066 to design a digital volume control)enter image description here enter image description here

But this switch cannot be used to apply power to the micro controllers

\$\endgroup\$
3
  • \$\begingroup\$ if you have any possible issues just comment here.we would discuss about it \$\endgroup\$
    – yogece
    Nov 2, 2013 at 17:22
  • \$\begingroup\$ okay so I've actually seen this IC before. it looks like I could cascade 2 to get the triple throw that I need, so it's effectively a dual - SP3T. So it cannot switch Vcc or GND? That means I would have to use 2 for the signals and another solution for the Vcc and GND. \$\endgroup\$
    – krb686
    Nov 2, 2013 at 18:43
  • \$\begingroup\$ @krb686 you can use transistor/MOSFET/reed relay to give Vcc and GND \$\endgroup\$
    – yogece
    Nov 2, 2013 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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