mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.8.1 FRAM_I2C
This commit is contained in:
parent
109407ab7e
commit
f5bd30eeef
@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|||||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
|
||||||
|
## [0.8.1] - 2024-07-19
|
||||||
|
- Fix #56, performance sketch
|
||||||
|
- minor edits
|
||||||
|
|
||||||
## [0.8.0] - 2024-01-15
|
## [0.8.0] - 2024-01-15
|
||||||
- Fix #51 - bug in FRAM32::_readBlock()
|
- Fix #51 - bug in FRAM32::_readBlock()
|
||||||
- improve fram32 example to test both low and high addresses
|
- improve fram32 example to test both low and high addresses
|
||||||
@ -18,7 +22,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- update readme.md
|
- update readme.md
|
||||||
- minor edits examples
|
- minor edits examples
|
||||||
|
|
||||||
|
|
||||||
## [0.7.0] - 2023-10-30
|
## [0.7.0] - 2023-10-30
|
||||||
- refactor / simplify begin() =>
|
- refactor / simplify begin() =>
|
||||||
- User has to call Wire.begin() explicitly.
|
- User has to call Wire.begin() explicitly.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// FILE: FRAM.cpp
|
// FILE: FRAM.cpp
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// VERSION: 0.8.0
|
// VERSION: 0.8.1
|
||||||
// DATE: 2018-01-24
|
// DATE: 2018-01-24
|
||||||
// PURPOSE: Arduino library for I2C FRAM
|
// PURPOSE: Arduino library for I2C FRAM
|
||||||
// URL: https://github.com/RobTillaart/FRAM_I2C
|
// URL: https://github.com/RobTillaart/FRAM_I2C
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// FILE: FRAM.h
|
// FILE: FRAM.h
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// VERSION: 0.8.0
|
// VERSION: 0.8.1
|
||||||
// DATE: 2018-01-24
|
// DATE: 2018-01-24
|
||||||
// PURPOSE: Arduino library for I2C FRAM
|
// PURPOSE: Arduino library for I2C FRAM
|
||||||
// URL: https://github.com/RobTillaart/FRAM_I2C
|
// URL: https://github.com/RobTillaart/FRAM_I2C
|
||||||
@ -12,7 +12,7 @@
|
|||||||
#include "Wire.h"
|
#include "Wire.h"
|
||||||
|
|
||||||
|
|
||||||
#define FRAM_LIB_VERSION (F("0.8.0"))
|
#define FRAM_LIB_VERSION (F("0.8.1"))
|
||||||
|
|
||||||
|
|
||||||
#define FRAM_OK 0
|
#define FRAM_OK 0
|
||||||
|
@ -39,7 +39,7 @@ supports 10^5 write cycles (https://docs.arduino.cc/learn/built-in-libraries/eep
|
|||||||
That is a factor of 10 million more write cycles.
|
That is a factor of 10 million more write cycles.
|
||||||
|
|
||||||
|
|
||||||
#### Fujitsu
|
### Fujitsu
|
||||||
|
|
||||||
Types of FRAM tested with this library:
|
Types of FRAM tested with this library:
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ one calls **setSizeBytes(16 \* 1024)** or **setSizeBytes(8 \* 1024)** to set the
|
|||||||
For the FRAM9 and FRAM11 the size problem is solved (hard coded) in their class.
|
For the FRAM9 and FRAM11 the size problem is solved (hard coded) in their class.
|
||||||
|
|
||||||
|
|
||||||
#### Ramtron / Cypress / Infineon
|
### Ramtron / Cypress / Infineon
|
||||||
|
|
||||||
Types of FRAM tested with this library:
|
Types of FRAM tested with this library:
|
||||||
|
|
||||||
@ -71,7 +71,20 @@ Types of FRAM tested with this library:
|
|||||||
| FM24V10 | 128 KB | Y | | FRAM32 | #49 |
|
| FM24V10 | 128 KB | Y | | FRAM32 | #49 |
|
||||||
|
|
||||||
|
|
||||||
#### Notes
|
### Codes on the chip - Fujitsu
|
||||||
|
|
||||||
|
The datasheet - MB85RC04_DS501_00057_1v0_E-2329111.pdf - page 20 - provides meaning
|
||||||
|
to the markings on the FRAM devices.
|
||||||
|
The meaning of Environment code is unclear.
|
||||||
|
|
||||||
|
```
|
||||||
|
RC04: Product name
|
||||||
|
E11900: E1 (Environment code) + 1900 (Year and Week code)
|
||||||
|
300: 3 (Factory code) + 00(Trace code)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Notes
|
||||||
|
|
||||||
- Not all types of FRAM are tested. Please let me know if you have verified one that is not in the list.
|
- Not all types of FRAM are tested. Please let me know if you have verified one that is not in the list.
|
||||||
- If there is no deviceID **getSize()** will not work correctly.
|
- If there is no deviceID **getSize()** will not work correctly.
|
||||||
@ -84,7 +97,7 @@ Not tested: expect the **MB85RC1MT** can be addressed with 2 instances of **FRAM
|
|||||||
too with adjacent addresses.
|
too with adjacent addresses.
|
||||||
|
|
||||||
|
|
||||||
#### Related
|
### Related
|
||||||
|
|
||||||
- https://github.com/RobTillaart/I2C_EEPROM (eeprom)
|
- https://github.com/RobTillaart/I2C_EEPROM (eeprom)
|
||||||
- https://github.com/RobTillaart/I2C_24LC1025 (eeprom)
|
- https://github.com/RobTillaart/I2C_24LC1025 (eeprom)
|
||||||
@ -286,9 +299,6 @@ Indicative power usage in uA in three modi (if supported).
|
|||||||
| FM24C256-G | 32 KB | 100 uA | | | See #45
|
| FM24C256-G | 32 KB | 100 uA | | | See #45
|
||||||
|
|
||||||
|
|
||||||
_TODO: fill the table_
|
|
||||||
|
|
||||||
|
|
||||||
## FRAM_RINGBUFFER
|
## FRAM_RINGBUFFER
|
||||||
|
|
||||||
Since version 0.4.2 a separate class **FRAM_RINGBUFFER** is added to this repo.
|
Since version 0.4.2 a separate class **FRAM_RINGBUFFER** is added to this repo.
|
||||||
@ -346,9 +356,8 @@ Use **getSizeBytes()** to get 512.
|
|||||||
- **MB85RC128A** only (hard code fall back?).
|
- **MB85RC128A** only (hard code fall back?).
|
||||||
- **getSize()** scanning FRAM like EEPROM library?
|
- **getSize()** scanning FRAM like EEPROM library?
|
||||||
- investigate a faster strategy for **readUntil()**
|
- investigate a faster strategy for **readUntil()**
|
||||||
- search for separator per block (e.g. 16 bytes) read.
|
- readUntil() calls read() which reads per 24 bytes.
|
||||||
- Investigate **getManufacturerID()** and **getProductID()** for FRAM9/11.
|
- search for separator per block (e.g. 24 bytes) in read (copy code).
|
||||||
- need hardware + data sheets.
|
|
||||||
|
|
||||||
|
|
||||||
#### Could
|
#### Could
|
||||||
|
@ -56,27 +56,28 @@ void loop()
|
|||||||
|
|
||||||
void testReadWriteLarge()
|
void testReadWriteLarge()
|
||||||
{
|
{
|
||||||
|
int size = 600 * sizeof(int);
|
||||||
for (int i = 0; i < 600; i++) ar[i] = i;
|
for (int i = 0; i < 600; i++) ar[i] = i;
|
||||||
|
|
||||||
start = micros();
|
start = micros();
|
||||||
fram.write(1000, (uint8_t*)ar, 1200);
|
fram.write(1000, (uint8_t*)ar, size);
|
||||||
stop = micros();
|
stop = micros();
|
||||||
Serial.print("WRITE 1200 bytes TIME: \t");
|
Serial.print("WRITE 1200 bytes TIME: \t");
|
||||||
Serial.print(stop - start);
|
Serial.print(stop - start);
|
||||||
Serial.print(" us ==> \t");
|
Serial.print(" us ==> \t");
|
||||||
Serial.print((stop - start) / 1200.0, 2);
|
Serial.print((stop - start) / (1.0 * size), 2);
|
||||||
Serial.println(" us/byte.");
|
Serial.println(" us/byte.");
|
||||||
delay(100);
|
delay(100);
|
||||||
|
|
||||||
for (int i = 0; i < 600; i++) ar[i] = 0;
|
for (int i = 0; i < 600; i++) ar[i] = 0;
|
||||||
|
|
||||||
start = micros();
|
start = micros();
|
||||||
fram.read(1000, (uint8_t*)ar, 1200);
|
fram.read(1000, (uint8_t*)ar, size);
|
||||||
stop = micros();
|
stop = micros();
|
||||||
Serial.print("READ 1200 bytes TIME: \t");
|
Serial.print("READ 1200 bytes TIME: \t");
|
||||||
Serial.print(stop - start);
|
Serial.print(stop - start);
|
||||||
Serial.print(" us ==> \t");
|
Serial.print(" us ==> \t");
|
||||||
Serial.print((stop - start) / 1200.0, 2);
|
Serial.print((stop - start) / (1.0 * size), 2);
|
||||||
Serial.println(" us/byte.");
|
Serial.println(" us/byte.");
|
||||||
delay(100);
|
delay(100);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/RobTillaart/FRAM_I2C.git"
|
"url": "https://github.com/RobTillaart/FRAM_I2C.git"
|
||||||
},
|
},
|
||||||
"version": "0.8.0",
|
"version": "0.8.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"frameworks": "*",
|
"frameworks": "*",
|
||||||
"platforms": "*",
|
"platforms": "*",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name=FRAM_I2C
|
name=FRAM_I2C
|
||||||
version=0.8.0
|
version=0.8.1
|
||||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||||
sentence=Arduino library for I2C FRAM for persistent storage.
|
sentence=Arduino library for I2C FRAM for persistent storage.
|
||||||
|
Loading…
Reference in New Issue
Block a user