ATMEGA1284P

Go To Last Post
83 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you want to see output in the Output window then perhaps consider marking the "Use Output window" chechbox?

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks I have done that I am getting the response now. But error message.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think it's pretty obvious that the programmer you're using is NOT an Arduino.

Google avrdude as6 usbtiny

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have make changes for USBTiny. My argument is:-       -c usbtiny -p m1284 -v -v -v -U flash:w:$(atmega1284)$atmega1284.hex:i

 

 

But it is giving error that atmega1284.hex no such file or directory.

 

This file is saved in my PC location is:-     C:\Users\espin\Documents\Atmel Studio\atmega1284\atmega1284\Debug\atmega1284.hex

 

 

Where in the above line of file location

First atmega1284 is directory name.

Second atmega1284 is atmel studio file (made by atmel studio itself with symble of atmel studio I think .asm file) name.

Third atmega1284 is .hex file name.

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And I also want to set ATMEGA1284 on External Crystal. How I can do it??

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There are several important points to understand:

1.  USBTINY is a USB device.   No need for any COM# or Baud setting.   You just have -c usbtiny

2.  Spaces in filepaths must be quoted.  e.g. -C "C:\Program Files (x86)\Arduino-1.8.1\hardware\tools\avr\etc\avrdude.conf"

3.  Set up the External Tools in AS7 carefully.    e.g. use the AS7 standard macros.

4.  Choose intuitive names for each External Tool.

 

Title:

usbtiny_mega1284

Command:

"C:\Program Files (x86)\Arduino-1.8.1\hardware\tools\avr\bin\avrdude.exe"

Arguments:

-c usbtiny -p ATmega1284 -C "C:\Program Files (x86)\Arduino-1.8.1\hardware\tools\avr\etc\avrdude.conf" -e -U flash:w:$(TargetName).hex:i

Initial Directory:

$(TargetDir)

Obviously your avrdude location is different.

 

I find it rather messy to have a complex -C argument.   So I put these things into a .BAT file.   All my "avrdude" Tools can use the same .BAT file.   If I change the particular avrdude version,  I edit in the .BAT file.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Re setting fuses for external crystal as clock source :
.
1. Read in the data sheet about fuse values.
.
2. Go to http://www.engbedded.com/fusecalc/ to verify that your numerical fuse values are what you think they are.
.
3. Think one extra time about the consequences are if you get it wrong.
.
4. When you get it wrong - come back here and cry "My AVR is not working any more - and I can't even program the flash or fuses..."

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Sat. Nov 4, 2017 - 11:36 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

I have noticed one more error message.

 

 

 

 

.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I do'nt know how to do it because sina prog is not supporting atmega1284

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, if 'sinaprog' doesn't support the 1284 you simply need to use some other programming software.. E.g. AVRDUDE directly?

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Google avrdude.exe programmer operation not supported

With all the 'fun' you are having, you can probably start to understand why Arduino was invented - basically get all the tricky hardware and software stuff sorted so that people with little or no background in electronics can program microcontrollers.

You're probably getting to the point where the software is probably correct, but how do you know your hardware is correct? Have you been able to program your chip yet? You might want to post a picture of your hardware setup so we can get an idea and be able to advise you.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do you have an arduino? If you do, I can tell you how to connect it to AS6 or AS7 to program the atmega1284.

There is a method that doesn't need to mess with avrdude.

Last Edited: Sat. Nov 4, 2017 - 12:37 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

This is crazy.

 

You have an ATmega1284 chip and a USBTINY programmer.

 

Atmel Studio AS7 can run on a Windows PC.   It will understand ALL Atmel chips.

AS7 can use avrdude to program your chip via External Tools.

 

I strongly recommend that you do not change any fuses.    Just get familiar with AS7 and programming the HEX file.

 

When you have got this running ok,  we can show you how to program fuses.

 

David.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
Just get familiar with AS7

+1

 

What's the point in wasting time with old and/or obscure tools - especially when they are clearly not working!

 

