PDA

View Full Version : FLASH SPI command examples /setup



longpole001
- 11th June 2014, 05:21
Hi , i have been looking at using SPI based flash chip , has anyone got an example of how to make use of the duel/ quad / general read/write command structure for FLAsh in PBP ?

regards
Sheldon

longpole001
- 11th June 2014, 06:17
http://www.farnell.com/datasheets/1737025.pdf

EarlyBird2
- 11th June 2014, 06:56
8 Mb! Now that is serious data storage. Are you building a data logger or what?

longpole001
- 11th June 2014, 07:23
haha steve , well i hate not having enough space . and 128k on the chip is waisted by the many menus, specific fonts / graphic symbols in the program space .

I am not sure if i can use any of it for real program space , i dont think its possible.

i was close to puting on 32MBit storage as the cost differance was about 8c per chip more , but i think 8mbit storage should be enough to hold the menus / and special fonts / banners i need for the moment


I am currently using a software spi , and i am hoping it will be quick enough to get the data off in no noticeble lag time

ill still need to use the SD card for data loging so the file is easly moved from the device to the computer for further work. so that has to still be done

i get these chips friday and will need to install a 5v tollerant buffer IC to the CE pin as the cpu runs at 5v . not sure if a resistor in line and pullup on ce pin to the 3v3 would be a good idea for this chip ?

to get this chip running i was hoping to find a common command set structure in PBP for the flash to allow for read /write / protect / access to mem block examples

any links you got for that ?
.

from what i can see i should not need the hardware write protect connected to the cpu at this point , or the hold ,

as i emailed you yesterday i was feeling very unsure about haveing menu data /stored config parmenters /etc sitting on a Sd card that could be removed - it just invites a problem

EarlyBird2
- 11th June 2014, 07:48
In my line of work SD cards are used for data storage and as you say it is a convenient way of transferring the data from the logger to the PC. Similarly USB memory sticks are used. Flash memory is also used, access speed being the advantage (I think but I am not sure) but transferring data to the PC has to be handled by the Logger.

SPI is not something I have used. I always used I2C as I thought it was easier to understand. I like BUS systems and serial communication in general! Transferring data using a couple of pins Is a neat solution in my opinion.

EarlyBird2
- 11th June 2014, 08:20
The latest method for data collection is over the internet. Gives live remote control also! I mainly use mobile technology for this, GPRS modems.

I am just giving you food for thought!

longpole001
- 11th June 2014, 10:03
i aggree with you on the I2C - there is a lot of details on how to do it and the EEprom chip size is about 1mbit - the best price i can get those is about $4 each compaired to 30c each for the flash - with 4 times the size

speed of the spi is better than I2C ,but it debatable when the spi is software based , i can run mine on hardware spi , but not done it for this chip as the need has not been there "yet"

i have the spi bus running with 2 other modules and soon this flash chip all run at 3v3 , and have level converters for the required pins, as the cpu is at 5v

there must be some pbp stuff for flash chips that make use of its full features such as the protection/ block errase etc

i hate to have try to redo the wheel

the real work is to convert lookup data strings to be put into the chip. what i think i need is fuction called " mylookup" which replaces the lookup command , which places the data into the chip and returns its start location and address into varables.which are used by mylookup1 fuction to recover the data and place them into Lookup tables again .

just think out how i could do that , but it would make the data input/ output from the flash a lot easier than by hand

anyway , first step get the flash chip running , and pbp code to allow the data to be read / write

longpole001
- 18th June 2014, 04:27
well i wrote one now - lost 4- days doing it/testin but it works