Split from: Starting with AVR

Go To Last Post
18 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

New to the ATmega 1284P Xplained.  I watched the video "getting started with mega 1284P" and it looks like he is programming the atmega board directly from his laptop to the board through a USB cable using AVROSP.  Or is there a programmer like the AVR ISP mkII programmer mentioned here that is not being shown in the video?

howdyrichard

Last Edited: Mon. May 18, 2020 - 07:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Xplained boards have a built in programmer/debugger, one of the nice things about the xplained products.

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

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

Note that you're replying to an 8 year old thread!

 

ATmega 1284P Xplained

This:  https://www.microchip.com/DevelopmentTools/ProductDetails/ATMEGA1284P-XPLD

 

which says:

The MEGA-1284P Xplained contains ... a UART-to-USB bridge.

and:

Program the kit via bootloader or a Microchip programmer

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:
The Xplained boards have a built in programmer/debugger

Not the plain old XPlained - you need the Pro, Mini, or Nano for that

 

As noted above, this one just has a bootloader

 

EDIT

 

https://www.avrfreaks.net/commen...

 

https://www.microchip.com/development-tools/xplained-boards

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Mon. May 18, 2020 - 05:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, then I do need a programmer for this board (it's the plain one) and use the JTAG connection?

howdyrichard

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

howdyrichard wrote:
OK, then I do need a programmer for this board (it's the plain one) and use the JTAG connection?

 

If it is indeed an actual XPLAIN board you do not need anything else.

 

JIm

 

EDIT:

OOPS!  This beast is a different animal for debugging.

 

 

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

Last Edited: Mon. May 18, 2020 - 08:11 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I checked out the product page and it's summary says:

The MEGA-1284P Xplained evaluation kit is a hardware platform for evaluating the ATmega1284P microcontrollers. The MEGA-1284P Xplained contains one QTouch button sensor, three mechanical buttons, four LEDs, three analog sensors, and a UART-to-USB bridge. The AVR Xplained expansion headers provide easy access to analog and digital I/O pins. The board is powered by the use of a USB cable and equipped with the standard 10-pin JTAG header that connects to the full range of AVR debuggers.

 

So this xplained board needs an external debugger/programmer!  bummer!

 

Jim

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

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

Thank you awneil.  I am aware that I am Johnny come late, it just looked like a board that I could use for a project and following that video, the board will not program with AVROSP.  So now I have Studio 7 and I will try with it.  But even in these threads there seems to be a difference of opinion.  Someone said that what Xplained boards are for, direct programming through USB, then another says it has to be the Pro version for that.  Just to be clear, I bought the board from Mouser for about $32 and it is an ATMEL ATmega_1284P_Xplained.  I have spent too much time on not so clear information. 

 

I did buy from Amazon this:  Aoicrie 51 AVR ATMEGA8 Programmer USBasp USB ISP 10 Pin Adapter Board ATMEGA128 USB ASP Microcontroller Programmer 3.3V/5V with Download Cable , a Chinese knock off and maybe that will work.  Otherwise I should have a quality programmer if I am going to continue with these projects. 

 

Thanks all...

howdyrichard

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

That's OK, as long as I know.  I think I'll make a more accurate video when I figure this out so beginners like me can start right away without the enormous task I have gone through.  I will be an expert on it!

 

Thanks again!

howdyrichard

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

The USBasp is a nice and cheap ISP programmer, it can not do debugging.  Debuggers tend to be more expensive, but not much more, pickit4, MicroChip snap, or atmel ice are debuggers, there are 3rd party ones too.

You will need to set up AS7 to use it via an external command, those here with AS7 experience can guide you how to do that.

Arduino's are AVR too, and that is another route.

 

Welcome to AVRFreaks if that has not already been done!

 

Jim

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

Last Edited: Mon. May 18, 2020 - 08:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Jim, good to be here.  I'll look into those debuggers you mentioned but I did go ahead and get this: 

Programmers - Processor Based Atmel AVRISP STK500 USB ISP Programmer

 

I see STK500 all over the place in these Studio's.

howdyrichard

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

I didn't know those oldie's were still available, that is still only a programmer. 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

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


Here's a bit of a radical idea. One could give in and read the user manual...

 

So, yeah, it doesn't have a debugger and it doesn't have an ISP programmer so if you want to do either of those operations you need something external like a USBAsp or one of the many gadgets mentioned in AVR370 but you don't NEED any of those things. All you need is a USB cable and a copy of avrosp.

 

So out of all the foregoing I would investigate a little deeper into:

 the board will not program with AVROSP. 

What does "will not program" in this context actually mean? Did you read the part of AVR370 where it said you would need a .INF file for Windows so it would recognise the USB bridge? The place I found AVR370 was:

 

https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en591062

 

That page not only has the PDF icon that leads to the PDF I quoted but it has the ZIP icon that leads to a .ZIP file that contains some "useful stuff". Among that is a .INF file that should make the USB bridge visible so that AVROSP can "see" it. AVROSP itself is here:

 

https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en591218

 

(to be honest., for an easy life I'd be tempted to spend the $10 or whatever it is and get one of the other Xplained Pro/Xplained Mini boards that DOES have a programmer\debugger built in)

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

clawson wrote:
get one of the other Xplained Pro/Xplained Mini boards that DOES have a programmer\debugger built in) 

Absolutely!

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

Whilst the 1284 is a good chip, and was my 'goto' chip in 40/44 pins, I'd now be inclined to use something like the mega4809, which is still available in DIP40, but with the added bonus of the 4809 Curiosity Nano with on-board debugger.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

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

Thank you for that because I was just about to post the same thing.  I have been looking at that for weeks and it will not program with AVROSP.  It's what the "Getting started" video is about, and with with the exact same Xplained board.  It gets almost there and acts like the board is not reset properly with SW0 and reset.  I will try again tomorrow; but do you guys see all the frigging confusion here.  This should not be this complicated!  I have no problem with Arduino but this mega stuff is really poor.  I think I should scrap all this and start with some different up-to-date board. 

 

Thanks!  I thought I was losing my mind, maybe tomorrow!

howdyrichard

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

howdyrichard wrote:
This should not be this complicated!

That's why things have moved on, and they now have the Pro / Mini / Nano versions with the onboard debugger/programmer.

 

This is how things were 10 years ago!

 

Look at the docs and you'll that they're from a time when Win-XP was current, and Win-7 was new !

 

I think I should scrap all this and start with some different up-to-date board. 

Yes - you should! That'd be the Pro / Mini / Nano - See #13 (and #14)

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Thu. May 21, 2020 - 12:22 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, I pulled out a Dell laptop with XP and was able to program it in about 20 minutes!  So there ya go, whoever said these were from the XP days, thank you!  Not sure if I want waste time on becoming any more of an expert on this oldie...

howdyrichard