Hello,
This email message is a notification to let you know that
a file has been uploaded to the Files area of the 68HC12
group.
File : /EEPROM_HCS12/ee.asm
Uploaded by : imajeff84663
Description : simple Asm writes EEPROM
You can access this file at the URL:
http://groups.yahoo.com/group/68HC12/files/EEPROM_HCS12/ee.asm
To learn more about file sharing for your group, please visit:
http://help.yahoo.com/help/us/groups/files
Regards,
imajeff84663

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
--- In 6...@yahoogroups.com, 6...@yahoogroups.com wrote:
> File : /EEPROM_HCS12/ee.asm
> Uploaded by : imajeff84663
> Description : simple Asm writes EEPROM
>
> You can access this file at the URL:
> http://groups.yahoo.com/group/68HC12/files/EEPROM_HCS12/ee.asm
I've fixed some things.
Big mistake was I had changed the relocation (INITEE), and
accidentally was disabling EEPROM.
It demonstrates easy subroutines to erase a sector, execute command,
and check/clear ESTAT errors.
For a quick view, see
http://groups.yahoo.com/group/68HC12/files/EEPROM_HCS12/ee.lst.txt

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )I've come up with a question in the new Flash/EE on S12. My example
code proved that I can program more bits in EEPROM Flash that has
already been programmed. I have successfully tested this in DP256B
(1K79X) and DG128B (0L85D).
I am confused because documentation has always said that we must erase
the word before writing. I even remember one part explaining that in
older parts we used to "write more bits", but now it is not allowed.
Is this only a requirement in Flash and not "EEPROM" Flash?
For example:
bit is '1' when erased
bit is '0' when written (programmed)
If $D00 is $FF, then writing $11 works as expected
If $D00 is $FE, then
- writing $EE works by also writing bit 4
- writing $EF writes bit 4 and leaves others because it cannot erase
bit 0
- writing $FF changes nothing
I thought that at least when it attempted a write with bits '1' that
were already '0', i.e. the result will be not what was requested, it
was supposed to give an error.

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )