Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 2:bf02c4f42b15, committed 2014-05-09
- Comitter:
- king33jp
- Date:
- Fri May 09 04:35:09 2014 +0000
- Parent:
- 1:c846ecbfe067
- Commit message:
- hoge
Changed in this revision
| EEPROM_AT93C46.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/EEPROM_AT93C46.h Fri May 09 02:42:11 2014 +0000
+++ b/EEPROM_AT93C46.h Fri May 09 04:35:09 2014 +0000
@@ -1,10 +1,11 @@
-/**
+/** AT93C46
* AT93C46A x16 mode(7pin OC mean NC ,maybe)
* AT93C46E x16 mode(7pin NC)
* AT93C46D x16 mode(7pin ORG,H=x16,L=x8)
* Cap=1Kbits 64words @ x16
* SB(start bit)=1bit OP-code=2bits Addr=6bits(64word)
* controll use gpib port(Outoutx3,Inputx1)
+ *
*/
#ifndef MBED_EEPROM_AT93C46_H
#define MBED_EEPROM_AT93C46_H
@@ -21,6 +22,29 @@
#define EE_EWDS 0x00 // 00 00XXXX(X is DONT CARE)
#define EE_ERASE 0xC0 // 11 xxxxxx(A5-A0)
+/** EEPROM controll class
+ *
+ * Example:
+ * @code
+ * // AT93C46 GPIO use
+
+ #include "mbed.h"
+ #include "EEPROM_AT93C46.h"
+
+ EEPROM_AT93C46 eeprom(PTE20,PTE21,PTE22,PTE23);
+
+ int main() {
+
+ eeprom.write_enable();
+ eeprom.erase(0);
+ eeprom.write(0,0xABCD);
+ eeprom.write_disable();
+ for(char jj=0;jj<64++){
+ printf("%04X(%d,",eeprom.read(jj),jj);
+ }
+ }
+ * @endcode
+ */
class EEPROM_AT93C46 {
public: