I'm trying to make a serial + parallel port programmer. The parallel port is just the schematic taken from here:
The serial port addon just connects the reset, sck, miso and mosi lines through a couple max232's (the 2nd one is for the 3rd receive line). The reason I wanted to make it this way is because I already had those parts kickin around and by making a serial bitbang one instead of the serial ones that require additional firmware (like the asp910) I'm not limited to the chips that they support as long as avrdude supports them. (Note that both the serial and parallel connections are present at the same time on my programmer)
From the diagram on that page, I also connected
DB9-pin3 -> MAX232(1)-pin13(R1In)
DB9-pin4 -> MAX232(2)-pin13(R1In)
DB9-pin5 -> GND
DB9-pin7 -> MAX232(2)-pin8(R2In)
DB9-pin8 -> MAX232(2)-pin11(T1In)
Reset -> MAX232(1)-pin12(R1Out)
SCK -> MAX232(2)-pin9(R2Out)
MOSI -> MAX232(2)-pin12(R1Out)
MISO -> MAX232(2)-pin14(T1Out)
So basically it's
- DB9(3)->Level Shifter->Reset
- DB9(4)->Level Shifter->MOSI
- DB9(7)->Level Shifter->SCK
- MISO->Level Shifter->DB9(8)
Those are the spects that are given in avrdude's configuration for the ponyser serial bit-bang programmer.
The problem is that the serial connection doesn't seem to work. The parallel one works fine on my desktop. However, the parallel port on my laptop is busted so I want the serial support as well.
I put the programmer on a scope and the SCK signal seems nice and clean at ~20kHz. The MOSI also seems clean and is adjusted properly relative to the clock. The reset also is driven low during the programming period. However, the MISO line looks like it isn't being driven properly. The scope traces from it look like it just gets bumped around a little on each SCK pulse (ie. oscillates with SCK to <1V) and isn't driven to the proper voltage by the avr.
Another thing I noticed is that the programmer seems to invert the signals on MOSI. The programming command is 0xAC530000 and on the line I see 01010011101011001111111111111111 or 0x53ACFFFF which is the inverse of the command in the spec. Is the pin supposed to be driven high or low to signify a 1? I assume high and this is somehow inverted, but I've tried switching the avrdude.conf to show ~4 to invert MOSI and still have no success.
Can anyone see any other problems with setting up the programmer this way or doesn't anyone know of another serial-bb programmer using level shifters instead of transistors that's known to work with avrdude?