First of all, I'm sorry for my information which you already know.
Re. the sound routines I don't have any resource but follows may help you.
Those come from k@il support site.
I hope it useful for you
QUESTION
I was looking for information concerning writing to and reading from the 2K EEPROM space of the AT89LS8252. Does the Keil C language directly support this? Are any examples available?
ANSWER
1. To access AT89S9252's internal EEPROM you must drive a flag in a new special function register called WCON (this register controls both: EEPROM access and Watchdog timer).
2. If you'll only read the internal EEPROM (not write) and your system will NOT have external RAM, then you can access the EEPROM as if it were external RAM by:
a) Intitially configuring the EEMEN bit that is part of the WCON special function register and that switches the access to the internal EEPROM instead of external RAM through MOVX instruction.
b) Generating a BIN file with the data for your EEPROM (the ISP software created by ATMEL to program the AT89s and AT90s allows to write both: code memory and EEPROM memory).
c) Create a const variable (ie a pointer) that points to the address of the EEPROM to access:
Example: The following pointer can be used to read a string starting at address 0x010 of the internal EEPROM of AT89S8252 (note that the pointer is stored in the "data" memory space while it points to the "xdata" memory space and don't forget to set up the EEMEN bit):
I kind of get the idea how to do it, but in practice I have problems with eratic data writing. I will try running a simulation, as it may be a timing error.
It would be useful if anyonle else had done this, so I could compare and check my code for errors.