Daniel can you run tests on the other 3 PICs to see if using 1K's for both CLK and DATA works OK?
I finally run many tests with different combinations of pull-up resistors, sadly could not find one that worked with all my PICs. I used your last circuit version, with two 2n2907 transistors.
TL/DR: it is really difficult to do a simple circuit that can program any of my PICs reliably, the best circuit varies between PIC models.
Now, my measurements. You can see at the bottom of each screenshot 4 values:
- Cyan Max: maximum voltage in CLOCK line, this is the voltage of the "HI" state of clock.
- Cyan Min: minimum voltage in CLOCK line, this is the voltage of the "LOW" state of clock.
- Yellow Base: base voltage of the DATA line, this is the voltage of the LOW state of Atari (DATA as output)
- Yellow Min: minimum voltage of the DATA line, this is the voltage of the LOW state of PIC (DATA as input), only valid if there is actually data from the PIC.
This is a PIC16F690, with 2k2 resitors in DATA and CLOCK, works OK:
PIC16F690, without pull-up resistors, works OK, but signals are less clean than before:
PIC16F690, with 1k resistor in DATA, 2k2 resitor in CLOCK, does not work (bad reply from PIC):
PIC16F690, with 1k resitors in DATA and CLOCK, PIC does not acknowledges data:
PIC16F690, with 1k resitor in DATA, 4.7nF capacitor in CLOCK, PIC does not acknowledges data:
This is a PIC16F1936, with no resistors, does not work:
PIC16F1936, 2k2 resistors in DATA and CLOCK, works, but not reliable:
PIC16F1936, 1k resistors in DATA and CLOCK, works, but not reliable:
PIC16F1936, 1k resistors in DATA and CLOCK, plus red LED in DATA, works, but not reliable:
PIC16F1936, 2k2 resistor in DATA, 4.7nF capacitor in CLOCK, plus red LED in DATA, works OK, note that the data from the PIC is delayed because clock transitions happens later in the clock cycle (see the zoom-in):
As my program reads data from PIC after
the falling clock line, and the PIC also reads the data in the falling clock edge, the delay should not
affect the reading, but gives more time to the DATA signal to stabilize... perhaps this is the main difference.
After this, I tried adding a 2n2222 transistor at the output of CLOCK signal, as an emitter follower with a 1k resistor from emitter to ground and an 4.7nf capacitor in parallel, keeping the 2k2 resistor and LED in the DATA line. This worked in all my PICs:
As you see in this zoom-in, now the clock signal is symmetric, unlike the data line that shows the typical output from a NMOS transistor:
At last, I measured the transition voltages detected by the PIC16F1936 and PIC16F690 by measuring the clock voltage when the data line from the PIC transitioned, shown bellow:
The result is that the threshold voltage is 2.32V in my PIC16F1936 and 2.8V in the PIC16F690, this explains why the same resistors don't work in both PIC.
My recommendations: if you want a simple programmer adapted to your own Atari/PIC combination, simply test resistors from 1k to 4k7 until it works. If you want to design a reliable programmer that works in any Atari/PIC, you should use an 74HCT14 as buffer to the CLOCK line, to translate the "TTL-like" signals from the Atari to CMOS inputs in the PIC.
If you think of any other combination to test, say so