The simulator cant access the initial values I've inserted in the eeprom
In order to put the initial values I used the DB directive as bellow
cseg at 2001h
Senha1_1 :dB 1 ,2 ,3 ,4
Senha2_5 :DB 0bh,0bh,0bh,0bh
I put in the addres 2001h because I'm aware that my programmer put in the beginning of the eeprom the values that is in an adress higher than the max adress of the flash of the device that it is programming ( In my case the 89s8252)
to read the values I used:
orl WMCON, #EEMEN ; enable EEPROM
movx a, @dptr ; read EEPROM
xrl WMCON, #EEMEN ; disable EEPROM
seems me that that simulator doesnt know that the values I put in the eddress 2001h will be written in the adress 1h of the eeprom.
What can I do to put initial values in the eeprom and the compiler/ simulator to know where it is?
In this link everithing is beeing done in c, what would be the diference in assembler?
no difference, as it is said there:
- The EEPROM space of the various devices is simulated in uVision2 using the V: memory type prefix. This memory space can be manipulated using standard uVision2 debugging commands.
So you need to create separate hex-file with the contents of eeprom in it, then load/save/manipulate it via debugging commands. Such file may be created with another project and I do not see any problems to do so.
How can I prepare the content I have to save , with the command
"SAVE EEPROM.HEX V:0, V:0x7FF "
that is stated there?
Ok, seems me that this command saves something inside a certain place with the adress 0 until 0x7FF, but what is been saved? where can I state the values I want to be saved inside this place?
please give me some detail , I have no Idea on how to begin.
You may modify the contents of any memory area using the Memory Window. Simply open the Memory Window and enter V:0 in the Address input line. Right-click on the byte you want to modify and select Modify Memory from the context menu.
View all questions in Keil forum