Home

TKScope Emulator for AVR User Manual

image

Contents

1. Iw cache code cache data rbreak Iw use software break point r Clack mode a Se C auto speed e fixed speed Jtag 1 0000 se MHz Hardware reset options ms reset hold use SRST use TRST ms reset restore Cancel Figure 3 14 Main Options 1 Cache Cache Config is user to solution the screen and emulator speed If choose the cache screen will be bush afer user pograming is running it can be faster the dissplay spped but if a operation can course the data change may not display in time If not choose cache user any operate will course the data brush the screen but the speed will be slow cache code Use Code Cache cache data Use Data Cache Suggest user set as the default settings only choose cache code 2 Break use software break point Select ths item can use no limit flash breakpoints 3 Clock Mode auto speed Auto selects the enable highest speed fixed speed Use the user input JTAG frequre Jtag Choose JTAG frequre only in the fixed speed effect In order to may theTarget device run correct JTAG Frequre should be slow than the system clock 1 4 or more slowly 4 Hardware reset options user SRST Use the Harware System Resset nSRST user TRST Use the Harware JTAG Reset nTRST 8 bit AVR device has not JTAG reset pin so this setting is reserve reset hold Select rese hold time in ms reset restore Select reset restorer time in ms Application
2. EI Please read the following license agreement Press the PAGE DOWN key to see the rest of the agreement MICROSOFT VISUAL C 2005 RUNTIME LIBRARIES These license terms are an agreement between Microsoft Corporation for based on where vou live one of its affiliates and you Please read them They apply to the software named above which includes MICROSOFT SOFTWARE LICENSE TERMS a the media on which vou received it if any The terms also apply to any Microsoft updates supplements Internet bazed services and support services for this software unless other terme accompany those tems If so those terms apply By uzing the software you accept these terms IF you do not accept Do you accept all of the terme of the preceding License Agreement If you choose Mo Install will close To install you must accept this agreement Figure 3 3 Install VC8 Run Lib Now the emulator drivers install finish In the install folder this example is DATKSITKScope you can see the DI files as Figure 3 4 Se TKScope THO SD SEV sai TAG BO Oe O BD Der prx E A EE Seis ar Hite oi e D TES TKS cope VPA PES 3 oP SEH d Irma SET S ProgConfig dl1 Ki ProgConfig opt EE readme txt S TESCP_DRV_8051_for_AGDI dll X TKSCP_DRV_8051_for_IAR_v5 dll X TKSCP_DRV_ALL_for_AGDI d11 S TKSCP_DRV_ARM_for_IAR_v4 dll 5 TKSCP_DRV_ARM_for_IAR_v5 dll X TKSCP_IRV_AVRS for ACHT
3. ATtiny24 ATtiny24A ATtiny44 ATtiny44A ATtiny84 ATtiny84A a ATtiny261 ATtiny261A ATtiny461 ATtiny461A ATtiny861 ATtiny861A ATtiny87 ATtiny167 m ATIOPWM2 ATIOPWM2B AT9OPWM216 m AT90PWM3 AT90PWM3B AT90PWM316 m ATIOUSB82 AT9OUSB162 Alxmega64A1 ATxmegal28Al1 ATxmega64A3 ATxmegal28A3 ATxmegal92A3 ATxmega256A3 ATlxmega256A3B m ATxmegal6A4 ATxmega32A4 ATxmegal6D4 ATxmega32D4 ATxmega64D3 ATxmegal28D3 ATxmega192D3 ATxmega256D3 More devices will be support in the near future TKScope emulate AVR device use the POD is POD JTAG AVR P10 Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 i Rev 1 02 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide HO Lmae t I i i EE on AN Figure 1 1 POD JTAG AVR P10 1 2 AVR Emulator Feature TKScope AVR emulator feature USB2 0 High Speed communication interface fast prommning speed save your developing time m JTAG programming speed is ATMEL s JTAGICE mkII 2 8 times ISP 1MHz clock speed is ATMEL s JTAGICEmkII 4 7 times Support K Flash programming software support fast speed promming Support programming Flash EEPROM Fuse LockBits Support all MEGA device JTAG programming and debuge Support all debug WIRE device debug Support ISP programming Support XMEGA device PDI programming and debuge Auto detect AVR Studio Vers
4. dll TKSCP_DRV_tor_IAR opt 2 TESCP_DRV_for_RDI d11 X TESCP_SRV_for_AGDI d11 NES XJ UL2ARM_TESCP_DRY_ARM_for_AGDI d11 TEScope THE 2c AHA 2009 08 07 9 57 KA 232 KB 1 KB 1 KB 3 740 KB 468 KB 5 244 KB 328 KB 476 ER 2 920 KB 468 KB 1 KB 38 KB 200 KB 4 428 ER eH TIE WTF RAGS RS OPT Ti MAMA WRAL E NAAT E RAREST E NARS RS NARS E RAREST E RAREST RS OPT 20 RAREST E MARS E RAREST RS 60 ARE 2009 08 07 9 56 2009 08 07 9 56 2009 07 30 17 36 2009 08 08 9 45 2009 07 03 10 39 2009 08 08 9 22 2009 08 08 9 24 2009 08 08 9 21 2009 06 13 10 30 2009 08 08 9 24 2009 08 08 9 17 2009 08 08 9 15 2009 08 08 10 26 2009 08 08 9 15 2009 08 08 9 15 2009 08 08 9 19 Baa 18 1 MB d RED Figure 3 4 Driver Files After setup the driver you can see the dll files in the folder the driver file as Table 3 1 Table 3 1 Driver for IDE TKSCP_DRV_AVR8_for_IAR_v5 dll AVR In IAR V5 Version Driver Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 21 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide 3 2 Install USB Driver When you connect the TKScope emulator whith you computer through the USB interface the first time you need to install the TKScope USB driver how to install the driver you can reference the 2 2Install USB Driver and you also you fine the driver files in the TKScopeSetup_AVR8 EXE
5. 02 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide JTAGICE mkII in JTAG mode with ATmegal Main Progran Fuses LockBits Advanced Hi Settings Hit Info Auto Erase Device Read Si gnature levice and Signature Bytes lt TATm egal Programming Mode and Target Settings iti a SE Est 1 000 MHz Daisy Chain Disabled Changes to daisy chain settings are only valid from the next time the moo gt eboc o gt de ooo ao Setting device parameters UK Entering programming mode FAILED Leaving programming mode DE Getting revisions OF Figure 2 25 Program Dialog In the programming dialog other tags you can program the Flash EEPROM Fuse Lock bits and read the calibrate bytes and so on 2 9 Exit TKScpe Service When you stop debugging and leave programming if you want to use IAR K Flash you should exit the TKScope service then other software can use the emulator Right click the service icon select Quit and then you can use other software Show Hi de Figure 2 26 Exit TKScope Service Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 19 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide Chapter 3 Simulation AVR in IAR 3 1 Install Driver In the IAR use TKScope emulator should install the driver Double click TKScopeSetup_AVR8 EX
6. 26 Seeche 26 SD WAI E 26 SEET 28 See 28 BAO Pro er EE 29 o Eet 31 3 5 IK 31 aL WC EE 32 BO POOP IG A A A OO O II dane caguena dou dddunvendusaadendtinacsoes 34 Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2010 02 10 Rev 1 02 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide Chapter 1 TKScope Emulator Introduction 1 1 AVR Emulator Support Devices TKScope emulator able to support AVR core simulation models are summarized as follows K Series K8 K9 DK Series DK9 DK1O AVR emulator support AVR emulate Atmel AVR device which has JTAG port and all device ISP the emulator suppor the device as follows ATlmegal6 ATmegal6A ATmegal62 m ATlmegal65 ATmegal65P ATmegal65PA ATlmegal69 ATmegal69P ATmegal69PA m ATmega32 ATmega32A ATmega323 a ATlmega325 ATmega325P ATmega3250 ATmega3250P ATmega329 ATmega329P ATmega329PA ATmega3290 ATmega3290P a AlTmega64 ATmega64A ATmega644 a ATmega645 ATmega6450 ATmega649 ATmega6490 ATmega640 ATmegal280 ATmegal281 ATmega2560 ATmega2561 m ATmegal28 ATmegal28A ATmegal64P ATmegal64PA ATmega324P ATmega324PA ATmega644P ATmega644PA ATmegal284P m ATIOCAN32 ATIOCANG4 ATIOCAN 128 AT90USB646 AT90USB647 AT90USB1286 AT90USB1287 ATmega48 ATmega48A ATmega88 ATmegassA ATmegal68 ATmegal68A ATtiny13 ATtiny13A ATtiny2313 ATtiny2313A ATtiny4313 ATtiny25 ATtiny45 ATtiny85
7. Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 21 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide 3 4 3 Aux options Click Figure 3 11 Aux options enter the Aux Setup as Figure 3 15 Aus Setup program config data Iw stop Timer in Debug Cancel use SPI when prog Flash Figure 3 15 Aux Setup Program config data After downloaer program config the Fuse as the AVR device Fuse Config 1s can be save after chip erase so this option is only select when use K Flash in program In the mulat not program config to save time Stop Timer in Debug Whether the device in stoped mode timers running Use SPI when prog flash Whether use ISP program flash Only in K flash available use the ADP AVR P10 P6 adapter 3 4 4 TAP cofig Click Figure 3 11 TAP config enter the Figure 3 16 TAP setting dialog TAP config JTAG Device Chain IL ODE Device name Ox0970203F ATmega 0x0940303F ATmega Gei Automatic Detection O Manual Configuration D Figure 3 16 TAP Setup TAP configations to setup the JTAG chian include number of devices IR length active device It s important to setup when there is unkown device in the JTAG chian Normally Automatic Detection option will be ok Automatic Detection Setup scans chian automatically Manual Configuration Setup manually Devices list List all devices in scan cha
8. as Atmel s define as Figure 1 3 TCK GND TDO VTref MISO VCC TMS nSRST SCK MOSI nTRST RESET GND TDI GND ISP6PIN Figure 1 3 JTAG amp ISP Interface We suggest use the 6PIN ISP connects when you use the debugWIRE simulation Notice the Adaptor RESET pint connects to TMS NOT nSRST The APD _AVR_P10_P6 connect as Table 1 1 Table 1 1 ADP _AVR_P10_P6 signal connect um em fT om rum OOOO O Pin5 TMS Pin5 REST Pin5 debug WIRE Pins PDI CLK Pin9 TDI Pin4 MOSI e Pin4 PDI DATA Tips We can see when use PDI signal Vcc GND PDI_CLK is the same with ATMLE s define but PDI_DATA is use pin 4 NOT pin 1 you need connect you target board pin and pin4 to use the adaptor Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 E Rev 1 02 Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide 1 2 DATA vcc N C N C CLK GND PD Figure 1 4 PDI Hardware connect Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 4 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide Chapter 2 Simulation AVR in AVR Studio 2 1 Install Driver The Driver is only for AVR Studio befor you install this driver sugest you install AVR Studio Support AVR Studio 4 13 or later Double click Setup_TKScope_AVRStudio EXE the system pop up dialog box a
9. comp_a90 h gt Files O M16 De v Ha E main cpp root eeprom unsigned char a 256 0x20 0xA6 0 I 3 4 5 6 7 SJ 9 10 La E Output _ root flash unsigned char code 0x3E00 0 Debu pragma vector USART_RXC_vect __ interrupt void UART_REC void UDR UDR Mon Aug 10 13 38 51 2009 Load TKScope for IAR 1 06 2006 01 Sete Bel 7 Figure 3 22 Setup Finish After enter debug environment as Figure 3 23 click View menu select Register you can see the register others are the similarity Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 33 Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide IAR Embedded Workbench IDE File Edit MAMA Project Debug TKScope Tools Window Help DG RH Messages ec TEBA AAA EAS E E Workspace z i j SS S 7 gt 71812 3 A Source Browser Workspace cs RER EE EE root eeprom unsigned char a 256 0x20 0xA6 Goto gt CODE gt B cru Registers gt Disassembly 0x4A06 Henory _ root flash unsigned char code 0x3E00 0 Y 0x0080 Symbolic Memory TCC L ie Z 0x0000 SREG 0x00 003E90 TCCR2 R16 Watch pragma vector USART_RXC_vect F FE SP O0x009D Locals interrupt void UART_REC void 003E92 R16 0xFE PC Ox3E8C rae T 003E94 BD03 OUT OCR2 R16 CYCLES
10. do nat support USB Space Required on C Space Available on C sta Sl a y Figure 2 10 Instal AVR Studio USB driver Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 9 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide After Install it you can fine the USB driver int the AVR Studio install path for example C Program Files Atmel AVR Tools there is a folder name usb this folder is AVR Studio USB driver If you had not install USB driver when install AVR Studio please Install AVR Studio again Befor start up the IDE you should turn on the emulator and connect with your computer through USB interface click AVR Studio with TKScope The first time need install JTAG ICE mkII Driver as shown in Figure 2 11 in the dialog choose Install from a list or specific location Advanced click Next Found New Hardware Wizard This wizard helps pon install software for JTAGICE mil fe If your hardware came with an installation CD EH or floppy disk insert it now What do vou want the wizard to do Click Next to continue RER Ca Ci DC taa Tse Figure 2 11 Install JTAG ICE mkll driver Choose Include this location in the search In the explorer select AVR Studio install path the USB folder click Next Found Mew Hardware Wizard Please choose your search and installation options ES Search for
11. the best driver in these locations Use the check boses below to limit or expand the default search which includes local paths and removable media The best driver found will be installed Search removable media flappy CO AOM Include this location in the search C Program Files Atmel AVR Toolstusb d 0 Don t search will choose the driver to install Choose this option to select the device driver from a list Windows does not guarantee that the driver vou choose will be the best match for your hardware lt Back IL Net JI Gesi Figure 2 12 Select install path Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 e Rev 1 02 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide Waiting the system install finish you can see the Figure 2 13 dialog box click Finish to finish the driver install Found New Hardware Wizard Completing the Found New Hardware Wizard The wizard has finished installing the software for JTAGICE mkll Click Finish to close the wizard Cancel Figure 2 13 Finish install After install you can see the taskbar the icon as Figure 2 14 when AVR Studio communicate with TKScope this icon wil be flash Figure 2 14 AVR Studio TKScope Service 2 4 Start Debugging In AVR Studio after builded success click Start Debug Figure 2 15 AVR Studio will setting the emulator parameter and made
12. 0 Statics PORTI RO 0x00 Auto UDR ee 003E96 E000 LDI R16 0x00 R1 0x00 eege 003E98 Sen OUT PORTD R16 R2 0x00 Quick Watch 003E9A EFOC LDI R16 0xFC e a Dee Call Stack void delay unsigned int t 003E9C BBO1 E oUr DDRD R16 RE SCC Terminal I 0 ae i R6 0x00 Code C a unsigned int i 0 EEPUT 0x05 temp Et temp Zl EEPROM thi 0x05 R 0x00 Profiling while t D03EA R21 Ox00 R8 0x00 Stack me D DO3EA4 2 R16 R18 R3 0x08 for i 0 i lt 1000 i 003EA6 940E 1FB9 CALL __eeput8_16 R10 0x10 Toolbars gt z0 R11 0x80 v Status Bar DO3EAA E020 IDI R18 0x00 R12 0x00 003EAC E045 un R20 0x05 pia e Us R14 0x00 003EAE E050 LDI R21 0x00 R15 SC 003EBO 940E 1FAD CALL _ _eeget8_16 rie D 0201 003EB4 2F20 MOV R18 R16 Vx TCNT R17 0x00 003EB6 E000 LDI R16 0x00 R18 0x03 int nain void 003EB8 E010 LDI R17 0x00 R19 0x00 003EBA BD1D OUT 0x2D R17 R20 0x01 O ees 003EBC BDOC OUT TCNT1 R16 R21 0x03 OxFE GA 003EBE EE08 LDI R16 OxE8 p22 0x00 F 003ECO E013 LDI R17 0x03 R23 0x00 PORTD 0x00 003EC2 BDIB OUT 0x2B R17 R24 0x9 DDRD OxFC 003EC4 BDOA OUT OCR1A R16 R25 0x01 003ECE F000 mg ai 0 00 pze 0x06 P US o unsigned char tenp MAN 003EC8 BDOF OUT TCCR1A R16 RZ Ge kd EE 9 exp SE RON Horo 003ECA E009 IDI R16 0x09 R29 0x00 003ECC BDOE OUT TCCR1B R16 R33 De 0x0 TCCR2 1 lt lt WGM21 1 lt lt COM20 7 lt lt Ox EE E n n2EC
13. CR2 7 lt lt CS20 a Ecru a E EEPROM MCUCR 1 lt lt SE 0 lt lt SM2 1 lt lt SM1 0 lt lt SMO a Sy EXTERNAL_INTERRUPT sleep_cpu 4339 JTAG calas dp a 2 PORTA unsigne char 1 5 while 1 4 2 PORTE 4 2 FORT for i 0 i lt 4 i a 2 PORTD 4 39SPI PORTD 1 lt lt i 2 4 amp TIMER_COUNTER_O PORTB 0x00 4 TIMER_COUNTER_1 PORTC 0x00 4185 TIMER COUNTER 2 PORTA 0x00 4 del asf ID Address Value Build O message ATmegal Auto Ln 112 Col 26 CAP NUM OVR Figure 2 23 Coonect AVR Programmer Select AVR Programmer Platform STESO0 AW RISP AWRISP mel JTAGICE ml Baud rate 115200 Baud rate changes are Tip To auto conmect to the programmer used last time press the Programmer active immediately button on the toolbar Note that a tool cannot be used for programming as long as itis connected in a debugging session In that case select Stop Debugging first Disconnected Mode Figure 2 24 Select AVR Programmer Connect with emulator successful system will pop up the Figure 2 25 dailog In the Device and Sigature Bytes select the target device Programming Mode and Target Settings select the programming mode Notice when use ISP mode needs the Addapt P10 P6 connect with the target device use the IDC6 cable Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 i Rev 1
14. Cursor Stop Watch Ej Auto Step SREG Registers Next Breakpoint Reset Step Into Y pointer Z pointer Step Out New Breakpoint Toggle Breakpoint Remove all Breakpoints Trace gt Show Next Statement d Quickwatch Saver GCC Processor Message Loaded plugin STE500 Loaded plugin AYR GCC Loaded partfile D Atmel AVR Tools PartDescriptionFiles ATmezgal6 Loaded objectfile F Emluator AVR_CODE M16 C default main elf Select Platform and Device Up Download Meme lt ij E Build O Message AH Find in Files E Breakpoints and Tracepoints M PEL gt SLES HE E E 23 zl x Ctrl Shift F5 FS Shift FS Fil F10 Shift F11 Ctri F10 Alt FS Ctrl F9 COM20 7 lt lt CS20 F9 2 1 lt lt SM1 0 lt lt SMO Alt Num Shift F9 DiWinAWR avrlincludeiutilldelay h JTAGICE mkII Options alt o_ 15 ATmegal6 JTAGICE mkII UO View 3 Jl 2 ANALOG_COMPARATOR EY Value Name JD AD_CONVERTER JD ANALOG_COMPARATOR a E BOOT_LOAD acru 4 E EEPROM 4 CZ EXTERNAL_INTERRUPT aAA JTAG 4 2 PORTA 432 PORTE a 2 Portc 42 PORTD Ee 4 amp TIMER_COUNTER_O 4 TIMER_COUNTER_1 4 amp TIMER_COUNTER_2 ha L Address 0x11 0 0x10 0x12 0 Value Bits 0x00 DODODODOO 0x03 CODO 0 00 DODODODO Name 52 PORTD be Auto Stopped Ln80 Coll CAP NUM OVR Figure 2 17 Debug parameter Setting The
15. E system will pop up the Figure 3 1 daigure box click Next to install Setup TEScope AYES 1 00 Welcome to TEScope Release 722009 This SETUP program installs TKScope AYR 1 00 This SETUP program may be used to update a previous product installation However you should make a backup copy before proceeding It recommended that you exit all Windows programs before continuing with SETUP Follow the instructions to complete the product installation TkScope Setup i Cancel Figure 3 1 Install Emulator Driver The driver can be installed in the path which you want to as Figure 3 2 Setup TEScope AYES 1 00 Folder Selection G Select the folder where SETUP wall install files TKSco pe TEScope SETUP will install in the following folder To install to this folder press Next To install to a different folder press Browse and select another folder Destination Folder DATE Browse Scope Setup Figure 3 2 Select Install Path After install the drivers suggest user install the Microsoft VC8 run lib Double vcredist_x86_en exe sytem will dislay Figure 3 3 the dialog box Click Yes system will finish setup automation Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 20 Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide Microsoft Visual C 2005 Redistri
16. E F1INF TDT RIA fixiF w lt il 0 cl Log Mon Aug 10 15 15 19 2009 TKScope for IAR 1 06 2008 01 Mon Aug 10 15 15 23 2009 Loaded debugee FiEmluator AR Code M16_P Debug Exe M16 d90 Mon Aug 10 15 15 24 2009 Target reset Debug Log Build Breakpoints x Open a new Register window Ln 22 Col 14 J H AF Figure 3 23 Debug Widows In IAR environment you can modify the use code in memory window and you can set breakpoint when the target device is running 3 5 2 Stop Debug If you want to stop debug click button 2 can exit the debug mode Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 al Rev 1 02
17. Electronics CO LTD Date 2011 02 10 gp Rev 1 02 En y Guangzhou Zhiyuan Electronics CO LTD TKSco e Emulator TKScope Emulator For AVR User Guide Configure No lock SPM and LEM in Application Section ll No lock SPM and LPM in Boot Section Read frite Verify Erase Default Cancel Figure 3 18 Configure Lock The last tag is use to read the RC oscillator calibrate bytes and write the calibrate byte to Flash or EEPROM in a fix address Configure Write Cal Byte Calibration Byte 1MHz Write Space Mot Write Calibration Byte Write Address Di Read Write Verify Erase Default ox Cancel Figure 3 19 Configure Cal Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 30 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide The dialog has 6 bottoms the funtion of buttons as Table 3 2 Table 3 2 Configure Button function Read the confige in the target board and brush the Read window Read the config data from target device and compare Verify with the dialog box 3 4 6 TKScope doctor Click Figure 3 11 TKScope doctor enter the TKScope doctor TKScope doctor s function is very powerful detecting own hardware init USB communication hardware reset and reading AVR core ID 100000 times Notice Use the TKScope doctor need in JTAG Mode NOT use the ADP AVR P10 P6 adapter MA HA
18. RE EEE EE EE EE EE EE OE OO aba Check Hardware init OK Hardware Init Sucessful bat cta t cbs EO EOE ai at eta ts ets t ets t eis et eta et eks eta cta ut ts eta cis ei ct eta ts eis t eks t Es ta Check communication speed Speed Check 525 KBytes s 2720 KBytes transmitted Figure 3 20 TKScope doctor 3 5 Debug After config finish now you can start debugging Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 31 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide 3 5 1 Debug Tools In IAR IDE after driver installs and setup parameter you can start debugging the debug tools as Figure 3 21 mW SlsS el a H22 BD Figure 3 21 Debug Tools 4 Debug ni ti Make Li Toggle Breakpoint Ki Reset 3 Break El Step Over el Step Into EI Step Out El Next Statement Run to Cursor Go 3 Stop Debugging After settup drivers and parameter as Figure 3 22 return to IAR IDE click Make then press Debug in the debug mode Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 32 d Ze Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide D IAR Embedded Workbench IDE Em tx File Edit View Project TKScope Tools Window Help Deg rel CERA Ae E ES AEREOS x PAA include lt ioavr h gt include lt intrinsics h gt include lt
19. Setting has 4 tags the Connect tag is use to setting connect options use to setting JTAG frequency and daisy chain before enter debug mode AVR Studio will set this parameter Notice change JTAG frequency should be slower than 1 4 of target frequency The Disable debugWIRE boton is effect when use debugeWIRE simulation for disable debugeWIRE function and reable ISP when press this botton IDE will exit debuge mode Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 13 Rev 1 02 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide JTAGICE mkll Connection Debug Status DAN JTAG connection Target clock frequency CE gt Accurate specification of the target device s clock frequency is necessary in order to corectly set the JTAG port clock frequency Over specitying this parameter will cause JTAG communications Failure Daisy chain Target device is part of a JTAG daisy chain Devices before jo Instruction bits before fo Devices after jo Instruction bits after jo COM Port debug IRE Baud rate 119200 default Disable debugwlRE D Cancel os Figure 2 18 Connection The second tag use setting the debug options as shown in Figure 2 19 JTAGICE mkil Connection Debug Status HAM Preserve EEPROM contents when reprogramming device Always activate external reset when reprogramming device Print breakpoint
20. Sy EXTERNAL_INTERRUPT 2 JTAG 4 2 PORTA 4 2 Ports 4 2 Portc a 2 PORTD Sit 4 amp TIMER_COUNTER_O 4 amp TIMER_COUNTER_1 TIMER_COUNTER_2 ITAGICE mkII Name Address Value Auto nde Cl CAP NUM OVR After enter debug mode you can see the debug widows as Figure 2 16 and this window can be open throgh the menu View gt Toolbars AVR Studio F Emluator A R_CODE E16_C main c B File Build Edit Debug Window Help ARESA T AE E AAA Trace Disabled RS AG ke E i A e O ao E Sir delay4 m Project view Tools Processor Hame Value Program Counter Ox001F92 Stack Pointer Ox045F X pointer 0x00C4 Y pointer Ox045F Ox3FDO Cycle Counter 0 int main void ff woid 0x0000 unsigned char tmp PORTD Debug toolbars Z pointer 0x00 OxFC Ox1C Ox1D SPMCR 0x05 Frequency Stop Watch SREG Registers DIER Code Widow MCUCSR 0x80 MCUCSR 0x80 TCCR2 1 lt lt WGM21 1 lt lt COM20 T lt lt C520 OCR2 OxFE f f TCCR2 T lt lt CS20 Regetor window ai MCUCR 1 lt lt SE 0 lt lt SM2 1 lt lt SM1 O lt lt SMO sleep_cpu y 4 gt Saver GCC Processor B F Emluator A R_CODE M16_C main c El DiYWinAYRavrlincludeiutilldelay h dE Mes ag YX Loaded plugin STKSO0 Loaded plugin AVR GCC Loaded partfile D Atmel AVR Tools PartDescriptionFiles ATm
21. TKScope Emulator for AVR User Manual Note ANO5220023 V1 02 Date 2011 02 10 Application Note MN Keywords TKScope AVR IAR AVR Studio Summary TKScope Emulator for AVR User Manual Guangzhou Zhiyuan Electronics CO LTD Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide The revision of history 2009 09 03 Create a document 2010 08 11 Support All 8bit AVR Device 2011 02 10 Support JTAG Chain Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 1 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide Table of Contents Chapter 1 TKScope Emulator Introduction ooooccccnncccnnnononnnnnnnnnnnonnnonnnnnnnnnnnnnnnanonnnss 1 1 1 AVR Emulator Support Devices 1 1 2 AVR Emulator AAA mr EEC O a E 2 1 3 AVR Emulator Support IDE Fnvronment 2 1 4 MING auto TE SCO e E pon 3 Chapter 2 Simulation AVR in AVR Studio 5 2 1 MVS ND E E A AE E EA E E EE E EE E E O 5 2 2 DiS GAM RRE 7 2 5 Install STAGICEMKID drwver 9 2 4 A NG ee 11 2 5 Setting Emulator Parametet titi 13 2 6 De UI TOC erse UN O E spunas dnasonesiacmaaastachinenseasanassnasonahaeamaeas snes 16 27 DO Ree E 17 2 8 Use AVR ee Ree E 17 2 9 E ai ER e 19 Chapter 3 simulation AVR mM IAR ela idas oda aE E 20 3 1 Tostal DIVET eege 20 32 AI A O E II 22 3 3 ADIN del E E E E E 22 3 4 Emulator Parameter Se e noite
22. ation process Cancel Figure 2 4 Install VC9 Run Lib In the license terms dialog choose I have read and accept the license terms then click install to start setup up Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 6 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide jis Microsoft Visual C 2008 Redistributable Setup Ei License Terms Be sure to carefully read and understand all the rights and restrictions described in the license terms You must accept the license terms before you can install the software MICROSOFT SOFTWARE LICENSE TERMS MICROSOFT VISUAL C 2008 RUNTIME LIBRARIES 556 1464 AND x64 These license terms are an agreement between Microsoft Corporation or based on where you live one of its affiliates and you Please read them They apply to the software named above which includes the media on which you received it if any The terms also apply to any Microsoft e Press the Page Down key to see more text Figure 2 5 Accept the license terms and Install 2 2 Install USB Driver When you connect the TKScope emulator whith you computer through the USB interface the first time the system will pop up dialog box as shown in Figure 2 6 Found New Hardware Wizard This wizard helps you install software for HITUAN TES cope E series Universal Develope Tools If your hardware came with an installat
23. dvanced RISC Architecture ES ATmegad 131 Powerful Instructions Most Single clock Cycle Execution g ATmegasA 32 x 8 General Purpose Working Registers ATmega8515 ei Fully Static Operation ATmeda8535 Up to 16 MIPS Throughput at 16 MHz On chip 2 cycle Multiplier ATmegal 6 High Endurance Non volatile Memory segments JKS POD JTAG AWR DP10 1 32 64K Bytes of In System Self programmable Flash program memory E K9 POD JT4G AWR DP10 512 1024 2048 Bytes EEPROM EA Cancel High performance Low power AYR 8 bit Microcontroller le ES E ES Figure 3 12 Device amp hardware Select Choose the chip which you want to emulator In the device list Click OK return to Figure 3 11 You Can Input the device name in the Device Mask box to find the device quick Press Search system will auto serch the all emulators which connect in your computer Choose the emulator which you want tou use as Figure 2 13 Press OK to save the settings Device List emulator SN POD C ke OO0000000016 LAB 1064 56k POD 11465 4WR DP10 LAB 1064 512k POD 11465 44R DP10 Figure 3 13 Search 3 4 2 Main Options Press Figure 3 11 Main Options enter Figure 3 14 the main option interface Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 26 ZL Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide Main Options cache
24. egal6 Loaded objectfile F Emluator A R_CODE M16_C default main elf Information Window lt UI Y El Build O Message E Find in Files F Breakpoints and Tracepoints ATmegal6 Figure 2 16 Debug Window Application Note Name JD AD_CONVERTER 9D ANALOG_COMPARATOR a E BOOT_LOAD aB cru a E EEPROM 4 CZ EXTERNAL_INTERRUPT 3 32 JTAS 4 2 PORTA 2 Ports 4 2 portc 42 PORTD 49 32SPI 85 TIMER_COUNTER_O a amp TIMER_COUNTER_1 4 TIMER_COUNTER_2 ITAGICE mkII H Value Bits 000 DODODOOO 0 03 QOOOUUDOGS ox00 O000O0OOOO Address 0x11 0 0x10 0x12 Name Y DDED X PI L PORTD Auto Stopped Ln80 Coll CAP NUM OVR 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 e Rev 1 02 A Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide 2 5 Setting Emulator Parameter In the debug mode you can select the Debug menu and Choose JTAGICE mkII Options to open the emulator parameter setting dialog sehown as in Figure 2 17 ANE Studio F Emluator A R_CODE E16_C main cl File Project Build Edit view Tools Debug Window Help rar gt GIET o Oy diene A Stop Debugging Processor Run Trace Disabled Meme Value Program Counter Ox001F92 Stack Pointer Ox045F X pointer O0x00C4 Ox045F LE Step Over Ox3FDO Cycle Counter 0 Frequency Run to
25. hird Party Driver as Figure 3 7 Click i add emulator driver Options for node Hi6 Category Factory Settings General Options CIA Compiler Third Farty Driver Extra Opti ons Assembler IAR deb E Custom Build ebugger driver Build Actions Gp Linker Debugger CCR Verify all ICE200 JT AGICE ITAGICE mkII Dragon Simulator Suppress downloa Log communication TOOLEIT DIRS cspycomm log Figure 3 7 Third Party Driver As Figure 3 8 choose TKSCP_DRV_AVR8_for_IAR_v5 dll click Open button to add the driver file Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 23 KS Guangzhou Zhiyuan Electronics CO LTD TKSco e Emulator TKScope Emulator For AVR User Guide E configuration Ze Driver My Recent E ProgConfig dll Documents P TKSCP_DR4_8051_For_AGDI dll X TESCP_DRY_8051_for_1AR_vS dll S TESCP_DRY_ALL_For_A6D1 dll Desktop X TKSCP_DRY_ARM_For_16R_w dll TKSCP_DAW_ARM_for_IAR_w5 dl TKSCP_DRw_A TESCH DV AVRE For L p pd My Documents O SATA gt X TKSCP_SRY_For_AGDI dl UL2ARM_TKSCP_DRY_ARM_for_AGDI dll Mu Computer Mu Network File name TKSCP_D DV AYRE for IA v5 Places Files of tupe Driver Files dll Cancel Figure 3 8 Select IAR Driver File After setting driver file as Figure 3 9 click OK button finish setting Options for node N16 Factor Settings General Option
26. in include Device Name IR len amp IDCODE IDCODE The idcode of the device for add update operations Device Name The name of the device IR len The IR length of the JTAG device Add Add a new device in the devices list Delect Delect a device in the device list Update Update the device in the device list Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 28 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide Up Move the selected device upward Down Move the selected device downward 3 4 5 Prog optoins Program Config has 4 tags the first tag is Fuse Fuse seting as Figure 3 17 difference device has difference Fuse bits how to setting this Fuse please refernce the datasheet of device X Configure Low Fuse EODLEVEL RODEN SUT _CESEL High Fuse OCDEH JTAGEH SPIEH CEOFT EESAVE EOOTSZ BOOTRST Brown out detection at VOC 2 TY Brown out detector disable Disable On Chip Debug Disable JTAG interface Disable SPI Program Hot Select CKOPT EEPROM memory is Erase thought the Chip Erase Boot Size 178 words start address EURO Boot from application Read Write Verify Erase Default ox Cancel pS y Figure 3 17 Configure Fuse The second tag 1s Lock bits settings use to progaram Lock bist as Figure 3 18 Application Note 2011 Guangzhou Zhiyuan
27. information in output window Disable use of BREAK instruction for breakpoints Enable 140 Debug Register IDR in run mode Program Startup Entry function main Iw Warn and break if not found or not in section corresponding to boot reset fuses Ce Always reprogram device when loading object file C Only reprogram device if object He has changed C Don t reprogram device Restore D efaults e Figure 2 19 Debug Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 14 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide General group items function as Table 2 1 Table 2 1 General Debug Option l l Whether timers running when the targer device in stopped Run timers in stopped mode mode Preserver EEPROM contents when reprogramming Reprogramming target device whether save the EEPROM device content through program EESAVE Fuse Always activate external reset when reprogramming l Reprogram wether use the extend reset device Print breakpoint information in output windows In the ouput windows display breakpoint inforeamtion Disable use of BREAK instruction for breakpoints Not use software breakpoint Enable I O Debug Register IDR in run mode Whether Enable User to assess the debug register IDR Program Startup is setting the program entrance fution and Boot Reset fuse set not correct warnig Program Download is choose whethe
28. install path 3 3 Add Driver File After install the driver open a project wich buided finish as Figure 3 5 choose the Project menu click Option enter the Project option IAR Embedded Forkbench IDE File Edit View PSJ CMS TEScope Tools Window Help Add Files CEBADA AA WHS Add Group x Edit Configurations Si h gt Create New Project igned char a 256 0x20 f0xA6 0 1 3 4 5 6 7 8 9 10 Output Add Existing Project d char code 0x3E00 0 eege Source Code Control RT_RXC_vect Make T_REC void Rebuild All Clean Batch build Messages Debug Ctrl D Ln 75 Col 9 Figure 3 5 IAR Environment In the setting dialog choose Debugger option in the Setup window setup as Figure 3 6 Driver choose Third Party Driver select Run to main Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 22 KS Guangzhou Zhiyuan Electronics CO LTD TKSco e Emulator TKScope Emulator For AVR User Guide Options for node AN Categor General Options 21244 Compiler setup Plugins Assembler Custom Build Driver Build Actions Third Party Driver 8 Linker AA CCR Setup macros ICE200 Use macro file Use UBROF reset vector JTAGICE E NS Fi ITAGICE mkII Dragan Simulator Third Party Driver Override default FTOOLEIT DIRS Confighioml6 dd Device description file Figure 3 6 Select Driver Choose T
29. ion CD 2 or floppy disk insert it now What do you want the wizard to do O Install the software automatically Recommended Figure 2 6 New Hardware Installation Wizard Select Install from a list or specific loaction Advanced options inFigure 2 6 click Next system will pop up dialog box as shown in Figure 2 7 Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 J Rev 1 02 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide Found New Hardware Wizard Please choose your search and installation options Use the check boxes below to limit or expand the default search which includes local paths and removable media The best driwer found wall be installed Search removable media floppy CO ROM Ch Include this location in the search C Program Files TKSCP_SRV_fo_AVRStudio Driv we gt Browse D Don t search will choose the driver to install Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware lt Back L Figure 2 7 Select Drive Box In Figure 2 7 click Browse open the dialog box as shown in Figure 2 7 Find the driver files in TKScope_AVRStudio installation directory example is C Program Files TKSCP_SRV_for_AVRStudio Driver TKScope K Driver TKScopeK WinXP click OK Browse For Folder Select the Folde
30. ion you can use all AVR Studio Version did NOT need change driver Support High level language and assembler language debuge Support data break point and no limit flash break point Support dynamic break point you can set and clear break poit when the target is running Support code modify Make you debuge more convenient Hardware selftest Code and data cache Improve the debugging performace Emulator can follow the target device volatage 1 3 AVR Emulator Support IDE Environment TKScope simuation AVR device support multiple IDE environment Engineers can be Choose the familiar IDE support the IDE as follows TKStudio Zhiyuan company Chinese english environment multi core compiling debugging powerful built in editor AVR Studio Atmel Corp English environment Can be plug in GCC comlier IAR IAR Corp Engish multi core compiling debugging Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 2 Ze Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide Figure 1 2 Support IDE Environment 1 4 Connect with TKScope POD_JAG_AVR_P10 has 2 ports 40P connect to Emulator s JP4 10P connect to your target JTAG interface ADP_AVR_P10_P6 use in ISP proggrame and debugWIER simulation support in the near future Connect the J3 10P to POD_JTAG_AVR_P10 and J4 connect to your target JTAG and ISP interface the same
31. r program flash when enter debugging suggest select Alwasys reprogram The third tag is Status options in this can be see the emulator and targer device inforamtion JTAGICE mkll Connection Debug status Pw JTAGICE mkl Hardware Revision US Firmware Version SEILER Serial Number 00 00 00 00 00 00 Device Manufacturer Atmel Device AT megal6 JTAG ID OveS4 03031 Target voltage 5 000 Y canal to Figure 2 20 Status The fourth tag is PWM options only for AT9OPWM device You can control the PSC Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 i Rev 1 02 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide controller and Analog Comparator whether run when the target in the stop mode when in debug JTAGICE mkII Connection Debug Status PWM Power Stage Controllers Aun FSCO in stopped mode Run PSC2 in stopped mode Analog Comparators Run Analog Comparator D in stopped mode Run Analog Comparator 1 in stopped mode Run Analog Comparator 2 in stopped mode 28 ERW Figure 2 21 PWM 2 6 Debug Tools AVR Studio Debug tools as Figure 2 22 kal aso FS LS ey E Sa Ei Si Figure 2 22 Debug Tools m a Start Debugging L l Stope Debugging Run miim Break c gt o Show Next Statement a Step Into bz Step Over p E Step Out Application Note 2011 Guangzho
32. r that contains drivers For your hardware 3 configuration E 5 Driver E TKscope K9 DKS DES DKS E 5 TEScope K Driver El 5 TEscopek LC VMware L 8 T To view any subfolders click a plus sign above Figure 2 8 Designated Driver After the driver installed system will pop up dialog box as shown in Figure 2 9 click finish to finish Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 8 ZL Guangzhou Zhiyuan Electronics CO LTD TKSco e Emulator TKScope Emulator For AVR User Guide Found New Hardware Wizard Completing the Found New Hardware Wizard The wizard has finished installing the software for HIVYUAN TRS cope E seres Universal Develope Tools Click Finish to clase the wizard Figure 2 9 New Hardware Installation Completed 2 3 Install JTAGICEmkIl driver Please make sure you has install USB driver when you install AVR Studio when you install AVR Studio select Install upgrade Jungo USB Deiver default install as Figure 2 10 A KRStudiod InstallShield Wizard Select Features Select the features setup wall install Select the features you want to install and deselect the features you do not want to install Wi Install upgrade Jungo USB Driver FEE D escriptior USE driver for ICE 40 ICE D AN e e ee JTAGICE mel These can be installed later by running the Setup program and select Modify Windows 95 and windows MT
33. s Ch Compiler Third Party Driver Extra Options Assembler IAR deb S Custom Build ebugger driver A AA AN A TIT ATA e a e Buld Actions LAIKS TES cope TESCP_DRY_AVES_for TAR 5 A Linker Debugger CCR E Verify all ICEZ00 JTAGSICE ITAGICE mkII Dragon Simulator Third Party Driver Suppress downloac Log communication FTOOLELT DIFF cspycomm Log Figure 3 9 Finish Driver Load TKScope emulator parmeter must set correct otherwise the emulator can t work as Figure 3 10 click menu TKScope choose Setup then enter the setup dialog Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 24 Eb y Guangzhou Zhiyuan Electronics CO LTD TKSco e Emulator TKScope Emulator For AVR User Guide Gs TAR Embedded Vorkbench IDE File Edit View Project Be Tools Window Help Ds S el Zesse ee nlomsg Workspace 7 ss x include lt ioavr h gt include lt intrinsics h gt include lt comp_a90 h gt Files a B M16 De v E main cpp E Output _ root eeprom unsigned char a 256 B 0x20 0xA6 0 1 3 4 5 6 7 8 9 10 _ root flash unsigned char code 0x3E00 0 pragma vector USART_RXC_vect _ interrupt void UART_REC void UDR UDR Log Mon Aug 10 13 38 51 2009 Load TKScope for IAR Vi Up 2008 01 Debug Log Figure 3 10 IDR After Add Driver Select the TKScope men
34. s show in Figure 2 1 click Next and to continue 2 TESCP_SR _for_A EStudio Welcome to TRSCP_SRW Tor AVA Studio Setup program This program will install TESCP_SAY_forAVA Studia on your computer Ik is strongly recommended that you exit all Windows programs before running this Setup Program Click Cancel to out Setup and close any programe you have running Click Nest to continue with the Setup program WARNING This program is protected by copyright law and international treaties Unauthorized reproduction or distribution of this program or any portion of it may result in severe civil and criminal penalties and will be prozecuted to the maximum extent possible under law Figure 2 1 Install Driver You may install the driver in the path where you want to 2 TESCP_SR _for_A RStudio Destination Location Setup will install TASCP_SAY for AVA Studio in the following folder To install into a different folder click Browse and select another folder ou can choose not to install TRSCP_SAY_forAVAStudio by clicking Cancel to eut Setup Destination Folder C Program Files TESCP_SAY_forAvA Studio ize Installation Wizard Figure 2 2 Select install path Click Next and go on until the driver install finish Afer the driver setup finish you can see the start menu has AVRStudio with TKScope amp Uninstall AVR Studio with TKScope AVRStudio with TKScope is use to star
35. the target device enter debug mode Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 11 Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope AVR Studio F Emluator A R_CODE boot_H16 main main c Ej File Build Edit Debug Window Help DEH u eee 0 23 KR Trace Disabled L n Dy d ae TE DS WW Wm LES EH include lt avr io h gt J main default include Geer delay h gt include lt avr boot h gt Source Files Sa Header Files include lt avr interrupt h gt 3 External Dependencies Y Other Files Project View Tools Km boot program page uint32_t page uint8_t buf uint16_t i uint8_t sreg f Disable interrupts sreg SREG elit eeprom_busy_wait D boot_page_erase page boot_spm_busy_wait f Wait until the memory is e for i 0 i lt SPM_PAGESIZE i 2 f Set up little endian word uinti6_t w buf w xbuf lt lt 8 sie B F Emluator AYR_CODE boot_M16 main main c db e Message Loaded plugin STK500 Loaded plugin AYR GCC Loaded partfile D Atmel AVR Tools PartDescriptionFiles ATmegal6 xml lt gt E Build O Message Find in Files Breakpoints and Tracepoints ATmegal6 Figure 2 15 Start Debug Emulator For AVR User Guide ID AD_CONVERTER JD ANALOG_COMPARATOR a E BO00T_LOAD Breu a E EEPROM 4
36. tup AVRStudio will TKScope service use TKScope in AVR Studio Emulate AVR use this to start before you start it May sure you had turn on the Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 3 El Ze Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide emulator and connect the emulator to your computer through USB Uninstall AVR Studio with TKScope is to unstall this driver Hi Windows Update wi k Accessories Windows Media Plays Games Startup 33 Windows Messenger 8 Internet Explorer we msn Es Tour Windows zb ke Outlook Express FF ave Battery Studio GT AVE GTouch Studio Y AYR Studio 4 cb Files and Settings Tra p Remote Assistance ER AYR Tools Help AL wizard O Windows Media Player Y Paint All Programs W AYR Wireless Studio 3 Windows Messenger Sp Windows Movie Maker AWR Studio with TeScope e ES Atmel AR Tools A 5 Uninstall AYR Studio with TKScope ES Log OFF o Turn OFF Computer Figure 2 3 Start menu after Install driver After install the Drivers suggest user install the Mrosoft VC9 run lib Double vcredist_x86_en exe sytem will display Figure 3 3 the dialog box click next d Microsoft Visual CH 2008 Redistributable Setup f EN Welcome to Microsoft isual C 27008 Redistributable Setup This wizard will guide you through the install
37. u click Settings enter TKScope emulator setting interface as Figure 3 11 Set as TEScope E8 POD JTAG AVE DP10 ATNegal6A ATHEL Device amp hardware type Main Options Sux Options TAP config Prog Options TEScope doctor as Device and Hardware 1 Vendor ATMEL 2 Device ATMegal64 3 Emulator TEScope K 3 POD Type POD ITAG AWR DP1O Message Box Sux Options 1 dont program config data 2 Stop timer TAP config 1 Automatic Detection Prog Options Don t dispaly prog config data Cancel h EY a DeFault Figure 3 11 Emulator Setting In Figure 3 11 click the left side of the various options the system will pop up the appropriate settings interface while the right side of the information prompt box will appear the specific meaning of the various setting Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 25 Rev 1 02 KS Guangzhou Zhiyuan Electronics CO LTD TKSco e Emulator TKScope Emulator For AVR User Guide 3 4 Emulator Parameter Setup 3 4 1 Harware Select Click Figure 3 11 the Device amp hadware enter the setting information of Figure 3 12 the setting interface Device hardware Emulator Type POD Type Device Type amp information Device Mask K9 v POD JTAG AVR DP10 v Parmenal eme ce 88 AT91M40807 ach 1 Emilston chip ATmegal6 ATMEL 53 AT91R40008 AT91R40807 is PS A
38. u Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 16 KS Guangzhou Zhiyuan Electronics CO LTD TKScope Emulator TKScope Emulator For AVR User Guide G Run to Cursor Auto Step Le Toggle Breakpoint E Remove all Program Breakpoints d m Quick watch ei Toggle Watch Window Toggle Register Window d Toggle Memory Window Toggle Disassembler Window 2 7 Stop Debugging iil When user want to stop debugging Press a 2 8 Use AVR Studio Programmer If you want to use AVR Studio programmer to program the target device click the display the connect dialog then the IDE show as in Figure 2 24 dialog Select JTAGICE mkII Click Connect Notice Before you connect the programmer you should stop debugging Application Note 2011 Guangzhou Zhiyuan Electronics CO LTD Date 2011 02 10 Rev 1 02 17 KS Guangzhou Zhiyuan Electronics CO LTD TKSco e Emulator TKScope Emulator For AVR User Guide AVR Studio F Emluator A R CODE E16_C main cl File Project Build Edit Yiew Tools Debug Window Help 8X daa ny as M YT TA E 31304009 203 Trace Disabled AVR GCC Xx YO View Y Xx HRY main default 37 Sus Eet ae 33 Jl anatoc_comparator ir MCUCSR 0x80 Name Value a Header Files Y External Dependenci TCCR2 1 lt lt WGM21 1 lt lt COM20 7 lt lt CS20 11 AD_CONVERTER OxFE JD ANALOG_COMPARATOR CH Other Files OCR2 a E BOOT_LOAD TC

Download Pdf Manuals

image

Related Search

Related Contents

Schneider Cat6 RJ45 Connector  Intervención Ligera en Pozos, Estimulación Abandono    

Copyright © All rights reserved.
Failed to retrieve file