Jump to content



0

Eeprom support added to cc65 for 93C46, 93C66 and 93C86 chips


3 replies to this topic

#1 karri OFFLINE  

karri

    Stargunner

  • 1,049 posts
  • Location:Espoo, Finland

Posted Mon Apr 25, 2011 11:14 PM

I spent some time to integrate Sage's EEPROM drivers into the daily snapshot of cc65.

You should now be able to use any of these chips in your code.

93c46 - a 128 byte eeprom
93c66 - a 512 byte eeprom
93c86 - a 2048 byte eeprom

In order to make the use a bit easier for programmers I suggest to add this to the config file:

SYMBOLS {
    _lynx_eeread: type = export, value = _lynx_eeread_93c86;
    _lynx_eewrite: type = export, value = _lynx_eewrite_93c86;
}

In the file lynx.h I have already declared the routines like:
unsigned _fastcall_ lynx_eeread(unsigned addr);
void _fastcall_ lynx_eewrite(unsigned addr, unsigned val);

You can also use the right routine directly like:

lynx_eewrite_93c86(1023, 0xffff);

But if you add the symbol in the config file you can write:

lynx_eewrite(1023, 0xffff);

and then just link in the right driver by changing the data in the config file.

The old eeprom used to be similar to the 93c46. That is a 128 byte eeprom. But in the old days you also needed a separate erase-command to set the 0-bits back to 1-bits. This is now history. But for old eeprom designs there is still the old eeprom driver also. It has commands like lynx_eeprom_read, lynx_eeprom_write, lynx_eeprom_erase.

--
Regards,

Karri

#2 sage OFFLINE  

sage

    Moonsweeper

  • 391 posts
  • Location:Germany

Posted Tue Apr 26, 2011 1:58 AM

Actually, as teh command are the same for 56 and 66 and 76 and 86 you should also be able to access these.

93c46 - a 128 byte eeprom

93c66 - a 512 byte eeprom (and 93c56 - a 256 byte eeprom)

93c86 - a 2048 byte eeprom (and 93c76 - a 1024 byte eeprom)

#3 Ninjabba OFFLINE  

Ninjabba

    Moonsweeper

  • 424 posts
  • Location:Lurking in the Darkness

Posted Tue Apr 26, 2011 2:30 AM

Great news! Can't wait for the weekend to spend some time on this.. I hope the latest snapshot is compatible with the 1.1 template I'm using.

#4 Lynxman OFFLINE  

Lynxman

    Moonsweeper

  • 293 posts
  • Location:Germany Stuttgart

Posted Sun May 29, 2011 9:39 AM

Please read the datasheet for 93C56 and 93C76 before using.

There are 2 different adress methodes for this chips.

93C56 is in most case same addressing as 93C66. But i know there is a 93C56 with different adressing.
Same maybe for 93C76.

In case you use this chips read the datasheet before using.

Or feel free to contact me.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users