At least start with something that's current and widely-known.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am not aware of arduino. So I want to know that is it possible to program in C with aduino, and I do use my own customized board which is perfectly ruing with atmega16 and atmega32. So as I know I needed arduino board to start with arduino.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can any one please make a copy of updated avrdude and send it to me on my mail abhaysingh.ece02@gmail.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

From your screen-shot above we can see that the version of AVRDUDE you're running is version 6.3 build January 17, 2017.

 

Version 6.3 is the current version of AVRDUDE. There are only three commits done to the source code repository since January 17 and none of them seems to have anything to do with your problem. Indeed, one seems to be a simple adjustment of output text and the other two are of a bureaucratic nature.

 

I.e.: There most likely is no more recent version of AVRDUDE than the one you are running.

 

What "update" where you hoping for?

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You must live under a rock! Google arduino and you get a zillion hits!
arduino is just C/C++ with useful libraries and a simple ide.
Do you need Arduino hardware? No. It is just an AVR mounted on a pcb with the bare minimum required to power the chip and interface via USB. Then the correct fuses are set and a bootloader loaded. The idea is to avoid all the hurdles beginners have - like what you are experiencing.
So google arduino + anything you care to mention. If it is half useful, then somebody has already done it and written a tutorial. It just so happens Arduino supports the mega1284.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was asking for Winavr update.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Winavr has been discontinued.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was asking for this kind of update..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Abhay02 wrote:
I was asking for Winavr update.

No.

Abhay02 wrote:
Can any one please make a copy of updated avrdude

 

If it really is a WinAVR update you're looking for then note Kartmans post above. The WinAVR project has not been active since 2010. The last release was 2010-01-10 and it is now a dead project. There will be no updates of it.

 

The rationale for WinAVR was to have a development environment for AVRs on Windows. Since Atmel Studio has, for a long time supplied this, there was not a large enough demand for WinAVR to continue it.

 

If you absolutely do not want to use Atmel Studio you can put together your own environment with, more or less, what went into WinAVR. You need e.g.:

  • MinGW to get all the Unix-like general development tools (e.g. GNU Make, GDB...).
  • The AVR-GCC tool chain (compiler and linker). Atmel builds such a tool chain. Google "Atmel Tool chain for AVR".
  • AVRDUDE (which you obviously already have).

I'm sure I've missed out on some minor components, but that is the major parts of what went into WinAVR.

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Abhay02 wrote:
I am not aware of arduino.

surprise

Kartman wrote:
You must live under a rock!

Indeed - for over 10 years!!

 

Google arduino and you get a zillion hits!

example:

Wikipedia wrote:

Adafruit Industries, a New York City supplier of Arduino boards, parts, and assemblies, estimated in mid-2011 that over 300,000 official Arduinos had been commercially produced,[6] and in 2013 that 700,000 official boards were in users' hands.[7]

 

https://en.wikipedia.org/wiki/Arduino#History

and that's just the official ones!!

 

Kartman wrote:
Do you need Arduino hardware? No. It is just an AVR mounted on a pcb...

But it is an AVR with the Arduino bootloader already installed - isn't it?

 

So you can't just take a blank AVR and use it as an Arduino - you would need something (eg, AVRDude) to get the bootloader in ...

 

But Arduino boards are cheap and readily available;  many for less that the price you could buy a bare AVR - so why bother?

 

 

The idea is to avoid all the hurdles beginners have - like what you are experiencing.

Absolutely!

 

So google arduino + anything you care to mention. If it is half useful, then somebody has already done it and written a tutorial.

+1

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks evry one my issue is solved by adding external tool in atmel studio 6.

 

Command=>    avrdude.exe

 

Arguments=>   -c usbtiny -p m32 -U flash:w:$(ProjectDir)Debug\$(ItemFileName).hex:i

 

 

Now I need how can I do it on External Crystal.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Before you go anywhere near the fuses PLEASE read this:

 

http://www.avrfreaks.net/forum/t...

 

Good news about 1284 is that (being 40 pin) it does not have RSTDISBL so it' quite tricky to "lose" it completely. But if you make an error when writing CKSEL and inadvertently choose "external clock" instead of "external crystal" then you could have quite a job recontacting the chip. So read and understand the possible dangers first.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Abhay02 wrote:
Thanks evry one my issue is solved by adding external tool in atmel studio 6.  

 

