[ << ] | [ < ] | [] | [ > ] | [ >> ] |  |  |  |  | [] | [] | [] | [ ? ]

## 3.2 Terminal Mode Examples

Display part parameters, modify eeprom cells, perform a chip erase:

    % avrdude -p m128 -c stk500 -t

    avrdude: AVR device initialized and ready to accept instructions
    avrdude: Device signature = 0x1e9702
    avrdude: current erase-rewrite cycle count is 52 (if being tracked)
    avrdude> part
    >>> part

    AVR Part              : ATMEGA128
    Chip Erase delay      : 9000 us
    PAGEL                 : PD7
    BS2                   : PA0
    RESET disposition     : dedicated
    RETRY pulse           : SCK
    serial program mode   : yes
    parallel program mode : yes
    Memory Detail         :

                                Page                       Polled
      Memory Type Paged  Size   Size #Pages MinW  MaxW   ReadBack
      ----------- ------ ------ ---- ------ ----- ----- ---------
      eeprom      no       4096    8     0  9000  9000 0xff 0xff
      flash       yes    131072  256   512  4500  9000 0xff 0x00
      lfuse       no          1    0     0     0     0 0x00 0x00
      hfuse       no          1    0     0     0     0 0x00 0x00
      efuse       no          1    0     0     0     0 0x00 0x00
      lock        no          1    0     0     0     0 0x00 0x00
      calibration no          1    0     0     0     0 0x00 0x00
      signature   no          3    0     0     0     0 0x00 0x00

    avrdude> dump eeprom 0 16
    >>> dump eeprom 0 16
    0000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|

    avrdude> write eeprom 0 1 2 3 4
    >>> write eeprom 0 1 2 3 4

    avrdude> dump eeprom 0 16
    >>> dump eeprom 0 16
    0000  01 02 03 04 ff ff ff ff  ff ff ff ff ff ff ff ff  |................|

    avrdude> erase
    >>> erase
    avrdude: erasing chip
    avrdude> dump eeprom 0 16
    >>> dump eeprom 0 16
    0000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|

    avrdude>

Program the fuse bits of an ATmega128 (disable M103 compatibility, enable high speed external crystal, enable brown-out detection, slowly rising power). Note since we are working with fuse bits the -u (unsafe) option is specified, which allows you to modify the fuse bits. First display the factory defaults, then reprogram:

    % avrdude -p m128 -u -c stk500 -t

    avrdude: AVR device initialized and ready to accept instructions
    avrdude: Device signature = 0x1e9702
    avrdude: current erase-rewrite cycle count is 52 (if being tracked)
    avrdude> d efuse
    >>> d efuse
    0000  fd                                                |.               |

    avrdude> d hfuse
    >>> d hfuse
    0000  99                                                |.               |

    avrdude> d lfuse
    >>> d lfuse
    0000  e1                                                |.               |

    avrdude> w efuse 0 0xff
    >>> w efuse 0 0xff

    avrdude> w hfuse 0 0x89
    >>> w hfuse 0 0x89

    avrdude> w lfuse 0 0x2f
    >>> w lfuse 0 0x2f

    avrdude>

[ << ] | [ < ] | [] | [ > ] | [ >> ]