Arduino due eeprom storage

Hi, i'm testing arduino due on my delta. I have a dubt on eeprom managment by firmware, my problem is that eeprom settings after a restart or a disconnection of matherboard  came back at the original value( programmed widh arduino ide), so any eeprom change during only at the next resart.
I make a premise...arduino due shouldn't have eeprom on board, so in theory the firmware should use the eeprom present on (in my case) smart ramps.
If i connect only arduino due (without ramps) at host, i can read and write the eeprom! what does it means? where this data are storage? in the flash on board?
I would understand where is my problem, if the motherboard is defective or ramps, but if first i don't know how the eeprom data are managment can't go ahead.
I would trying with external eeprom (maybe the internal epprom is bad) using i2c pin present on ramps....is it possible?


Comments

  • Due has no eeprom. We use eeprom from printer board or simulate eeprom. Smart ramps comes with or without eeprom. See dev version where you can select if you have smart ramps with or without eeprom. From your description you are using config without.

    If your board has in deed no eeprom, you can set it in pins.h to use sd card instead. But that would require to always have the same sd card inserted.
  • Well, my ramps has the eeprom...strange eeprom (atmlh 612), but there is (  I hope it is an eeprom !! :-)). I saw quickly the dev firmware, but onestly i didn't found the smart ramps option with or without eeprom and also the compilation with azsm 1628 display was interrupted by error, so i used a compilation without display and with smart ramps option, but with same result. i'll spend more time to find this option on firmware.
  • You are right there is no option for samrt ramps with eeprom. Have to check firmware if I have only forgotten to update the list or if I did not add eeprom support also I rember having done it.
  • edited January 18
    In the meanwhile i looked at pins.h and i added the eeprom pin as you suggest 
    in an other post that i didn't see before..sorry.
    It works !
  • edited January 18
    Update:
    With pins.h modified it works, but the display result with a poor contrast, instead with this :
    http://reprap.org/wiki/File:ArduinoDUE_0.92.9.zip
    contrast is perfect, but there are other problem related to the temperature readings...it's unstable.

    p.s. an other strange thing is that at the power on display stay with backlight on, without text, and D10 output on ramps it's on (extruder heating!) ! this condiction is permanent until you perform a reset, after the restart display goes on and output D10 off...have you any idea?
  • Dev has now added the smart ramps with eeprom. It was already there just not added in config tool as entry.

    Firmware does not set contrast, that comes from contrast poti on display and power it gets from board.

    Your power on problem is most probably a china due. I have seen many of them having a bug that they crash on first power up and only work after a reset. They simply start too early when power is not stable enough and crash in that process or something like that. They even crash with the basic blink example from arduino example lib on a naked board so this is no software problem.
  • edited January 19
    Thank you, perfect. So, the arduino board is "too"  fake, good i'll try with a new board at the next time.
    Instead for the poor contrast, this type of display "azsmz12864" has not contrast pot, but with the other mod version of your firmware working good, so i thoutght that same refresh settings ( maybe lcd is too slow ) is changed in this version, is it possible?
  • Refresh rate is 800ms if you have no action constantly triggering refresh. See start screen where when unhomed position switches between 0 and ??? to see refresh rate. Not aware of any change here.
  • I got it, anyway i spoke about frequency or timing of multiplexing or something like that...becouse can't be the voltage of contrast infact with other version works. in this condiction with this hardware is almost impossible to use display
  • edited January 19
    Repetier said:

    Your power on problem is most probably a china due. I have seen many of them having a bug that they crash on first power up and only work after a reset. They simply start too early when power is not stable enough and crash in that process or something like that. They even crash with the basic blink example from arduino example lib on a naked board so this is no software problem.
    So there is a simple solution for the china dues with the power up problem  you just have to add a 10kOhm resistor (see pictures)
    please compare picture with your board, this fix works only with board that have marked component in this orientation.
    I modified 10 of these , all working error free

    https://github.com/RAyWB/PICS/blob/master/due_start1.jpg

    https://github.com/RAyWB/PICS/blob/master/due_startfix.jpg

    for Display i guess it needs 5V Supply so you have to use level shifters for signals.
    if it is SPI driven you can use something like this :

    https://www.adafruit.com/product/757

    had some displays from "the bay" which were very sensitive on power when running on 3.3 V, solved it this way.
    only thing i wonder is missing contrast pot. may be you can post a picture of the displays back side
  • edited January 20
    ok, dont know what happened try https://github.com/RAyWB/PICS
    it´s the two pictures due_start1 and due_startfix


    and sorry, display is different from the ones i have
  • Thank you very much for your suggest, and searching everywhere i found also a  software solution thats works. I finished now and it's perfect!!
    Pratically is needed upgrade the firmware of atmel 16u2 (interfece USB-serial) using an other arduino as ISP programmer.
     This is the New Firmware:

    and this is the HOW-TO


    I hope it makes happy someone like me who hates solder SMD !!  ;-)







  • edited January 20

    Thanks for the interesting link , i´ll try that even though i prefer soldering ;-)


    here´s some more about how and why

    http://www.dimdim.gr/2016/03/fixing-startup-issues-with-arduino-dues/

  • edited January 20
    Thanks to you... without your suggestion i would not find the software solution, and still trust me, it works beautifully. I have already turned on and off at least 50 times and never failed to startup.  ;)
  • edited January 21
    @Repetier
    Hi, i solved the poor contrast mistery of my display.
    I Added in ui.cpp this code

    #ifdef LCD_CONTRAST
        u8g_SetContrast(&u8g,LCD_CONTRAST);

    that i found instead in other version, i think it was an oversight ! :-)

    after this part...

    #ifdef U8GLIB_ST7565_NHD_C2832_SW_SPI
    u8g_InitSPI(&u8g,&u8g_dev_st7565_nhd_c12864_sw_spi,UI_DISPLAY_D4_PIN,UI_DISPLAY_ENABLE_PIN,UI_DISPLAY_RS_PIN,UI_DISPLAY_D5_PIN,U8G_PIN_NONE);
        u8g_Begin(&u8g);

    and now works perfectly.

  • Actually I never have registered LCD_CONTRAST. That code did come from an other user, so not sure if it was removed or never been in ui.cpp. But now I have added it for next update.
  • Ok. Good. I don't want boring you, sorry. Anyway just to know smart ramps with eeprom compiling makes error.

    #error No predefined AZSMZ_12864 mapping for your board available


    without epprom instead is correct.
  • DisplayList.h line 1479 must be

    #if MOTHERBOARD == 408 || MOTHERBOARD == 413 // SMART RAMPS

    so it is valid also for board with eeprom.
  • Perfect, thanks. During the test i saw that the sd card didn't works. I solved using the adding in ui.h  the bold text...


    #if FEATURE_CONTROLLER == CONTROLLER_VIKI2 || FEATURE_CONTROLLER == CONTROLLER_AZSMZ_12864
    #undef SDCARDDETECT
    #define SDCARDDETECT -1
    #undef SDSUPPORT
    #define SDSUPPORT 1

    I really don't know if is the right things, but for me works. let me know what you think about.
Sign In or Register to comment.