background image

 

 

Atmel AVR2060: BitCloud ZigBee Light Link Quick Start Guide [APPLICATION NOTE] 

42004B

AVR

08/2012 

6

2.3 

Programming 

2.3.1  Programming with IAR Embedded Workbench 

2.3.1.1 

Precompiled images 

When using IAR Embedded Workbench to program precompiled images provided with the SDK, the user first needs to 
create a project containing the precompiled image. 

1. 

 Start IAR Embedded Workbench for AVR. 

2. 

 Select 

File > New > Workspace

3. 

 Select 

Project > Create New Project…

 

4. 

 In  the 

Create New Project

 dialog, select 

Externally build executable

 in 

Project templates

5. 

 Select a name for the project, and click 

Save

6. 

 Follow the instructions in 

readme.txt

7. 

 Once the project is set up, select 

Project > Options

8. 

 In  the 

General options

 category, set 

Processor Configuration

 to –

cpu=xm256a3

ATmega128RFA1

9. 

 Click 

OK

10. 

 Select 

JTAGICE

 

mkII

 

>

 

Fuse

 

Handler

 (

JTAGICE 3 > Fuse Handler

). 

11. 

 Click 

Read

 

Fuses

, and make sure that the device fuses are set as specified in Section 

2.2.2

12. 

 If fuses are set incorrectly, select the correct fuse settings, and click 

Program

 

fuses

13. 

 Select 

Project > Download and debug

14. 

 Once the debugging session has started, click 

Stop debugging

The image is now installed on the board. 

2.3.1.2 

Application workspace 

1. 

 Double-click on a workspace (for example, 

ZLLDemo.eww

), and select 

JTAGICE mkII > Fuse Handler

 

(

JTAGICE

 

3

 

>

 

Fuse

 

Handler

). 

2. 

 Click 

Read

 

Fuses

, and make sure that the device fuses are set as specified in Section 

2.2.2

3. 

 If fuses are set incorrectly, select the correct fuse settings, and click 

Program

 

fuses

4. 

 Select the desired application configuration from the drop-down box in the 

Workspace

 pane. 

5. 

 Select 

Project > Download and debug

6. 

 Once the debugging session has started, click 

Stop

 

debugging

The image is now installed on the board. 

Note: 

 

Using a JTAG to program the microcontroller will erase the embedded bootloader, if present. As a result, loading of 
application images with Serial Bootloader will become inoperable until the embedded bootloader is loaded to Atmel 
ATmega128RFA1 again. 

2.3.2  Programming with Atmel AVR Studio 

1. 

 In AVR Studio

®

, open the 

Tools > Program AVR > Connect…

 dialog. 

2. 

 Choose Atmel AVR JTAGICE mkII (JTAGICE 3) for 

Platform

: and USB for 

Port

:, and click 

Connect

… 

3. 

 Select the right device in the Device and Signature Bytes field on the 

Main

 tab of the programming dialogue. 

4. 

 Click on the 

Fuses

 tab and make sure that the device fuses are set as specified in Section 

2.2.2

5. 

 If fuses are set incorrectly, select the correct fuse settings, and click 

Program

6. 

 Click on the 

Program

 tab. 

7. 

 In the Flash section of the dialog, select the precompiled 

.hex

 file to be programmed. 

8. 

 Click 

Program

The image is now installed on the board. 

Summary of Contents for AVR2060

Page 1: ...of the BitCloud ZigBee Light Link software development kit SDK a software package for developing ZigBee Light Link profile applications Chapter 1 gives an overview of the software package and support...

Page 2: ...6 2 3 1 1 Precompiled images 6 2 3 1 2 Application workspace 6 2 3 2 Programming with Atmel AVR Studio 6 3 Demo application 7 3 1 Launching the demo 7 3 2 Color light s functions 7 3 2 1 Touch link wi...

Page 3: ...ific API definitions BitCloud lib BitCloud compiled libraries Applications ZLLDemo Demo application s sources and projects Evaluation Tools ZLLDemo Demo application s pre compiled images Documentation...

Page 4: ...s used with BitCloud may be found in 3 or 4 2 2 Hardware configuration 2 2 1 Assembling devices Both color scene controller and color light use RCB128RFA1 RCB as a base board For a color scene control...

Page 5: ...d fuse bits settings are shown in Table 2 1 Table 2 1 Fuse bits for Atmel ATmega128RFA1 Option Required value for 8MHz Required value for 16MHz BODLEVEL 1V8 1V8 OCDEN Enabled Enabled JTAGEN Enabled En...

Page 6: ...n a workspace for example ZLLDemo eww and select JTAGICE mkII Fuse Handler JTAGICE 3 Fuse Handler 2 Click Read Fuses and make sure that the device fuses are set as specified in Section 2 2 2 3 If fuse...

Page 7: ...lor light are needed More devices lights or controllers may be added as required Assemble devices as described in Section 2 2 1 Program devices with pre built images of the demo application via JTAG a...

Page 8: ...ify command to the color light which blinks several times with its LEDs or the LCD screen The touch link procedure may be aborted at this moment if the PWR button is released To complete the procedure...

Page 9: ...all scene if pressed for less that three seconds 7 8 9 Set minimum middle maximum light level 4 Triggers network update the color scene controller applies a standard ZigBee mechanism to select a new o...

Page 10: ...te If touch link between controller devices is not performed pairing a new controller device with a color light that is already in the network will cause the color light to leaving this network and fo...

Page 11: ...ene E Add Scene Remove Scene Store Scene hold Recall Scene Add Scene E Add Scene Remove Scene 4 5 6 Network Update Read ZLL version Trigger Breathe Trigger Finish Trigger Stop 7 8 9 MoveToLevel MoveTo...

Page 12: ...by color light and color scene controller Such file initializes structures needed for the cluster and implements callback functions that are called to indicate commands responses For example see the...

Page 13: ...ght Link Profile Specification Version 1 0 2 AVR2056 BitCloud Profile Suite Developer Guide 3 AVR2052 BitCloud Quick Start Guide 4 AVR2055 BitCloud Profile Suite Quick Start Guide 5 AVR2104 RF4CE EK R...

Page 14: ...y this document or in connection with the sale of Atmel products EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE ATMEL ASSUMES NO LIABILITY WHATSOEVER AND D...

Reviews: