Wiring bootloader V1. (STK500 compatible)
    for Wiring board

    supported all Wiring software

    Base on Jason P. Kyle 's stk500boot.c bootloader,
    I put some code for "wait timer (8 sec.)" like Wiring board V1 Bootloader
    and another build for "Push button switch" enter mode "Bootloader" or "Run"
    on powering (need only pin for switch but zero waiting waste time..)

    Note: this bootloader purpose to work uisp and avrdude which using on Wiring only, not for AVRStudio STK500 plugins..

    Update 2 (20080412): change LED to PG0 (Wiring Board original used)
    Update 1 (20080321): Enable Universal SPI for AVRDUDE signature read
      when using AVRDUDE, may be called like this:
      > avrdude -c stk500 -p m128 -P com5 -b 115200 -D -V -U flash:w:test.hex -u -q

    Compiled code
      LED PG0
    • Use Wait timer method (about 8 sec.) to enter bootloader with active high LED indicate on PG0
    • Use active low Push button switch on PE2 to enter bootloader with active high LED indicate on PG0

    • LED PG2
    • Use Wait timer method (about 8 sec.) to enter bootloader with active high LED indicate on PG2
    • Use active low Push button switch on PE2 to enter bootloader with active high LED indicate on PG2

    Source
    Wiring bootoader V1 modified source code of STK500V1 for Wiring board (Update 1)

    See Fuses setting below

    Wiring bootloader V2. (STK500V2 compatible)
    for Wiring board

    supported Wiring 0014 or later software

    Original from Peter Fleury's STK500V2 compatible bootloader,
    I put some code for "wait timer (8 sec.)" like Wiring board V1 Bootloader
    and another build for "Push button switch" enter mode "Bootloader" or "Run"
    on powering (need only pin for switch but zero waiting waste time..)

    Update 2 (20080412): change LED pin to PG0
    Update 1 (20071229): using CMD_SPI_MULTI and return 0x00 for all un-implemented command, for AVRDUDE happy and get work
      when using AVRDUDE, may be called like this:
      > avrdude -c stk500V2 -p m128 -P com5 -b 115200 -D -V -U flash:w:test.hex -u -q

    Compiled code
      LED PG0
    • Use Wait timer method (about 8 sec.) to enter bootloader with active high LED indicate on PG0
    • Use active low Push button switch on PE2 to enter bootloader with active high LED indicate on PG0

    • LED PG2
    • Use Wait timer method (about 8 sec.) to enter bootloader with active high LED indicate on PG2
    • Use active low Push button switch on PE2 to enter bootloader with active high LED indicate on PG2

    Source
    Wiring bootoader V2 modified source code of STK500V2 for Wiring board (Update 1)

    Fuse setting is same as Wiring Board
      Extended: 0xFF
      High: 0xCC
      Low: 0x3F

      Important bit fuse
      Boot Flash size 1024 words : BOOTSZ=10
      Boot Reset vector enable : BOOTRST=0
      CKOPT=0
      BOD at 4.0V, : BODLEVEL=0
      BOD enable : BODEN=0
      Ext. crystal/resonator High Freq.; Start-up time 16K CLK + 64ms. : CKSEL=1111 SUT=11
      Watchdog disable: WDTON=0
      OCD disable: OCDEN=0
      JTAG disable: JTAGEN=0
      SPIEN enable: SPIEN=0

    If any comment or suggestion, mail to me at
    dev [AT] avride.com

    Worapoht Kornkaewwattanakul
    Bangkok, Thailand



    Reference :
    Wiring is an open project initiated by Hernando Barragan. see more detail on http://www.wiring.org.co.



    Creative Commons License Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.