Hello,
I want to create a circuit to go in-between my AVR ISP mkII and whatever AVR-containing circuit I want to program such that the programmer is isolated from the circuit and the MCU. I've created the attached schematic, but I'm unsure how to finish it (or if what I've got so far is correct). These are my thoughts:
These pins are for data going in the direction Programmer -> MCU
RST (pin 5)
MOSI (pin 4)
SCK (pin 3)
EDIT: Correct pin#s
MISO (pin 1) is for data going MCU -> Programmer
GND and VTG are for reference and don't actually need to be coupled.
I assumed this was going to be pretty basic - if the signal on the input side of the isolator is at +5V relative to the input side ground, the output should be 5V above the output side ground. If the input signal is at 0V, the output side should follow. The schematic shows four pull-down resistors so the output from the optoisolators is at 0V, unless the optoisolator output is high, then it pulls the signal high. The collector is always at VCC (or VTG, +5V).
I'm getting stuck on what to do with the negative side of the LEDs (circles in red). My first guess was just to ground them, and my second guess was that they needed to be grounded through a resistor (not sure why I thought that would help), but some quick tests on a breadboard showed that I was unable to get the output side to react as I intended, regardless of my connection to that pin. So... am I completely missing the boat on this one, or am I close?
Note: I'm actually using 4N27 isolators, not 4N25's - it's the same datasheet, so I believe the functionality is the same. The CAD software I'm using has a 4N25 but no 4N27, so that's what I show in the schematic.
Thanks for the help!
-Kerry