Actions

KamPROG for AVR: Difference between revisions

From Kamamilabs.com - Wiki

Created page with "__jzpdf__ <center> none|300px|thumb|center </center> <center> none|300px|thumb|center </center> ===== Introdcution ===== KamPRO..."
 
Line 165: Line 165:




====== Examples ======
'''Examples'''
* Performing chip erase of autodetected device:  
* Performing chip erase of autodetected device:  
KamPROGAVRc -d -r -s 2
<pre>KamPROGAVRc -d -r -s 2</pre>


-d – chip autodetection
<pre>-d</pre> – chip autodetection


-r – chip erase
<pre>-r</pre> – chip erase


-s 2 – set SPI frequency to 50kHz (omitting this parameter sets frequency to 100kHz)
<pre>-s 2</pre> – set SPI frequency to 50kHz (omitting this parameter sets frequency to 100kHz)


* Reading ATmega8 fuse bits
* Reading ATmega8 fuse bits


KamPROGAVRc -c ATmega8 -B
<pre>KamPROGAVRc -c ATmega8 -B</pre>


-c ATmega8 – connected device is ATmega8  
<pre>-c ATmega8</pre> – connected device is ATmega8  


-B – read fuse bits
<pre>-B</pre> – read fuse bits


* Writing led.hex into autodetected device’s Flash memory:
* Writing led.hex into autodetected device’s Flash memory:


KamPROGAVRc -d -f led.hex
<pre>KamPROGAVRc -d -f led.hex</pre>


-f led.hex – write led.hex into device’s Flash memory
<pre>-f led.hex</pre> – write led.hex into device’s Flash memory

Revision as of 11:12, 18 July 2018



Introdcution

KamPROG for AVR is development/production programmer for Atmel AVR microcontrollers. It can be controlled by KamProg application, Bascom AVR and AVR Studio. Programmer is connected to PC USB port. KamPROG works with AVR microcontrollers that can be connected through 10-pins IDC header (Atmel standard).


Features
  • Programmer for ISP-enabled AVR microcontrollers
  • 10-pins IDC output header, Atmel standard pinout (Fig. 1)
  • Power supply from USB port
  • Operates with KamPROG application, Atmel AVR Studio and Bascom AVR
  • Windows XP, Windows Vista compatible


Fig. 1. Output connector pin layout



Standard equipment
Code Description
KamPROG
  • Cable USB A/mini B
  • KamPROG for AVR programmer
  • IDC cable (1m)


Installation

KamPROG for AVR does not require drivers, you only need to download and install KamPROG software (http://www.kamami.com/?content=kamprogavr). During installation you have to decide, whether you want to in- stall AVR Studio Plug-in (Fig. 2). Bascom AVR (v. 1.11.9.3 and newer) supports KamPROG for AVR.


Fig. 2. KamPROG for AVR installation


Software

On the figure 3 you can see programmer’s application window.

Fig. 3. Microcontroller tab of KamPROG for AVR application

Microcontroller tab

On this tab you can find list of supported microcontrollers. You can choose programmed device on the list or identify it using its signature bytes (Identify microcontroller button). If you check Auto-identify checkbox then device will be identified everytime you open this tab.

Memory programming tab

To erase microcontroller’s Flash memory, EEPROM memory (if EESAVE is not set), lock bits (LB, BLB0, BLB1) press Chip erase. To write Flash memory enter hex file name, press Write button in Flash section. You can also use two additional options: Erase chip before Flash programming and Verify written data. You can also verify written data by pressing Verify button and read microcontroller’s Flash memory conent into hex file (Read button). EEPROM section works similar (Erase chip before Flash programming and Verify' written' data options are not available for EEPROM).


Fig. 4. Memory programming tab of KamPROG for AVR application


Fuse bits and Lock bits tabs

Here you can set fuse bits and lock bits values.


Be careful while changing fuse bits values. Some combinations can make microcontroller not acces- sible using SPI! For more informations see microcontroller’s documentation.


Fig. 5. fuse bits tab of KamPROG for AVR application


Fig. 6. Lock bits tab of KamPROG for AVR application


Programmer setup tab

Here you can set ISP frequency and read programmers firmware version. Make sure that ISP frequency is less than microcontroller frequency divided by 4.


Fig. 7. Programmer setup tab of KamPROG for AVR application


AVR Studio 4

If you selected KamPROG for Atmel AVR Studio plug-in option during installation, then you can use KamPROG in Atmel AVR Studio 4. If there is no Kamami AVR programmer item in Tools menu and there is no Kamami toolbar, then open Plug-in Manager (Tools>Plug-in Manager) and check Kamami_AVR_programmer in the list, restart AVR Studio. Now you can open programmer’s application (Tools>Kamami AVR programmer>Connect) and write Flash memory (Tools>Kamami AVR programmer>Write Flash), both operations can be done using toolbar.


Write Flash works only when project’s output hex file has the same name as project file!


Fig. 8. KamPROG for AVR controls in Atmel AVR Studio 4


Fig. 9. Atmel AVR Studio Plug-in window


Command line

You can also use command line tool – KamPROGAVRc.exe – to work with KamPROG AVR. First you have to go to KamPROG AVR folder (default path is C:\Program Files\KamPROGAVR), then type in KamPROGAVRc and press Enter to display help.


Examples

  • Performing chip erase of autodetected device:
KamPROGAVRc -d -r -s 2
-d

– chip autodetection

-r

– chip erase

-s 2

– set SPI frequency to 50kHz (omitting this parameter sets frequency to 100kHz)

  • Reading ATmega8 fuse bits
KamPROGAVRc -c ATmega8 -B
-c ATmega8

– connected device is ATmega8

-B

– read fuse bits

  • Writing led.hex into autodetected device’s Flash memory:
KamPROGAVRc -d -f led.hex
-f led.hex

– write led.hex into device’s Flash memory