at89c2051 programmer schematic
The voltage applied on RST pin at power up must be greater than 0,7Vcc, that is greater than 3,5v
You should get 4,2 - 4,3v (like with +12v, that drops to 11,3v). 11,3v on RST pin during programming will violate the specs but it still works for me.
Download the parallel port tester from here:
http://www.xmediastudio.com/Download/PortTester.zip
and check the hardware as follows. At least you will know that your problems are due to the software and not from hardware.
It's really madness and a lot of peoples could claims it would be better to switch to another micro upload through ISP with the same program (I call AT89S52).
Well, it will not fit on the keyboard logger wires due to his size (DIP 40 or PLCC 44).
Nevertheless, if you can convert the assembler code from 8051 to your favorite AVR, then all the things bellow are useless.
All pins are from DB25 plug.
1. Push C0 Pin 1 turn yellow
2. Push C1 Pin 14 turn yellow
3. Thus the RST pin voltage drops to 0v (insert now the micro in socket and aply the power supply)
4. Push D7 Pin 9 turn green
5. Thus data in the storage register of 4094 appears at the outputs.
6. Push D6 Pin 8 turn green (D6 is pushed in the first shift register)
7. Push D6 Pin 8 turn off
8. Repeat steps 6-7 five times more, for the next five '0' load into shift register
9. Push D5 Pin 7 turn green (set data '1')
10. Push D6 Pin 8 turn green (clock in) (P3.2 pin must be kept at high level)
11. Push D6 Pin 8 turn off
12. Push D5 Pin 7 turn off (set data '0') (the XTAL1 is at low level in order to reset the address counter of 89C2051)
13. Push D6 Pin 8 turn green (clock in)
14. Push D6 Pin 8 turn off
15. Push D4 Pin 6 turn green (set strobe, that is data in each shift register is transffered to the storage register
16. Push D4 Pin 6 turn off
17. Push C1 Pin 14 turn off (pin RST goes to +5v)
Now you must be able to see the low nibble of the first signature byte 1110
It will appear on the status register as follows:
S4 blue lit pin 13
S5 blue lit pin 12
S7 off pin 11 (pin 11 is hardware inverted, that's why appears off, even if is '1')
S6 off pin 10
18. Push C2 Pin 16 turn yellow (on the status register appears the high nibble of the first signature byte 0001
S4 off pin 13
S5 off pin 12
S7 blue lit pin 11 (pin 11 is hardware inverted, that's why appears lit, even if is '0')
S6 blue lit pin 10
19. Push C2 Pin 16 turn off
20. Push D6 Pin 8 turn green (D6 is pushed in the first shift register)
21. Push D6 Pin 8 turn off
22. Repeat steps 20-21 five times more, for the next five '0' load into shift register
23. Push D5 Pin 7 turn green (set data '1')
24. Push D6 Pin 8 turn green (clock in) (P3.2 pin must be kept at high level)
25. Push D6 Pin 8 turn off
26. Push D6 Pin 8 turn green (clock in) (the XTAL1 pin will raise to +5v after strobe)
27. Push D6 Pin 8 turn off
28. Push D5 Pin 7 turn off (reset data)
29. Push D4 Pin 6 turn green (set strobe, that is data in each shift register is transffered to the storage register
30. Push D4 Pin 6 turn off
31. Push D6 Pin 8 turn green (D6 is pushed in the first shift register)
32. Push D6 Pin 8 turn off
33. Repeat steps 31-32 five times more, for the next five '0' load into shift register
34. Push D5 Pin 7 turn green (set data '1')
35. Push D6 Pin 8 turn green (clock in) (P3.2 pin must be kept at high level)
36. Push D6 Pin 8 turn off
37. Push D5 Pin 7 turn off (set data '0') (the XTAL1 is at low level)
38. Push D6 Pin 8 turn green (clock in)
39. Push D6 Pin 8 turn off
40. Push D4 Pin 6 turn green (set strobe, that is data in each shift register is transffered to the storage register
41. Push D4 Pin 6 turn off
Now you must be able to see the low nibble of the second signature byte 0001
It will appear on the status register as follows:
S4 off pin 13
S5 off pin 12
S7 blue lit pin 11 (pin 11 is hardware inverted, that's why appears lit, even if is '0')
S6 blue lit pin 10
18. Push C2 Pin 16 turn yellow (on the status register appears the high nibble of the first signature byte 0010
S4 off pin 13
S5 off pin 12
S7 off pin 11 (pin 11 is hardware inverted, that's why appears off, even if is '1')
S6 off pin 10