Program AVR with other AVR

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

Hello all;
first things first, this is my first post and I want to say a big THANK YOU for everything I have learned here.

I'm starting with AVR development and it's been an interesting field so far; I bought a SOC-Robotics IMU6410 board, which provides 9-DOF sensor (accelerometers, gyroscopes, magnetometers) all governed by an Atmel ATmega1284P. Nice toy to play with.

I also have a second IMU6410 board, which was sent to me by mistake; according to them, it seems to be a "test unit". While the "consumer" board comes with a preloaded STK500v2-compatible bootloader, this test unit seems to come with an empty flash; at least it doesn't seem to respond to the AVRDude commands.

I wonder whether is possible to use my first (proper) board to program the second (test) one or not. The board design includes ISP programming port, with {VDD, MOSI, MISO, SCK, SS, RESET, GND} pins.

What I have in mind is:
- Connect somehow these pins between both boards.
- Load a "software programmer" and a sample test .hex into the working board.
- Try to load the .hex into the non-working board (I would control its operation through a PuTTY session).

But I'm in need for at least some initial guidance. I don't even know if it's safe to connect ISP ports pin-to-pin with just a cable; any comment or help would be much appreciated.

PD: Yes, I know a hardware programmer would be faster and easier but a) the only shop around here is closed for the whole weekend now and b) I just want to learn a bit more :-)

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

Yes. You can use one AVR to program another AVR. However I would not recommend this as your first project.

There are many programmer software projects. A typical example is ArduinoISP sketch that comes with every Arduino board.

David.

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

Well, I don't want it to be a programming project: I wouldn't have a problem in modifying a bit of other projects but not creating a new one by myself... when I said "software programmer" I meant a possibly already existing one :-)

I'll have a look to the ArduinoISP firmware and the original mega-isp project, thanks

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

Quote:

when I said "software programmer" I meant a possibly already existing one

Many (most?) AVR programmers feature an AVR on board. Apart from the Arduino sketch mentioned, all Atmels own programmers have an AVR on-board AFAIK. Also see e.g. USBASP.

Your main problem is to get the very first AVR programmed (the one to become a programmer). Unless you get an AVR with a bootloader pre-programmed, you will need a programmer to program the first AVR.

Do yourself a BIG favour. BUY a decent programmer. Atmels AVRISP mk II. Atmels AVR Dragon. An USBASP. Or an Arduino, that you load with the sketch mentioned.

Spending time building your own programmer WILL become a project of it's own, regardless of how much you try to avoid it. Spend a little money to get a lot of time doing what you really set out to do with AVRs.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"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

Quote:

An USBASP.

Which are about $3 on ebay (though be ready to be patient I ordered one and it took about a month to be delivered!)

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

clawson wrote:
(though be ready to be patient I ordered one and it took about a month to be delivered!)

I was amazed, mine came in a week. Yours must have come in a "slow boat". :)

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

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

Quote:

Yours must have come in a "slow boat"

I thought they where "to China", not "from". :D

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"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

It took 6 weeks for my usbasp's to arrive :shock: But I don't complain, they cost next to nothing and no extra for delivery.

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

Sometimes China Mail takes 10 days to England. Last week, a package took 23 days. I can live with both. After all, the price is cheap.

Larry might have VIP status. Less than 7 days to the U.S. seems exceptionally fast.

David.

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

Well I have studied how difficult could it be to convert my specific board into a working USBasp-like programmer, and well, for the price of it I prefer buying one for myself :)

Thank you for your replies, now I'll look for some other topic to mess with :)