Suggestions for using external flash SPI

I’m already doing something simillar with OLED 160*128 LCD.
I’m loading images from SD or SPI flash.
It work well. Speed is ok for me.

1 Like

@RWB, I did and posted the code! If you recall, I was using the FRAM as a display buffer for larger Sharp displays since the original Core didn’t have RAM. The application was very specialized. Now with SPI DMA and with careful design, using an external flash chip is more than feasible. In your case, the images will be easy. Fonts on the other hand will require a rewrite of the Adafruit_GFX library. It might be possible to create a RAM cache for a font and use it from there. Fun, fun, fun! :stuck_out_tongue_winking_eye:

@peekay123 Ahh you did! I never used it so didn’t know for sure.

Can I just leave the Font data on the Photon, so it keeps working like normal and just pull the image data from the SPI flash chip?

@Suprazz I ordered 3 of the same memory chips today, and they should arrive in a couple of days. Once I have the memory chips, I will be ready to test any code that is available along with a Photon & Electron + Sharp LCD I’m using.

@RWB, yes but pulling the image from the external flash still need some code. It is straight forward and simply requires an new drawBitmap() prototype to take the address of the bitmap in external flash. It can can pull the image from the flash and write it in slices (lines) or chunks (rectangles) or whole if a RAM buffer is used.

@peekay123 I’m happy you think the code change is simple :smiley: because I have no idea how to do it :smile:

If you’re willing to help with this then what direction would you take when it comes to writing to the Sharp LCD in slices(lines), chunks (Rectangles), or as a whole using the RAM buffer? How is it currently being done?

I would assume writing as a whole using the RAM buffer is best but would require more coding time which you may or may not have at the moment.

@RWB, I’d have to revisit the Sharpmem library to look at the design. Would be be thinking about the monochrome or color display units?

I will be using the 2.7 inch Monochrome displays.

Let me know if I owe you anything for your time with this since I know free time is usually limited for most of us :smiley:

@RWB, I will need to get an external flash chip/breakout to test. I also need to figure out the best way to do this.

@peekay123 I can send you a couple these flash chips that @Suprazz is using.

http://www.digikey.com/product-detail/en/issi-integrated-silicon-solution-inc/IS25LQ080B-JNLE/706-1331-ND/5189766

I will also send a pack of the Adafruit breakouts for this chip:

Anything else you need from Digikey while I’m placing the order?

@RWB, that would be incredibly useful! I always need something from Digikey but nothing for this application. Thanks!

I suggest to use SPIFFS file system on the flash memory. It will be easy to manage and easy to load images.

1 Like

I’ve used 25LQ080 on the Photon and Electron. It works great and it’s super cheap!

2 Likes

@peekay123 It’s ordered. Went with Mouser because it had your shipping info stored in it from the past.

Should be there in a couple of days :smiley:

@Suprazz I’m down for anything that works and is reliable.

You know how to get the flash chip erased and filled up remotely which is great; now I need to make sure I can access the images I will put on the flash chip and display them correctly on the LCD.

@peekay123 Is the guy who got the Sharp LCD’s & custom Adafruit mfGFX library working so I have to rely on him for making sure the Sharp LCD collaborates with the new Flash chip regardless of which file system is used.

1 Like

@Suprazz, do you have the SPIFFS library ported already? It would save me time if you could share it :wink:

@peekay123 I send him some money and told him to post it here for everybody when it’s done.

2 Likes

here is a quick example of a particle photon using SPIFFS to store a downloaded file from the internet (actually a jpg file file) but it can be a text file or html file…

The code is far from optimal but it’s working.

3 Likes

@Suprazz Excellent! So there is no reason these couldn’t be audio files also right?

@rickkas7 Do you still have that same Flash chip around? If so feel free to put this to the test if you have the time :smiley: I’m still waiting on the flash chips to arrive.

@peekay123 I wonder if this could be used with the P1’s and their 1Mb of external memory that’s onboard or not?

I’m still waiting on the flash chips to arrive.

1 Like

@suprazz The flash chips arrived today :smiley:

Do you or @rickkas7 have a picture or diagram for the recommended wiring to the Photon?

I know where the SPI lines go but not sure about the Hold, SE, or WP pins specifically.

Thanks!

Here’s how I connected it.

25LQ080      Photon
1 (CE#)   A2 (SS) - can use other pin if desired
2 (SO)    A4 (MISO)
3 (WP#)   3V3
4 (GND)   GND
5 (SI)    A5 (MOSI)
6 (SCK)   A3 (SCK)
7 (HOLD#) 3V3
8 (VCC)   3V3

Note that even though WP# and HOLD# aren’t used, they must be tied high for proper operation.

3 Likes

same thing for me

1 Like