[...]

Now I need how can I do it on External Crystal.

You only need to program those fuses once, so it makes little sense to set up an external tool in Atmel Studio for it. Just go to a command prompt and do the AVRDUDE command for programming fuses there.

 

I've pointed you to http://www.engbedded.com/fusecalc previously in this thread, but it seems you ignored that. That site will tell you the exact parameters needed to pass on the AVRDUDE command line.

 

I've also warned you about changing the fuses without understanding the possible consequences, as did 'clawson' just above. I am merely iterating here to make sure you didn't miss or ignore this warning.

 

 

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No I have not ignored it. In this website in the list of Micro-controllers ATMEGA1284 is not available.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

According to this data sheet, http://www.atmel.com/Images/Atme... , it seems the fuses for ATmega1284 and ATmega1284P are the same. (I leave it to you to double-check this!).

 

And the ATmega1284 is listed at http://www.engbedded.com/fusecalc .

 

If you don't trust that site (or my speculation that ATmega1284 and 1284P are identical re fuses) then the other option is to read the data sheet and determine what fuse values you need and pass them to AVRDUDE. The parameters to AVRDUDE for programming fuses are, in a general format, like so:

 

-U lfuse:w:lowFuseValue:m -U hfuse:w:highFuseValue:m -U efuse:w:extendedFuseValue:m

where lowFuseValue, highFuseValue and extendedFuseValue should be expressed in hexadecimal notation with a leading "0x". Here is an example setting the fuses to their factory defaults (i.e. clock is internal RC oscillator):

-U lfuse:w:0x42:m -U hfuse:w:0x99:m -U efuse:w:0xff:m

 


 

So, why isn't anyone simply spoon-feeding and give you the complete AVRDUDE command line?

 

I can only speak for myself - my reasons are:

  • You have stated "external crystal" but not said anything about other clock-affecting fuses, i.e. "startup time". If we where to give you a complete command it would specify all fuse values and there is a risk that something else gets set to a value you do not want. So, for you to be able to tell us about desired values of all fuses you need to read up on all of them. Then you're 99% done doing it all by yourself.
  • I want you to take responsibility for your own actions re setting fuses, because...
  • ...setting (clock selection) fuses goes wrong quite often and you might come back and say "the command/parameters you told me was wrong and now my AVR can not be programmed". I don't want to be put in that position.

 

We can answer questions about details. We can answer questions about the format of the AVRDUDE command line etc. We can warn about consequences changing fuses while not mastering the subject.

 

But I doubt anyone will give feed you a complete command for you to just apply.

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Abhay02 wrote:

Thanks evry one my issue is solved by adding external tool in atmel studio 6.

 

Command=>    avrdude.exe

 

Arguments=>   -c usbtiny -p m32 -U flash:w:$(ProjectDir)Debug\$(ItemFileName).hex:i

 

 

Now I need how can I do it on External Crystal.

 

Are you programming a mega32 or mega1284?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry I have checked it with atmega32. But I am programming m1284.

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tested one more thing.

As per discussion here, I have open the avrdude.conf file of arduino ( C:\arduino-1.8.5\hardware\tools\avr\etc\avrdude.conf) in notepad plus and searched for Atmega1284. and I got this lines:-

 

 

 

#------------------------------------------------------------

# ATmega1284

#------------------------------------------------------------

 

# similar to ATmega164

 

