So, from what I understand?, you've designed your own programmer?, and written your own software to control it? - and it doesn't work?.
Your problems here are many fold, you've no idea where the problem might lie!, it could be either your hardware, either a constructional error, or simply a design flaw?. Likewise it could be a programming error in your software (a bug), or a flaw in the original software design?.
As in any diagnosis, you need to isolate where the problem might lie, but in your case this is going to be EXTREMELY difficult, you have many possibilities, and no way to isolate where it might be!.
Assuming the circuit is the one you posted previously?, I thought it looked completely strange? - like no programmer I have ever seen!. I'm not familiar with the micro-controller you're using, so perhaps that's what's needed?, did you get the basic design from a datasheet?.
What you really need to do is use either proven working software on your programmer, or a proven working programmer with your software - in that way you can isolate the problem.