hey, i made those changes. it's still is not working. probing with the oscilloscope shows a very ugly and noisily picture. the cap never gets charged to more than 1 volt in either direction. i ve got a rigol 1102e 1 GSa/s scope if that makes any difference. maybe the pins aren't switching between OUTPUT, INPUT and or states fast enough. maybe writing the port registers directly would help.
thanks, red