part

    id               = "m1284";

    desc             = "ATmega1284";

    has_jtag         = yes;

    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one

    avr910_devcode   = 0x74;

    signature        = 0x1e 0x97 0x06;

    pagel            = 0xd7;

    bs2              = 0xa0;

    chip_erase_delay = 55000;

    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",

                       "x x x x  x x x x    x x x x  x x x x";

 

    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",

                       "x x x x  x x x x    x x x x  x x x x";

 

    timeout = 200;

    stabdelay = 100;

    cmdexedelay = 25;

    synchloops = 32;

    bytedelay = 0;

    pollindex = 3;

    pollvalue = 0x53;

    predelay = 1;

    postdelay = 1;

    pollmethod = 1;

 

    pp_controlstack     =

        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,

        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,

        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,

        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;

    hventerstabdelay    = 100;

    progmodedelay       = 0;

    latchcycles         = 6;

    togglevtg           = 1;

    poweroffdelay       = 15;

    resetdelayms        = 1;

    resetdelayus        = 0;

    hvleavestabdelay    = 15;

    chiperasepulsewidth = 0;

    chiperasepolltimeout = 10;

    programfusepulsewidth = 0;

    programfusepolltimeout = 5;

    programlockpulsewidth = 0;

    programlockpolltimeout = 5;

 

    idr                 = 0x31;

    spmcr               = 0x57;

    allowfullpagebitstream = no;

 

    ocdrev              = 3;   // NEED TO DELETE THIS LINE 

 

    memory "eeprom"

        paged           = no; /* leave this "no" */

        page_size       = 8;  /* for parallel programming */

        size            = 4096;

        min_write_delay = 9000;

        max_write_delay = 9000;

        readback_p1     = 0xff;

        readback_p2     = 0xff;

read            = "  1   0   1   0      0   0   0   0",

                          "  0   0   x   x    a11 a10  a9  a8",

                          " a7  a6  a5  a4     a3  a2  a1  a0",

                          "  o   o   o   o      o   o   o   o";

 

write           = "  1   1   0   0      0   0   0   0",

                          "  0   0   x   x    a11 a10  a9  a8",

                          " a7  a6  a5  a4     a3  a2  a1  a0", 

                          "  i   i   i   i      i   i   i   i";

 

loadpage_lo = "  1   1   0   0      0   0   0   1",

  "  0   0   0   0      0   0   0   0",

  "  0   0   0   0      0  a2  a1  a0",

  "  i   i   i   i      i   i   i   i";

 

writepage = "  1   1   0   0      0   0   1   0",

  "  0   0   x   x    a11 a10  a9  a8",

  " a7  a6  a5  a4     a3   0   0   0",

  "  x   x   x   x      x   x   x   x";

 

mode = 0x41;

delay = 10;

blocksize = 128;

readsize = 256;

      ;

 

    memory "flash"

        paged           = yes;

        size            = 131072;

        page_size       = 256;

        num_pages       = 512;

        min_write_delay = 4500;

        max_write_delay = 4500;

        readback_p1     = 0xff;

        readback_p2     = 0xff;

        read_lo         = "  0   0   1   0      0   0   0   0",

                          "a15 a14 a13 a12    a11 a10  a9  a8",

                          " a7  a6  a5  a4     a3  a2  a1  a0",

                          "  o   o   o   o      o   o   o   o";

 

        read_hi         = "  0   0   1   0      1   0   0   0",

                          "a15 a14 a13 a12    a11 a10  a9  a8",

                          " a7  a6  a5  a4     a3  a2  a1  a0",

                          "  o   o   o   o      o   o   o   o";

 

        loadpage_lo     = "  0   1   0   0      0   0   0   0",

                          "  0   0   x   x      x   x   x   x",

                          "  x  a6  a5  a4     a3  a2  a1  a0",

                          "  i   i   i   i      i   i   i   i";

 

        loadpage_hi     = "  0   1   0   0      1   0   0   0",

                          "  0   0   x   x      x   x   x   x",

                          "  x  a6  a5  a4     a3  a2  a1  a0",

                          "  i   i   i   i      i   i   i   i";

 

        writepage       = "  0   1   0   0      1   1   0   0",

                          "a15 a14 a13 a12    a11 a10  a9  a8",

                          " a7   x   x   x      x   x   x   x",

                          "  x   x   x   x      x   x   x   x";

 

mode = 0x41;

delay = 10;

blocksize = 256;

