Hi, i've a proble with 908JL16: i've tried to use EE_write and EE_read for emulate eeprom by flash but it cause a reset. i'm using 10MHz xtal, and i've put 10 in BUS_SPD; anyone can help me? maybe i should disable COP?
These changes should eliminate the warning messages, and permit debug to occur. However there are some additional issues associated with the use of the ROM routines -
I have attached the corrected main.asm file, but does not include the initialisation of DATAARRAY.
Regards,
Mac
LDHX #$55AA ; Word value to be written
STHX DATAARRAY
LDHX FILE_PTR
JSR EE_WRITE
Since you cannot use simulation to test the operation of the ROM routines, the tests will need to be done using the actual MCU hardware. The only way to determine the success or failure of the write process is to read back the data and test its validity. Since you have used the EE_WRITE routine, you must read the data using the EE_READ routine.
Since the operation of EE_READ will load the read data back into DATAARRAY, it may be advisable to zero DATAARRAY before calling the routine, so you can see that the code is really working.
JSR INITIALISATION
LDHX #0 ; Clear DATAARRAY
STHX DATAARRAY
LDHX FILE_PTR
JSR EE_READ
Regards,
Mac