Me bad. I should have told that the code I have shown was giving me 8192 bytes 8.0 KB as outout.mikeysklar wrote: ↑Wed Nov 30, 2022 9:36 pm You had not mentioned the value you were seeing 8k addresses.
So far so good. That are thing that assumed when purchasing the board.mikeysklar wrote: ↑Wed Nov 30, 2022 9:36 pmThere is a different address size on the FRAM devices. The 4Mb is a 4-byte address size (32-bit or double word).
That's one of the reasons to use python. I hoped that python lib will do that automatically.mikeysklar wrote: ↑Wed Nov 30, 2022 9:36 pm It uses fram.begin(3) in the Arduino section of the guide.
Here you've lost me.mikeysklar wrote: ↑Wed Nov 30, 2022 9:36 pm I realize how obscure that is when you are using CircuitPython. The smaller FRAM devices use the default 2-byte, single word address sizing.
I have read these. Are you implying that full size is usable only in C/Arduino. That's not great but not terrible either.mikeysklar wrote: ↑Wed Nov 30, 2022 9:36 pmhttps://learn.adafruit.com/spi-fram-2mb ... in-1658773
http://adafruit.github.io/Adafruit_FRAM ... s_p_i.html
I'm totally lost heremikeysklar wrote: ↑Wed Nov 30, 2022 9:36 pm
You can try using this to determine fram size and work in a usable address space. I would expect your unit to show 125k usable addresses (32-bit per address).
Code: Select all
import board import busio import digitalio import adafruit_fram spi = busio.SPI(board.SCK, board.MOSI, board.MISO) cs = digitalio.DigitalInOut(board.D7) fram = adafruit_fram.FRAM_SPI(spi, cs) # size returned by len() len(fram) # can be used with range for i in range(0, len(fram))
//Edit
Are you teling me that fram is a list of 8192 bytearrays with size of 512?
//Nope
Code: Select all
print("fram",len(fram))
print("fram[0]", len(fram[0]))
Code: Select all
fram 8192
fram[0] 1