I am trying to program an AT89C51 through 12 volt parallel programming using Arduino, I have followed the instructions according to the data sheet. The program I'm trying to load is simply displaying the value of 10011011b on Port 1.
:0400000074ABF59058.
:00000001FF.
which would load the following into the program flash memory:
000 -- 74H
001 -- ABH
010 -- F5H
011 -- 90H
The following Figure shows the circuit I built.
The algorithm I used is the following:
- Set the configuration bits:
- P2.6 -- Low
- P2.7 -- High
- P3.6 -- High
- P3.7 -- High
- ALE/PROG -- High
- EA/Vpp -- High
- Wait 48t_CLCL Min
- EA/Vpp --12V
- Delay 10 micro seconds
- Set the value of the addresses
- Wait 20 micro seconds
- Place the data value
- Wait 100 micro seconds
- ALE/PROG -- Low
- 60 micro second delay
- ALE/PROG -- High
- 20 micro second delay
- Data in Low
- 20 micro second delay
- Low Addresses
- EA/Vpp -- High
After this process, a negative pulse is expected through port P3.4 (RDY/BSY), but I do not get the pulse. I do not have an oscilloscope and it is not possible to appreciate the pulse, so I have connected P3.4 to a 7490, the states at the output of the chip do not vary, which indicates that the negative pulse is not generated by P3.4. Additionally, I am not executing the verification, I simply hope to obtain the value of 10011011b for P1, but I don't get what I expect. I request in the most restrained way your kind help trying to help me find the flaw in my illogic.-
According to the schematic, you have incorrectly connected data and low addresses. P0 is for data read/write and P1 is for address input. Your diagram shows that the data is connected to P1 and the address is connected to P0. Also, the diagram shows that you have the upper 4 bits of P0 connected directly to ground. This is very unfortunate because it means that if P0 is set to output then the output drivers are shorted.
I also recommend buying some cheap logic analyzer (eg sigrok). Because in the event of a malfunction, we need a recording of the entire event and not only its verbal description.