Hi,
I have some difficulty in understanding what you want to do, and what you are doing.
But when you say that you get "uuuuu" figures, it means that you are not using any real hardware.
You are using the software simulator which runs your code on you PC. No MCU is involved.
This simulator does not simulate everything on a PC. Eg you cannot run a Flash EPROM erase/program program and check that it works.
Please tell us what kind of MCU you are using, and then I can check if I have got the kind of program that you need!
Regards,
Ake