background image

Copyright

 © 

Kanda 2013

5

AVR microcontroller default fuses

New AVR devices come with the Clock Source set to RC Internal Oscillator by default.
The actual speed of the oscillator varies from 0.5MHz to 4MHz depending on the device.
This means that programs will run slower than expected, because the 

AVR is NOT

running from the 8MHz clock on the STK200 board.

To change the Clock source

go to Fuses and Lockbits tab and change CLKSEL fuses

from Internal Oscillator to External Crystal/Resonator 3 – 8MHz (1110, 1111). Then go to
Device menu > Program > Fuses.

Other features of AVRISP

Auto Program

It can get a bit tedious carrying out all these steps individually, especially if you want to
check that the code has loaded properly (Verify) and program the EEPROM as well. This
is where Device > Auto Program (F5 key) is useful.

To use Auto Program feature, first go to Device > Auto Program Options and set the
operations you want to carry out. Now selecting Device > Auto Program or pressing F5
will carry out all these operations.

Fuses and Lockbits

Click on the Fuses and Lockbits Tab to view the Fuse screen. These are settings on the
Atmega128 that can be altered to affect the way the device runs and interacts with the
circuit.

The default fuses will work happily on the STK300 board, but you may want to alter them
to make the clock run from the 8MHz crystal on the board. Leave 

JTAGEN

 checked to

use emulator. Full descriptions of each fuse and what they do are in the device
datasheet – see Documentation > AVR Datasheets folder on CD for the datasheet on
Atmega128.

On the right of the Fuse screen is a second tab marked Lockbits and Boot Options. This
screen displays the various security settings and block options available. Again, these
are described in the Atmega128 datasheet.

Status

The Status Tab lists the operations that have been carried out during the current
programming session.

Serial Numbers

Serial numbers can be added to the Code space (Flash) or Data Memory (EEPROM) in
a variety of formats. If Auto Program is used, the serial number will increment with every
Auto-program cycle.

View Menu

CRC Checksums

This gives the checksum calculations in different formats for the whole buffer or just the
used buffer. Applies to both Flash and EEPROM

Summary of Contents for STK300

Page 1: ...nt We recommend that you do install these unless you already have them on your PC There are three main pieces of software AVRISP This is the programmer software used for transferring code from the PC...

Page 2: ...nnect up the hardware and program some sample files on to the board using AVRISP before tackling writing code in AVRStudio However it is up to you There is also a book in Kanda AVR folder called Get G...

Page 3: ...12VAC or 9 15VDC with a current capacity greater than 300mA AVRISP software Now run the AVRISP software A Green Light should appear at the bottom of the screen with the message ISP Initialized Detect...

Page 4: ...e procedure or type data directly into the buffer in Hex numbers or ASCII characters Programming the AVR All operations on the AVR chip are carried out from the Device Menu Note AVR devices must be er...

Page 5: ...d Lockbits Click on the Fuses and Lockbits Tab to view the Fuse screen These are settings on the Atmega128 that can be altered to affect the way the device runs and interacts with the circuit The defa...

Page 6: ...rates at 5V If it is off the board operates at 3 3V Notes 1 If the board is set to 3 3V the brownout circuit should be set to 2 9V by removing JP2 2 The ISP interface is supplied with 5V regardless of...

Page 7: ...used in conjunction with the Analog header if Analog to Digital function is used ADC Circuit The ADC circuit uses Port F and the 4 way Header marked Analog To use the ADC with the Internal Reference P...

Page 8: ...nd programming debugging interface next to the mounted AVR chip This connector should NOT be used for normal ISP operations It has the recommended Atmel JTAG Interface pin out and can be used with JTA...

Page 9: ...board is not designed for use with back lit LCD modules so the extra connections needed are not included and the power supply will not supply the current required The LCD can be driven in Memory Mappe...

Page 10: ...ega128 datasheet Pull ups must be enabled on these lines Switches and Bar LED There is a 10 way bar LED fitted to the board One LED is Power labeled ON and should be on when the board is powered The n...

Page 11: ...er The board schematics are also available on the CD AVR Studio AVR Studio is Atmel s development environment Documentation is available in the AVR Studio folder in default install path There is a sub...

Page 12: ...the next screen 1 Set Debug platform to AVR Simulator unless you have an In Circuit Emulator such as our JTAGAVR In this case choose JTAG ICE 2 Set Device to Atmega128 3 Click Finish Button Now the p...

Page 13: ...added to AVR Studio Tools menu if it is installed after AVR Studio The default installer for STK300 will install them in the correct order To run AVRISP from AVR Studio go to Tools Menu Kanda Tools AV...

Page 14: ...ot so fussy otherwise code will not run 2 Changing device in AVR Studio project does NOT change device in C compiler You need to go to Project Configuration Options and change device there as well Als...

Page 15: ...e set Debug Platform to JTAG ICE not AVR Simulator The list of available devices is much smaller as only some AVR devices have the JTAG Interface Choose Atmega128 For more device support and the optio...

Page 16: ...rent version or install a new Service Pack then it may want to do a firmware update using the built in AVRProg software Serial port versions of JTAGAVR will update fine but USB versions will not be fo...

Page 17: ...upply add ons for the STK300 including LCD modules keypads Flash RAM 24C EEPROMs extra mounted Atmega128 devices ICE and a universal power supply Flash RAM and Address Latch see www kanda com go STK20...

Page 18: ...2013 18 Website www kanda com Email sales kanda com Tech support support kanda com Support Pages www kanda com support Phone 44 0 8707 446 807 Fax 44 0 8707 446 807 Address Canolafan Llanafan Aberystw...

Reviews: