avatar

Andy Wickert

Member Since: June 19, 2010

Country: United States

  • Last year, I customized RTClib to work with the DS3234, including alarms, clock-setting functionality, and more. Just realized I never posted it anywhere. Here you go, enjoy!

    https://github.com/NorthernWidget/RTClib

    And ask questions if you have any.

  • I've updated @maniacbug's RTC library with clock setting functions, a SPI_MODE3 fix (noted here), alarm functionality, and a few other changes. Check it out on github. Cheers!

  • I can confirm this issue: I have attempted for the past weekend to upload a bootloader to a custom Arduino Mega board I built, also running at 8 MHz. The full error appears immediately at the end of the bootloader burn processes. It is the exact same as the above and reads:

     ***failed;  
    avrdude: verification error, first mismatch at byte 0x0000
             0xcf != 0x0f
    avrdude: verification error; content mismatch
    

    From reading and experimenting, it seems that this is a problem with the lock bits.

    I have been able to upload sketches with my AVRISP mkII with no problem, and have also been able to upload the standard Aruduino Mega 16 MHz bootloader without this error (though of course it won't work -- was just testing to make the verification error go away). I have attempted to modify the makefile for the existing stk500v2 bootloader to include compatibility at 8 MHz, but so far have been unsuccessful -- the bootloader will upload successfully, but I will have timeout() errors when attempting to upload the sketch (so maybe something with the baud rate?).

    For completeness, here is my attempt to change "Makefile" in the "stk500v2" directory of the Arduino source:

    ############################################################
    #       Jun 8,  2014    <ADW> Adding 2560 support: 8MHz
    mega2560_8MHz:       MCU = atmega2560
    mega2560_8MHz:       F_CPU = 8000000
    mega2560_8MHz:       BOOTLOADER_ADDRESS = 3E000
    mega2560_8MHz:       CFLAGS += -D_MEGA_BOARD_ -DBAUDRATE=57600 -DUART_BAUDRATE_DOUBLE_SPEED=1
    mega2560_8MHz:       begin gccversion sizebefore build sizeafter end
                            mv $(TARGET).hex stk500boot_v2_mega2560_8MHz.hex
    

    I haven't yet tried to burn a new bootloader to my Arduino Mega Pro 3.3V (I have the non-mini board but am posting here to keep the topic together) because I'm not sure whether it would be better to try on one of those boards or worse to possibly incapacitate my one USB-programmable system.

    Clearly, someone at Sparkfun got this working for their boards, so I'm going to email their tech support and re-post with what we find out.

    And in case it is useful, I am running Ubuntu 14.04, 64-bit, and am using Arduino 1.0.5.