readsize = 256;

      ;

 

    memory "lock"

        size            = 1;

        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",

                          "x x x x  x x x x   x x o o  o o o o";

 

        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",

                          "x x x x  x x x x   1 1 i i  i i i i";

        min_write_delay = 9000;

        max_write_delay = 9000;

      ;

 

    memory "lfuse"

        size            = 1;

        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",

                          "x x x x  x x x x   o o o o  o o o o";

 

        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",

                          "x x x x  x x x x   i i i i  i i i i";

        min_write_delay = 9000;

        max_write_delay = 9000;

      ;

 

    memory "hfuse"

        size            = 1;

        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",

                          "x x x x  x x x x   o o o o  o o o o";

 

        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",

                          "x x x x  x x x x   i i i i  i i i i";

        min_write_delay = 9000;

        max_write_delay = 9000;

      ;

 

    memory "efuse"

        size            = 1;

 

        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",

                          "x x x x  x x x x  o o o o  o o o o";

 

        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",

                          "x x x x  x x x x  1 1 1 1  1 i i i";

        min_write_delay = 9000;

        max_write_delay = 9000;

      ;

 

    memory "signature"

        size            = 3;

        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",

                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";

      ;

 

    memory "calibration"

        size            = 1;

 

        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",

                          "0 0 0 0  0 0 0 0   o o o o  o o o o";

        ;

  ;

 

 

 

 

 

 

 

////////////////////////////////////////////////////////

 

 

And deleted one line (ocdrev              = 3;) as mention in above lines also and simply copy these line in winavr's (C:\WinAVR-20100110\bin\avrdude.conf) avrdude.conf file using notepad pluse.

and atmel atudio 6 is working fine.

 

 

 

I have also added external tool for dumping the program in microcontroller directly from atmel studio 6.

 

 

Tools> External Tools..

 

Title:  Atmega1284

 

Command: avrdude.exe

 

Arguments: -c usbtiny -p m1284 -U flash:w:$(ProjectDir)Debug\$(ItemFileName).hex:i

 

 

To dump the program just compile it after that  Tools> Atmega1284.

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Don't get me wrong, I'm immensely grateful for the existence of avrdude. Infinite value and all that.

 

However... I hate "secret" poorly documented features that are not explained in the manual. What is "ocdrev"?

I had to go and find in the source code. So, I'll leave my research here for reference:

 

/**************  somewhere in the changelog *********************/

2012-12-04  Joerg Wunsch <j.gnu@uriah.heep.sax.de>

	* config_gram.y: Implement the "ocdrev" keyword
	* avrpart.c: (Dito)
	* avrpart.h: (Dito)
	* lexer.l: (Dito)
	* avrdude.conf.in: Add "ocdrev" key/value pairs, based
	on the AS6 XML file information.
	* jtag3.c: Use the ocdrev in the parameter block.

/**************  somewhere in libavrdude.h  ********************/

int           ocdrev;             /* OCD revision (JTAGICE3 parameter, from AS6 XML files) */

/**************  somewhere in jtag3.c  ********************/

md.ocd_revision = ocdrev;

/****************  somewhere in jtag3_private.h ********************************************************/

    unsigned char ocd_revision;         // see XML; basically:
                                        // t13*, t2313*, t4313:        0
                                        // all other DW devices:       1
                                        // ATmega128(A):               1 (!)
                                        // ATmega16*,162,169*,32*,64*: 2
                                        // ATmega2560/2561:            4
                                        // all other megaAVR devices:  3

Apparently the 1284 doesn't like the "3" value for whatever reason.

 

edit: However, it seems the default is "3", so now I don't understand why deleting that line even works. Go figure...

 

      /* lacking a proper definition, guess the OCD revision */
      if (p->flags & AVRPART_HAS_DW)
	ocdrev = 1;		/* exception: ATtiny13, 2313, 4313 */
      else if (flashsize > 128 * 1024)
	ocdrev = 4;
      else
	ocdrev = 3;		/* many exceptions from that, actually */
      avrdude_message(MSG_INFO, "%s: part definition for %s lacks \"ocdrev\"; guessing %d\n",
                      progname, p->desc, ocdrev);
      md.ocd_revision = ocdrev;

 

Last Edited: Tue. Nov 7, 2017 - 11:44 AM

Pages