# Do some microcontrollers require data to be loaded in temporary memory before programming?

When I programmed the AT89Cx051 series of microcontrollers, I didn't have to use special memory to program the data, but now even though I'm following the instructions in the datasheet (found from http://futurlec.com/Atmel/AT89LP4052-20PU.shtml) to the best of my ability, I still can't get the damn chip to run even when running it with a 555 timer at low speed as a clock.

But the new chip manual states theres a "load code page buffer" function and a "write code page" function. After (attempting to) erase the chip using the proper commands, I went straight to the "write code page" function and inserted the binary of the following code:

mov P1,#0A5h
sjmp \$


When the chip runs correctly, the outputs of alternating port pins from P1 (starting with the lowest) should be logic high and the rest should be logic low, yet all I get is everything as logic high.

This is how I attempted to program 6 bytes in detail after erasure:

Make VPP 12V
set CS to low
Set P1 to AAh
Set XTAL to high then to low
Set P1 to 50h
Set XTAL to high then to low
Set P1 to 0h because high address is 0.
Set XTAL to high then to low
Set P1 to 0h because low address is 0. we start from byte 1.
Set XTAL to high then to low
Set P1 to 75h (the MOV instruction)
Set XTAL to high then to low
Set P1 to 90h (the P1 address)
Set XTAL to high then to low
Set P1 to 0A5h (the value)
Set XTAL to high then to low
Set P1 to 080h (for sjmp)
Set XTAL to high then to low
Set P1 to 0FEh (to stall)
Set XTAL to high then to low
Set P1 to 0h (padding)
set CS to high
wait for busy to reset


I think I'm doing everything right? but is it mandatory to execute the load code page buffer before writing the buffer? I'm confused.

The microcontroller in question here that I have difficulty with is AT89LP4052