Start a new topic

Use Nextion SD-Card as general storage for MCU's

Hi


A request to use the sdcard on the Nextion screen as storage space for connected MCU’s.


This will greatly improve the cost / functionality justification for using Nextion screens on solutions.


Memory will always be a constraint on MCU’s and one needs a separate shield such a data logger shield if any data needs to be stored on a semi permanent basis. With sdcard reader / writer already installed on the Nextion screen, the hardware is in place to facilitate the sharing of the sdcard with MCU’s.


The sdcard should be available to the MCU no matter what page is being displayed.


This will facilitate any file type to be stored on the sdcard and can be used for :-
  • Data logged to be displayed by the Waveform, as a full file or only a subset of the records in the file.
  • This will no longer require changes to be made to waveform as requested on the forums
  • Waveforms can now programmatically be made so “slide the graph” left and right using big quantities of data by scrolling up and down through the records in the files
  • We should be able to write/read to/from the sdcard in back ground by the MCU - independent of the page displayed
  • System log file entries
  • Any data that can be transferred to other systems
  • Text strings for the MCU, instead of using PROGMEM
  • Saving of parameters as back-up for EEPROM By using normal C++ file commands.

When doing this, the boot loader that currently reads the sdcard for a .tft file to do an upgrade to the screen, should check the sdcard on boot and if no .tft is present it should make the sdcard available via the standard serial interface for reading and writing to files and folders.


4 people like this idea

I am now reviewing all of the Feature Requests, this will take some time, patience please.

Request is duplicated, already in list - carried forward

Also another thing I would love to have is the ability to also use the SD card to program the arduino, easy firmware updating for both chips at once! I wish I could provide more but I don't know enough about the nextion yet to do so.

This would be very useful for my planned uses 


Thank you Jan!   You have made a suggestion with a possible method to accomplish such a goal!


I wish others might learn from you, and think through the implications of their request to provide a potential how, rather than some blind request that results in breaking the existing code.


I agree that this is a worthy request.


- What is not in currently in place in the firmware a FileSystem, and that is the potential reason why there can currently only be one file during a TFT transfer.

- Text Strings for the MCU would still need to be moved into PROGMEM from whatever storage location in order to be used by CODE, this will indeed create a delay side-effect, possibly one we can live with.

- reading and writing in the background ... the Cortex-M0 is a single core. The Nextion is sequentially hard coded.  There are no other processors to offload the request to, so it can never be true "background".

- The SPI flash and the microSD card are hardwired with shared data lines.  Currently the firmware is simple, if card is detected branch to upload procedure - expect reset to continue, if card is not detected, then branch to enable the Winbond SPI Flash and load the TFT.  Only one can ever be active at a time due to the shared IO lines.  Switching between them may cause side-effect with some delays.  (I am not yet certain if the microSD card could be pushed to reliably run as fast as the Winbond, and if not then the entire Display's performance degrades during microSD usage).

- The Nextion is co-branded and not the originating source for the firmware.


With that in mind, it still seems potentially possible.


Now, if the folks at the source company could be convinced to spend additional funds to atleast program a side-line standalone beta such that it would not interfere with the production versions of their Editors, and there were human resources available to make the necessary translations into single byte characters for the International version and to translate documentation into English ... yeah!  I would certainly like to be part of that experiment FOR SURE. 

- Then if success is found, then integrate it into the production versions of the Editors.


2 people like this
Login or Signup to post a comment