Skip to content

Commit

Permalink
fix #56, performance sketch
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Jul 10, 2024
1 parent 736ec60 commit 18afa98
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.


#### Fujitsu
### Fujitsu

Types of FRAM tested with this library:

Expand All @@ -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.


#### Ramtron / Cypress / Infineon
### Ramtron / Cypress / Infineon

Types of FRAM tested with this library:

Expand All @@ -71,7 +71,20 @@ Types of FRAM tested with this library:
| 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.
- If there is no deviceID **getSize()** will not work correctly.
Expand All @@ -84,7 +97,7 @@ Not tested: expect the **MB85RC1MT** can be addressed with 2 instances of **FRAM
too with adjacent addresses.


#### Related
### Related

- https://github.com/RobTillaart/I2C_EEPROM (eeprom)
- https://github.com/RobTillaart/I2C_24LC1025 (eeprom)
Expand Down
9 changes: 5 additions & 4 deletions examples/testFRAMPerformance/testFRAMPerformance.ino
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,28 @@ void loop()

void testReadWriteLarge()
{
int size = 600 * sizeof(int);
for (int i = 0; i < 600; i++) ar[i] = i;

start = micros();
fram.write(1000, (uint8_t*)ar, 1200);
fram.write(1000, (uint8_t*)ar, size);
stop = micros();
Serial.print("WRITE 1200 bytes TIME: \t");
Serial.print(stop - start);
Serial.print(" us ==> \t");
Serial.print((stop - start) / 1200.0, 2);
Serial.print((stop - start) / (1.0 * size), 2);
Serial.println(" us/byte.");
delay(100);

for (int i = 0; i < 600; i++) ar[i] = 0;

start = micros();
fram.read(1000, (uint8_t*)ar, 1200);
fram.read(1000, (uint8_t*)ar, size);
stop = micros();
Serial.print("READ 1200 bytes TIME: \t");
Serial.print(stop - start);
Serial.print(" us ==> \t");
Serial.print((stop - start) / 1200.0, 2);
Serial.print((stop - start) / (1.0 * size), 2);
Serial.println(" us/byte.");
delay(100);

Expand Down

0 comments on commit 18afa98

Please sign in to comment.