Forums

SPI flash and arduino

Started by gm January 4, 2016
Hi to all and happy new year!
With small delay :-)

Project:
I will use winbond 64M spi flash memory as external memory for arduino 
uno. Now, the idea is to use this memory for data logging and also for 
running sketch etc. Basically i want to free arduino on board memory as 
much as possible because now am using cca 90% of it. On the other side i 
want to expand the program with additional features.

Program status:
Program is reading gsm data and sends this data each 5 minutes to web 
server. I want to port all this to external memory.

External memory:
- i was planning on using smaller memory chip but the price was very 
cheap so i used bigger one.


Questions:

- will this be possible to do ?

- if the R/W cycles of this spi memory is around 100K, does this means 
that it will "break" after 1 year ( based on reading / writing of gsm 
data ) ?

GM

Den mandag den 4. januar 2016 kl. 22.11.23 UTC+1 skrev gm:
> Hi to all and happy new year! > With small delay :-) > > Project: > I will use winbond 64M spi flash memory as external memory for arduino > uno. Now, the idea is to use this memory for data logging and also for > running sketch etc. Basically i want to free arduino on board memory as > much as possible because now am using cca 90% of it. On the other side i > want to expand the program with additional features. > > Program status: > Program is reading gsm data and sends this data each 5 minutes to web > server. I want to port all this to external memory. > > External memory: > - i was planning on using smaller memory chip but the price was very > cheap so i used bigger one. > > > Questions: > > - will this be possible to do ?
an AVR mcu can only run code from internal flash so external memory doesn't add any more memory for program, though if you have lots of strings etc. you could move those external and free some memory only way around it is to implement some kind of interpreter running some interpreted language stored in external memory trow away the Arduino and get something with a cortex ARM, faster, more memory and just as cheap
> > - if the R/W cycles of this spi memory is around 100K, does this means > that it will "break" after 1 year ( based on reading / writing of gsm > data ) ?
the limit is only on writes, it means each location can only be erased and programmed 100k times before it might fail. -Lasse
On 04.01.2016 22:43, Lasse Langwadt Christensen wrote:
> Den mandag den 4. januar 2016 kl. 22.11.23 UTC+1 skrev gm: >> Hi to all and happy new year! >> With small delay :-) >> >> Project: >> I will use winbond 64M spi flash memory as external memory for arduino >> uno. Now, the idea is to use this memory for data logging and also for >> running sketch etc. Basically i want to free arduino on board memory as >> much as possible because now am using cca 90% of it. On the other side i >> want to expand the program with additional features. >> >> Program status: >> Program is reading gsm data and sends this data each 5 minutes to web >> server. I want to port all this to external memory. >> >> External memory: >> - i was planning on using smaller memory chip but the price was very >> cheap so i used bigger one. >> >> >> Questions: >> >> - will this be possible to do ? > > an AVR mcu can only run code from internal flash so external memory > doesn't add any more memory for program, though if you have lots of > strings etc. you could move those external and free some memory > > only way around it is to implement some kind of interpreter running > some interpreted language stored in external memory > > trow away the Arduino and get something with a cortex ARM, faster, > more memory and just as cheap > >> >> - if the R/W cycles of this spi memory is around 100K, does this means >> that it will "break" after 1 year ( based on reading / writing of gsm >> data ) ? > > the limit is only on writes, it means each location can only be erased and programmed 100k times before it might fail. > > -Lasse >
---------------- I would agree with you regarding arduino but the problem is that i have to use gsm module (from tinysine ) and i have to cut down the production costs. I have though about some other solutions but didnt find any. Best solution would be like you wrote, some stronger chip. Is there maybe some ready to use board with some cortex chip ? The prize of UNO board that i have was 7$ + memory = 8.5$ Is it possible to get some stronger board for 10 - 13$ ? I dont need pcb header connectors etc..
Den mandag den 4. januar 2016 kl. 23.55.21 UTC+1 skrev gm:
> On 04.01.2016 22:43, Lasse Langwadt Christensen wrote: > > Den mandag den 4. januar 2016 kl. 22.11.23 UTC+1 skrev gm: > >> Hi to all and happy new year! > >> With small delay :-) > >> > >> Project: > >> I will use winbond 64M spi flash memory as external memory for arduino > >> uno. Now, the idea is to use this memory for data logging and also for > >> running sketch etc. Basically i want to free arduino on board memory as > >> much as possible because now am using cca 90% of it. On the other side i > >> want to expand the program with additional features. > >> > >> Program status: > >> Program is reading gsm data and sends this data each 5 minutes to web > >> server. I want to port all this to external memory. > >> > >> External memory: > >> - i was planning on using smaller memory chip but the price was very > >> cheap so i used bigger one. > >> > >> > >> Questions: > >> > >> - will this be possible to do ? > > > > an AVR mcu can only run code from internal flash so external memory > > doesn't add any more memory for program, though if you have lots of > > strings etc. you could move those external and free some memory > > > > only way around it is to implement some kind of interpreter running > > some interpreted language stored in external memory > > > > trow away the Arduino and get something with a cortex ARM, faster, > > more memory and just as cheap > > > >> > >> - if the R/W cycles of this spi memory is around 100K, does this means > >> that it will "break" after 1 year ( based on reading / writing of gsm > >> data ) ? > > > > the limit is only on writes, it means each location can only be erased and programmed 100k times before it might fail. > > > > -Lasse > > > ---------------- > I would agree with you regarding arduino but the problem is that i have > to use gsm module (from tinysine ) and i have to cut down the production > costs. I have though about some other solutions but didnt find any. Best > solution would be like you wrote, some stronger chip. Is there maybe > some ready to use board with some cortex chip ? > > The prize of UNO board that i have was 7$ + memory = 8.5$ > Is it possible to get some stronger board for 10 - 13$ ? > I dont need pcb header connectors etc..
http://www.st.com/web/catalog/tools/FM116/CL1620/SC959/SS1532/LN1847/PF260320 100MHz cortex M4, 512K flash, 128K RAM, UNO compatible pinout, $10.12 -Lasse
On Mon, 4 Jan 2016 15:08:48 -0800 (PST), Lasse Langwadt Christensen
<langwadt@fonz.dk> wrote:

>Den mandag den 4. januar 2016 kl. 23.55.21 UTC+1 skrev gm: >> On 04.01.2016 22:43, Lasse Langwadt Christensen wrote: >> > Den mandag den 4. januar 2016 kl. 22.11.23 UTC+1 skrev gm: >> >> Hi to all and happy new year! >> >> With small delay :-) >> >> >> >> Project: >> >> I will use winbond 64M spi flash memory as external memory for arduino >> >> uno. Now, the idea is to use this memory for data logging and also for >> >> running sketch etc. Basically i want to free arduino on board memory as >> >> much as possible because now am using cca 90% of it. On the other side i >> >> want to expand the program with additional features. >> >> >> >> Program status: >> >> Program is reading gsm data and sends this data each 5 minutes to web >> >> server. I want to port all this to external memory. >> >> >> >> External memory: >> >> - i was planning on using smaller memory chip but the price was very >> >> cheap so i used bigger one. >> >> >> >> >> >> Questions: >> >> >> >> - will this be possible to do ? >> > >> > an AVR mcu can only run code from internal flash so external memory >> > doesn't add any more memory for program, though if you have lots of >> > strings etc. you could move those external and free some memory >> > >> > only way around it is to implement some kind of interpreter running >> > some interpreted language stored in external memory >> > >> > trow away the Arduino and get something with a cortex ARM, faster, >> > more memory and just as cheap >> > >> >> >> >> - if the R/W cycles of this spi memory is around 100K, does this means >> >> that it will "break" after 1 year ( based on reading / writing of gsm >> >> data ) ? >> > >> > the limit is only on writes, it means each location can only be erased and programmed 100k times before it might fail. >> > >> > -Lasse >> > >> ---------------- >> I would agree with you regarding arduino but the problem is that i have >> to use gsm module (from tinysine ) and i have to cut down the production >> costs. I have though about some other solutions but didnt find any. Best >> solution would be like you wrote, some stronger chip. Is there maybe >> some ready to use board with some cortex chip ? >> >> The prize of UNO board that i have was 7$ + memory = 8.5$ >> Is it possible to get some stronger board for 10 - 13$ ? >> I dont need pcb header connectors etc.. > >http://www.st.com/web/catalog/tools/FM116/CL1620/SC959/SS1532/LN1847/PF260320 > >100MHz cortex M4, 512K flash, 128K RAM, UNO compatible pinout, $10.12 > >-Lasse
Hey Lasse, do you know if someone makes a arduino shield with Optocouplers ( Input and output) ? I see Velleman has a relay shield, But it's hard to believe no one has a shield with a bunch of Optos on it. Cheers
Den tirsdag den 5. januar 2016 kl. 00.36.10 UTC+1 skrev Martin Riddle:
> On Mon, 4 Jan 2016 15:08:48 -0800 (PST), Lasse Langwadt Christensen > <langwadt@fonz.dk> wrote: > > >Den mandag den 4. januar 2016 kl. 23.55.21 UTC+1 skrev gm: > >> On 04.01.2016 22:43, Lasse Langwadt Christensen wrote: > >> > Den mandag den 4. januar 2016 kl. 22.11.23 UTC+1 skrev gm: > >> >> Hi to all and happy new year! > >> >> With small delay :-) > >> >> > >> >> Project: > >> >> I will use winbond 64M spi flash memory as external memory for arduino > >> >> uno. Now, the idea is to use this memory for data logging and also for > >> >> running sketch etc. Basically i want to free arduino on board memory as > >> >> much as possible because now am using cca 90% of it. On the other side i > >> >> want to expand the program with additional features. > >> >> > >> >> Program status: > >> >> Program is reading gsm data and sends this data each 5 minutes to web > >> >> server. I want to port all this to external memory. > >> >> > >> >> External memory: > >> >> - i was planning on using smaller memory chip but the price was very > >> >> cheap so i used bigger one. > >> >> > >> >> > >> >> Questions: > >> >> > >> >> - will this be possible to do ? > >> > > >> > an AVR mcu can only run code from internal flash so external memory > >> > doesn't add any more memory for program, though if you have lots of > >> > strings etc. you could move those external and free some memory > >> > > >> > only way around it is to implement some kind of interpreter running > >> > some interpreted language stored in external memory > >> > > >> > trow away the Arduino and get something with a cortex ARM, faster, > >> > more memory and just as cheap > >> > > >> >> > >> >> - if the R/W cycles of this spi memory is around 100K, does this means > >> >> that it will "break" after 1 year ( based on reading / writing of gsm > >> >> data ) ? > >> > > >> > the limit is only on writes, it means each location can only be erased and programmed 100k times before it might fail. > >> > > >> > -Lasse > >> > > >> ---------------- > >> I would agree with you regarding arduino but the problem is that i have > >> to use gsm module (from tinysine ) and i have to cut down the production > >> costs. I have though about some other solutions but didnt find any. Best > >> solution would be like you wrote, some stronger chip. Is there maybe > >> some ready to use board with some cortex chip ? > >> > >> The prize of UNO board that i have was 7$ + memory = 8.5$ > >> Is it possible to get some stronger board for 10 - 13$ ? > >> I dont need pcb header connectors etc.. > > > >http://www.st.com/web/catalog/tools/FM116/CL1620/SC959/SS1532/LN1847/PF260320 > > > >100MHz cortex M4, 512K flash, 128K RAM, UNO compatible pinout, $10.12 > > > >-Lasse > > Hey Lasse, do you know if someone makes a arduino shield with > Optocouplers ( Input and output) ? > I see Velleman has a relay shield, But it's hard to believe no one has > a shield with a bunch of Optos on it. >
never really used any arduino stuff and I haven't stumbled onto any opto input/output shields how many in/outs what what configuration? it can't take more than a few cups coffee and a $15 pcb run to make some -Lasse
On Monday, January 4, 2016 at 6:36:10 PM UTC-5, Martin Riddle wrote:
> > > Hey Lasse, do you know if someone makes a arduino shield with > Optocouplers ( Input and output) ? > I see Velleman has a relay shield, But it's hard to believe no one has > a shield with a bunch of Optos on it. > > Cheers
Look an Ebay or Aliexpress. There are a bunch of shields with Optocouplers that drive relays. Don't know of any that have Optocouplers on both input and output. http://www.ebay.com/itm/8-Channel-DC-5V-Relay-Module-Board-for-Arduino-Raspberry-Pi-DSP-AVR-PIC-ARM-/201400438757?hash=item2ee466cfe5:g:JMYAAOSw9N1VwDSM Dan
On Mon, 4 Jan 2016 17:12:53 -0800 (PST), "dcaster@krl.org"
<dcaster@krl.org> wrote:

>On Monday, January 4, 2016 at 6:36:10 PM UTC-5, Martin Riddle wrote: >> >> >> Hey Lasse, do you know if someone makes a arduino shield with >> Optocouplers ( Input and output) ? >> I see Velleman has a relay shield, But it's hard to believe no one has >> a shield with a bunch of Optos on it. >> >> Cheers > >Look an Ebay or Aliexpress. There are a bunch of shields with Optocouplers that drive relays. Don't know of any that have Optocouplers on both input and output. > >http://www.ebay.com/itm/8-Channel-DC-5V-Relay-Module-Board-for-Arduino-Raspberry-Pi-DSP-AVR-PIC-ARM-/201400438757?hash=item2ee466cfe5:g:JMYAAOSw9N1VwDSM > > Dan
The Isolate setting used is pretty tight on those boards. Plus the solder splash in the one picture does not instill confidence. Plus I was looking for at lead 4 inputs and 4 outputs. Like Lasse pointed out, it's not that expensive to have a few blanks made. But I was hoping I could find something. Cheers
gm wrote:
> Hi to all and happy new year! > With small delay :-) > > Project: > I will use winbond 64M spi flash memory as external memory for arduino > uno. Now, the idea is to use this memory for data logging and also for > running sketch etc. Basically i want to free arduino on board memory as > much as possible because now am using cca 90% of it. On the other side i > want to expand the program with additional features. > > Program status: > Program is reading gsm data and sends this data each 5 minutes to web > server. I want to port all this to external memory. > > External memory: > - i was planning on using smaller memory chip but the price was very > cheap so i used bigger one. > > > Questions: > > - will this be possible to do ? > > - if the R/W cycles of this spi memory is around 100K, does this means > that it will "break" after 1 year ( based on reading / writing of gsm > data ) ? > > GM >
Please consider looking into the Beaglebone Black or similarly sized ARM board. -- Les Cargill
On 04/01/16 22:11, gm wrote:
> Hi to all and happy new year! > With small delay :-) > > Project: > I will use winbond 64M spi flash memory as external memory for arduino > uno. Now, the idea is to use this memory for data logging and also for > running sketch etc. Basically i want to free arduino on board memory as > much as possible because now am using cca 90% of it. On the other side i > want to expand the program with additional features.
There is no problem getting the AVR to write to the SPI flash, or using it to hold data. But you can't put program code in the SPI. You can put data there (strings, tables, etc.), but not instructions. So if the AVR's internal flash is enough for the program, then this should work fine. If not, you need a bigger AVR or a new platform (such as a Cortex M board). (In theory, you can run an emulator or virtual machine on the AVR and have the program in external memory. If you are a Forth fan, that might be a reasonable idea. And someone made an ARM emulator for the AVR and used it to boot Linux from external memory - it worked, but took several days to boot.)
> > Program status: > Program is reading gsm data and sends this data each 5 minutes to web > server. I want to port all this to external memory. > > External memory: > - i was planning on using smaller memory chip but the price was very > cheap so i used bigger one. > > > Questions: > > - will this be possible to do ? > > - if the R/W cycles of this spi memory is around 100K, does this means > that it will "break" after 1 year ( based on reading / writing of gsm > data ) ? > > GM >